Skip to content

[css-properties-values-api] Allow dashed idents in syntax strings - #1137

Open
andruud wants to merge 1 commit into
w3c:mainfrom
andruud:hyphen_minus
Open

[css-properties-values-api] Allow dashed idents in syntax strings#1137
andruud wants to merge 1 commit into
w3c:mainfrom
andruud:hyphen_minus

Conversation

@andruud

@andruud andruud commented Jan 2, 2025

Copy link
Copy Markdown
Member

Currently, grammars like syntax:"auto | --mything" are not allowed, since we don't handle HYPHEN-MINUS during "consume a syntax component". This was likely an oversight when it was initially written.

Note: we might want to just remove the algorithms that parse syntax components from a string, and instead tokenize/parse using the new <syntax> production. If we do, that would also make dashed idents allowed unless we explicitly block it.

Currently, grammars like syntax:"auto | --mything" are not allowed,
since we don't handle HYPHEN-MINUS during "consume a syntax component".
This was likely an oversight when it was initially written.

Note: we might want to just remove the algorithms that parse
syntax components from a string, and instead tokenize/parse using
the new `<syntax>` production. If we do, that would *also* make
dashed idents allowed unless we explicitly block it.
@andruud

andruud commented Jan 2, 2025

Copy link
Copy Markdown
Member Author

cc @kizu

@yisibl

yisibl commented Mar 16, 2026

Copy link
Copy Markdown

Firefox 150 has fixed this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1939501#c8

@yisibl

yisibl commented Mar 16, 2026

Copy link
Copy Markdown

Is syntax:"--" also valid?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants