w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.42k stars 647 forks source link

[css-mixins] `<combinator>` is already defined in Selectors #10557

Closed cdoublev closed 1 month ago

cdoublev commented 1 month ago

There is syntax and selector <combinator>s, which are different sets:

It would be nice to clarify whether/how productions should be able to expand to a different value definition (syntax) depending on context. As far as I know, <bool-test> is the only other production whose value definition is context-sensitive, but it does not explicitly expand to a value definition (with <bool-test> =).

cdoublev commented 1 month ago

I hope it is fine not top open a separate issue, but the same problem applies to <type()>:

If production rules should have context-insensitive value definitions, a solution could be to use an inline type() definition (like in CSS Images): <css-type> = <syntax-component> | type( <syntax> ).

Edit: never mind, type() is defined as a function in CSS Images, not as a type.

tabatkins commented 1 month ago

Yup, I went ahead and deduped the names.