Skip to content
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

Text spacing rules [24afc2, 78fd32, 9e45ec] incorrectly use "important computed value" #2002

Open
Jym77 opened this issue Jan 12, 2023 · 2 comments
Assignees

Comments

@Jym77
Copy link
Collaborator

Jym77 commented Jan 12, 2023

The Expectation of Letter spacing in style attributes is not !important and other text spacing rules have a first bullet saying:

not important: the computed value of its [text spacing] property is not important; or

This Expectation is needed to handle inherit !important value, where the declaration is important but inherits from a non-important hence overwritable declaration, thus it is not a problem(Passed Example 7).

However, reading the CSS specs, it seems that only declarations are important, not values 🙈
https://github.com/act-rules/act-rules.github.io/pull/1923/files#r1067361598

@carlosapaduarte
Copy link
Member

From the CG call:

  • Try to update the applicability to remove declaration with inherit; or
  • Create a definition for "important" to explain how it gets computed

@dd8
Copy link
Collaborator

dd8 commented Aug 16, 2023

All computed values have cascade origins, which is the origin of the declared value winning the cascade (which comes from the origin of the style rule containing the declaration) or the origin of the initial value if there were no declared values:

https://drafts.csswg.org/css-cascade/#cascade-sort

The cascade needs to know the origin of each declared value to find the winning declaration. Currently the rule says:

not important: the computed value of its [text spacing] property is not important;

but you could say this instead:

not important: the cascade origin of the computed value of its [text spacing] property is not important;

That should deal with the inherit !important case because the cascade origin is the origin of the inherited value.

@WilcoFiers WilcoFiers self-assigned this Nov 7, 2024
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

4 participants