Skip to content

[css-fonts-5] font property uses it's own concept for reset-only sub-properties #11904

Closed

Description

@AtkinsSJ

The definition for font lists properties that are "reset implicitly" rather than using the "Reset-only sub-property" concept from Cascade-5. I assume it was written first? It would be nice to unify those.

Specifically I recently was going to implement font's concept of it generically but couldn't find it used anywhere else. Turns out it is used elsewhere, it just has a different name. 😅

Activity

  1. svgeesus commented on Mar 11, 2025

    @svgeesus
    Collaborator

    Yes these categories were introduced first, to clarify a specific bug in setting font shorthand properties:

    in accordance with this CSSWG resolution

    I agree that harmonization would be good, but Cascade 5 does not seem to cover all the categories (Cascaded Independently is missing) so this needs further discussion and coordination.

    @fantasai @mirisuzanne @tabatkins

  2. mirisuzanne commented on Mar 12, 2025

    @mirisuzanne
    Contributor

    My understanding is that properties which cascade independently are not sub-properties, so I'm not sure what it does to define the type of sub-property that behaves as not a sub-property? Is the goal to call out that some props named foo-* are actually longhand sub-properties of foo, while some are independent but still part of the larger foo feature? I don't think I've seen that called out before.

  3. svgeesus commented on Mar 12, 2025

    @svgeesus
    Collaborator

    My understanding is that properties which cascade independently are not sub-properties, so I'm not sure what it does to define the type of sub-property that behaves as not a sub-property?

    Put like that, it seems obvious. The problem was that some implementations were treating properties called font-foo as if they were sub-properties, and so resetting them to initial values when the font shorthand were set. We needed to clarify which were not sub-properties.

    I'm fine to add that clarification to Fonts 4, and to link to the Cascade 5 definition for reset-only sub-property.

  4. added a commit that references this issue on Mar 12, 2025
    677dc21
  5. AtkinsSJ commented on Mar 13, 2025

    @AtkinsSJ
    ContributorAuthor

    Perfect, thank you!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions