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

[css-anchor-position] is !important allowed in @position-try #10058

Closed
tabatkins opened this issue Mar 11, 2024 · 3 comments
Closed

[css-anchor-position] is !important allowed in @position-try #10058

tabatkins opened this issue Mar 11, 2024 · 3 comments

Comments

@tabatkins
Copy link
Member

Should we allow !important decls in @position-try? I'm inclined to say no - we're already having to do some slightly odd things with the cascade to make things work reasonably well and in a well-defined way (particularly with flip-* keywords), so having some parts of the rule also apply in a separate !important location would make it a lot more complicated for little, if any, benefit to authors.

(And, like, where exactly would they go anyway? We resolved that normal decls here go at "the end of the author origin", and I'm inclined to actually specify that as a separate origin placed right after Author. Whether an "important position-try decl" should follow normal origin-reversing order (being weaker than author !important rules) or violate that to still go after the author !important rules would be an important decision, and both options are fairly bad, I think.)

So, propose to disallow !important.

@andruud
Copy link
Member

andruud commented Mar 14, 2024

I assume disallowing means that declarations with !important are invalid parse-time? (Like keyframes).

@tabatkins
Copy link
Member Author

Correct.

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-anchor-position] is !important allowed in @position-try, and agreed to the following:

  • RESOLVED: !important is not allowed within position-try
The full IRC log of that discussion <chrishtr> TabAtkins: are !important rules allowed in position-try?
<chrishtr> TabAtkins: if they are then we'd have to define a new origin and not clear where that would go or what the use case is
<Rossen_> ack fantasai
<chrishtr> TabAtkins: propose the answer to the question is no
<fantasai> https://www.w3.org/TR/css-animations-1/#keyframes
<chrishtr> fantasai: agree it doesn't make sense, but we should be consistent with animations and how it's disallowed there
<chrishtr> TabAtkins: it falls out of the way to say it's not allowed in the syntax
<chrishtr> proposed resolution: !important is not allowed within position-try
<chrishtr> RESOLVED: !important is not allowed within position-try

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