Problem
I am trying to set my root font-size to use vmin and px in a calc() function. When setting a circle div's height and width with rem, said circle is "squished" at small sizes (see photo and link below). When the div is inspected, the computed width and height are reported to be equal, despite its "squished" appearance.
html {
font-size: calc(10vmin + 1px);
}
.circle {
height: 1rem;
width: 1rem;
background-color: blue;
border-radius: 50%;
}
<html>
<div class="circle"></div>
</html>
Troubleshooting
When the height and width are changed to a px value the issue is fixed. Additionally changing the root font-size to not use vmin, vh or vw to calculate the size also seems to fix the problem.
As pointed out by Aditya Sarin, changing the size of the div using vh or vw also fixes the error. It seems the only way to reproduce this error is by using calc() with a viewport unit and px value.
Question
Why does using calc() with a viewport unit seem to cause this error? Is it generally not considered wise to mix a viewport unit with a px value to create responsive rem sizes?
