Re: [csswg-drafts] [css-selectors] Reference selectors (#3714)

> References may not be combined with other selectors

Why not? I would think `$foo > .thing` would be a useful thing to do. It seems the only alternative is to create another reference.  Does `$foo > $bar` work?  It sounds like it would not. So how do you mimic the child combinator (or sibling combinator or many other such useful CSS selector types)?  I can only imagine that you need to imperatively add the $bar reference in JavaScript (only on immediate children of $foo).

I don't think CSS should adopt features that render other useful CSS features to be disabled. If selectors are a problem then we should improve selectors while still keeping them around. I agree with some of the others that `import` might be a better way of achieving a similar thing. It would allow you to use another stylesheet and mix it in without having its selectors applied globally.

-- 
GitHub Notification of comment by matthewp
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3714#issuecomment-474120940 using your GitHub account

Received on Monday, 18 March 2019 22:10:06 UTC