CSSOM section 9 on resolved values (i.e. the value returned by getComputedStyle) doesn't have any special case for the font-size property right now.
However: users can configure a minimum font-size to enforce in their browser settings; and in Safari and Chrome, this clamping does seem to be reflected in the values that getComputedStyle(elem).fontSize returns. In Firefox, the clamping doesn't take effect in getComputedStyle and we got a bug report on Firefox differing from other browsers in this respect: https://bugzilla.mozilla.org/show_bug.cgi?id=1903360
Perhaps we should spec this clamping behavior as part of the resolved value for font-size? (and explicitly apply the clamping in the getComputedStyle implementation) e.g. just specify that the resolved value of font-size is the used value, or something along those lines? (I'm not sure if that would bring in any additional complexity...)
Safari behaves a bit differently from Chrome/Firefox in that they seem to let the font-size impact the resolved value of 1em, not just the size of rendered text. That's probably a Safari bug (CC @heycam / @nt1m ).
CSSOM section 9 on resolved values (i.e. the value returned by
getComputedStyle
) doesn't have any special case for thefont-size
property right now.However: users can configure a minimum font-size to enforce in their browser settings; and in Safari and Chrome, this clamping does seem to be reflected in the values that
getComputedStyle(elem).fontSize
returns. In Firefox, the clamping doesn't take effect ingetComputedStyle
and we got a bug report on Firefox differing from other browsers in this respect: https://bugzilla.mozilla.org/show_bug.cgi?id=1903360Perhaps we should spec this clamping behavior as part of the resolved value for
font-size
? (and explicitly apply the clamping in the getComputedStyle implementation) e.g. just specify that the resolved value offont-size
is the used value, or something along those lines? (I'm not sure if that would bring in any additional complexity...)Additional notes:
font-size
impact the resolved value of1em
, not just the size of rendered text. That's probably a Safari bug (CC @heycam / @nt1m ).