Skip to content

[css-values][css-fonts] Make the set of properties referred to as "font-*" more clear #14306

Description

@weinig

In the definition of font-relative units there is the text:

When used in the value of any 'font-*' property on the element they refer to...

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 prefix font-, 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

Activity

  1. weinig commented on Aug 11, 2026

    @weinig
    ContributorAuthor

    An example of a property that I think probably belongs in the font-* group but doesn't have the font- prefix is math-depth, as it can effect the computed value of font-size.

  2. tabatkins commented on Aug 11, 2026

    @tabatkins
    Member

    That is a very good point, as I did not realize that property existed or had such an effect!

  3. tabatkins commented on Aug 11, 2026

    @tabatkins
    Member

    Checking 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 generic font-variant can 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?

  4. tabatkins commented on Aug 11, 2026

    @tabatkins
    Member

    Also, better name suggestions than "font-affecting properties"?

  5. svgeesus commented on Aug 18, 2026

    @svgeesus
    Collaborator

    @weinig does this new subsection 1.2. Interaction With Font-Relative Units resolve this issue?

  6. svgeesus commented on Aug 25, 2026

    @svgeesus
    Collaborator

    Closed by 4f50f67

  7. weinig commented on Aug 27, 2026

    @weinig
    ContributorAuthor

    @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-height should 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.

  8. reopened this on Aug 27, 2026
  9. Loirooriol commented on Aug 28, 2026

    @Loirooriol
    Contributor

    font-variant-emoji is not font-affecting

    Then you need to exclude it, because it is a longhand of font

  10. tabatkins commented on Sep 11, 2026

    @tabatkins
    Member

    Okay, did a number of fixes that I tagged against #14396.

    @weinig or @svgeesus : which properties just affect shaping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions