You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-viewport][css-fonts] Effect of the zoom property on font metrics as applied to length units #14260
In this scenario, the computed value for tab-size depends on how / when font metrics get computed.
Option 1 would be for the engine to perform font resolution using the computed value of font-size 10px, and then at use time, scaling all metrics by the zoom.
Option 2 (and what at least WebKit is currently doing) would be for the engine to perform font resolution using the used value of the font-size 20px and using it directly.
With this option, the naive computed value for tab-size would be way too big, as it would be using the x-height for a 20px font-size. What WebKit does to compensate is that it unscales the x-height by the zoom to bring it back into proportion. This is problematic as, unless x-height scales exactly linearly with font-size, the value can be distinct from the equivalent example without zoom:
.test {
font-size:10px;
tab-size:1ex;
}
Option 3 would be perform font resolution for both the computed and used font sizes, stashing the metrics for the unzoomed value away for use by units.
--
So, the questions are:
Does CSS Fonts define which font-size to use for font resolution when zoom is in play? (I wasn't able to find anything, but most things don't specify custom behavior with zoom, so this isn't unexpected).
If not, is there consensus on which option above is correct?
changed the title [-][css-viewport][css-fonts] Effect of the `zoom` property on font metrics[/-][+][css-viewport][css-fonts] Effect of the `zoom` property on font metrics as applied to length units[/+]on Aug 4, 2026
One additional piece of information here is this text from CSS Fonts about the font-size-adjust property:
The value of font-size-adjust affects the used value of font-size but does not affect the computed value. It affects the size of relative units that are based on font metrics such as ex and ch but does not affect the size of em units.
Activity
[-][css-viewport][css-fonts] Effect of the `zoom` property on font metrics[/-][+][css-viewport][css-fonts] Effect of the `zoom` property on font metrics as applied to length units[/+]weinig commentedon Aug 27, 2026
One additional piece of information here is this text from CSS Fonts about the font-size-adjust property:
(link)
This implies / states that font metrics and font metric based units like
exandchare affected by the used value offont-size.That still doesn't quite answer the question here though, as zoom is applied on top of the used value.