- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Thu, 05 Jul 2018 17:23:45 +0000
- To: public-css-archive@w3.org
>From my understanding,
```css
a b {
& c d { }
e f & { }
}
```
should expand to
```css
:matches(a b) c d { }
e f :matches(a b) { }
```
Sure, the parent part is repeated but there is no combinatorial explosion.
The problem seems indeed when `&` is used multiple times in an inner selector:
```css
a1, a2 {
& b1, & b2 {
& c1, & c2 {}
}
}
```
expands to
```css
:matches(:matches(a1, a2) b1, :matches(a1, a2) b2) c1,
:matches(:matches(a1, a2) b1, :matches(a1, a2) b2) c2 {}
```
but then I think implementations should just not do this, and reuse the parent part without actually duplicating it.
--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2881#issuecomment-402794879 using your GitHub account
Received on Thursday, 5 July 2018 17:23:49 UTC