W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2019

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

From: Giuseppe via GitHub <sysbot+gh@w3.org>
Date: Tue, 19 Mar 2019 08:43:19 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-474248269-1552984998-sysbot+gh@w3.org>
> 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

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:58 UTC