W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

Re: [csswg-drafts] [css-nesting] Concern about combinatorial explosion

From: Xidorn Quan via GitHub <sysbot+gh@w3.org>
Date: Thu, 05 Jul 2018 13:04:47 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-402714968-1530795886-sysbot+gh@w3.org>
> No, they're not, you're just desugaring wrong. ^_^ When desugaring, you replace the `&` with a `:matches()` containing the parent selector

So it's different from what preprocessors do currently? I don't think preprocessors are able to expand `c d :matches(a b)` to a selector pre-matches, are they?

Anyway, expanding them to `:matches` would only make them worse than `:matches`. Still, I don't believe you can expand any nested selector into a single complex selector. Consider for example, `a b { & c d { } e f & { } }`, what selector would you expand it to?

> No, we resolved to use the simpler version of :matches() specificity - it's the specificity of the most specific argument, regardless of matching.

Oh, okay, that's great. Then `:matches()` is probably not very hard to implement.

GitHub Notification of comment by upsuper
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2881#issuecomment-402714968 using your GitHub account
Received on Thursday, 5 July 2018 13:04:54 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:33 UTC