-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Disable automatic var()
injection for anchor properties
#13826
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have tests for the other exceptions that we should update for these new ones?
We have tests but they only contain two cases: let config = {
content: [
// Automatic var injection
{ raw: '[color:--foo]' },
// Automatic var injection is skipped
{ raw: '[timeline-scope:--foo]' },
],
} I can add all of them though if you think it's warranted |
var()
injection for CSS anchor positioning proper…var()
injection for anchor properties
I went ahead and added tests for all the properties. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR disables automatic var() injsection for the following properties related to CSS Anchor Positioning as they all take dashed identifiers as values:
anchor-name
anchor-scope
position-anchor
position-try-options
position-try
Before this PR when using these properties with custom properties you'd get output like this — notice how we wrap the identifier in
var()
:Normally, this behavior is reasonable for most properties like colors, sizes, spacing, etc… but these properties take a dashed ident directly as a custom name and are not referencing a custom property. So, after this PR you'll get the following output:
Fixes #13818