Repository navigation
[css-values][css-fonts] Make the set of properties referred to as "font-*" more clear #14306
Description
Activity
An example of a property that I think probably belongs in the
font-*group but doesn't have thefont-prefix ismath-depth, as it can effect the computed value offont-size.That is a very good point, as I did not realize that property existed or had such an effect!
Reacted by Sam WeinigChecking my own understanding here.
In Fonts 4:
- The 'font' longhands are all font-affecting
- So are the 'font-synthesis' longhands, I think? Assuming that, say, synthetic bold might adjust the ch width or something.
- Are the font-feature properties? Hmm, I guess they can affect which glyph is used for 0, and thus the ch width too. font-variant-east-asian could affect
ic, too. And I guess the genericfont-variantcan affect both of them in theory. - I guess font-optical-sizing is too?
- And font-language-override, as it could affect the glyph used for
ic. - font-variant-emoji is not font-affecting, the affected characters aren't relied on by font-relative lengths nor are we likely to add font-relative lengths that are in the future reliant on those characters (or we can define them to be equal to the image variant, if we ever want to expose an emoji-width unit)
- Nor is font-palette, as it's just colors
Fonts 5 doesn't introduce any relevant new properties.
MathML will need to define that math-depth is font-affecting.
And that's it, maybe?
- added a commit that references this issue
on Aug 11, 2026 Also, better name suggestions than "font-affecting properties"?
- added a commit that references this issue
on Aug 12, 2026 @weinig does this new subsection 1.2. Interaction With Font-Relative Units resolve this issue?
Closed by 4f50f67
- addedClosed Accepted as Obvious BugfixFixed an obvious error with the obvious solution.Fixed an obvious error with the obvious solution.
on Aug 25, 2026 @tabatkins @svgeesus I think that definition may be overly broad.
Previously, it was decided that relative font units would be calculated in the absence of shaping - #5498, so I think any property that only effects shaping should be excluded.
Additionally,
line-heightshould be excluded, as CSS Values explicitly calls out that it can depend on font-relative units of the element itself.One additional property that needs exploring is
zoom. I have filed #14260 on that particular issue.font-variant-emoji is not font-affecting
Then you need to exclude it, because it is a longhand of
fontReacted by Chris Lilley
In the definition of font-relative units there is the text:
Rather than leaving it to chance that the set of properties this refers to are the right set and all font effecting properties have the prefix
font-and there are no non-font effecting properties that have the prefixfont-, it would be clearer if this linked to either a complete list of properties or some other definition.I believe the intent is that it is any property that might influence one of the font's metrics used by font-relative units. One option would be for CSS Fonts could define that concept and this could link to it.
cc @tabatkins @fantasai @svgeesus