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

> 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