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

parser: Implement recent syntax spec change to avoid parsing custom properties that look like selectors as rules. #387

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

emilio
Copy link
Member

@emilio emilio commented Apr 23, 2024

This implements the:

If the first two non- values of rule’s prelude are
an whose value starts with "--" followed by a
, then...

From https://drafts.csswg.org/css-syntax/#consume-qualified-rule

Mozilla Bug: 1884879
Differential Revision: https://phabricator.services.mozilla.com/D207796

@emilio
Copy link
Member Author

emilio commented Apr 23, 2024

Reviewed upstream by @zrhoffman (this incorporates their suggested changes)

@emilio emilio enabled auto-merge April 23, 2024 17:31
@emilio emilio disabled auto-merge April 23, 2024 17:31
@emilio emilio force-pushed the custom-props-nesting branch 2 times, most recently from 76180ef to 9263f8c Compare April 23, 2024 17:34
…roperties that look like selectors.

This implements the:

> If the first two non-<whitespace-token> values of rule’s prelude are
> an <ident-token> whose value starts with "--" followed by a
> <colon-token>, then...

From https://drafts.csswg.org/css-syntax/#consume-qualified-rule

Mozilla Bug: 1884879
Differential Revision: https://phabricator.services.mozilla.com/D207796
@emilio emilio force-pushed the custom-props-nesting branch from 9263f8c to 5dc6d91 Compare April 23, 2024 17:36
@emilio emilio merged commit b75ce6a into main Apr 23, 2024
11 checks passed
@emilio emilio deleted the custom-props-nesting branch April 23, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants