Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AtkinsSJ opened this issue Mar 11, 2025 · 4 comments
Closed

Comments

@AtkinsSJ
Copy link
Contributor

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. 😅

@svgeesus
Copy link
Contributor

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

@mirisuzanne
Copy link
Contributor

mirisuzanne commented Mar 12, 2025

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.

@svgeesus
Copy link
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?

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.

@AtkinsSJ
Copy link
Contributor Author

Perfect, thank you!

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

No branches or pull requests

3 participants