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

> I don't think preprocessors are able to expand c d :matches(a b) to a selector pre-matches, are they?

They certainly can, but it explodes combinatorially:

c d a b
c da b
c a d b
ca d b
a c d b

In cases like this (like Sass's @extend), they use some heuristics to avoid having to fully expand the possiblities, while making it highly likely that what they do expand to is useful, but that's not strictly necessary.

> Consider for example, a b { & c d { } e f & { } }, what selector would you expand it to?

Just run the desugaring twice, man:  `e f :matches(:matches(a b) c d)`.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at using your GitHub account

Received on Thursday, 5 July 2018 13:13:38 UTC