- From: Thomas Di Grégorio via GitHub <sysbot+gh@w3.org>
- Date: Wed, 28 Feb 2024 12:43:31 +0000
- To: public-css-archive@w3.org
> What about selectors that mean the same thing but with different syntax? E.g. would `@same-as .foo` pull in `[class~="foo"]`, `:is(.foo)`, `:where(.foo)`, `:not(:not(.foo))`? Or even `[class="foo"], [class^="foo "], [class*=" foo "], [class$=" foo"]`? What about subsets like `[class="foo"]` or `[class^="foo"], [class$="foo"]`? After re-lecture, I come back on this question. Did you mean: what about these selectors placed in the `@same-as` declaration? Or what about them elsewhere in the case of a `@same-as .foo` ? I answered for the 2nd case... And for the 1st case, yes it's pretty sure the selectors possible to write in a `@same-as` are to be constrained a bit... 1) No compound selectors : what's the meaning of `@same-as .a > .b` ? Make as if the node has a parent with class `a` ? This is a too big virtual change to the actual HTML markup ! The same apply to `a + b`, `a ~ b`, `a b`, ... 2) No `*` selector, would means: act like if the node is anything ? :upside_down_face: 3) What about `OR` aka `,` selectors? Could be fine and usefull to act as several other selectors like `@same-as button, input[type=button], .btn`. Maybe the order of applying "virtual features" matters, `@same-as .btn, input[type=button], button` may not be the same result... 4) Concerning pseudos, I guess a complete list of possibilities are to be studied because some are OK like `@same-as :hover` but some are not like `@same-as ::before`... -- GitHub Notification of comment by devingfx Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9350#issuecomment-1968906778 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 28 February 2024 12:43:32 UTC