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

> What is the purpose of this restriction?

@matthewp the purpose is deterministic styles resolution based on application order - not cascade or specificity*

* it is possible to achieve deterministic styles resolution when specificity is of a particular kind. I implemented a solution that resembles references (a CSS Modules/Blocks hybrid) as a PoF, it is called DSS and you can read about it [here](https://survivejs.com/blog/dss-interview/). From my experience [here are the CSS features](https://dss-lang.com/supported-css-features/) that can work in such a system.

> If we had done mixins would they have just been valid here automatically and we'd be done?

Indeed references are mixins that can be also consumed in JS

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

Received on Tuesday, 19 March 2019 08:43:21 UTC