3 ms·
Thanks for pointing this out, I indeed missed that (it's hidden behind a folded caption). It still doesn't explain why all the proposals feel the need to be mo
by krajzeg 4y ago
Thanks for pointing this out, I indeed missed that (it's hidden behind a folded caption).
It still doesn't explain why all the proposals feel the need to be more powerful than SCSS nesting (allowing "reverse nested" definitions where the element being nested in is not at the start), but it does explain the need for "&".
EDIT: Actually, it looks like SCSS supports the same thing by using '&' anywhere in the definition. I'll just stop posting since it looks like my knowledge is too rusty to contribute positively.
- Semaphor 4y agoI’m not sure if I understand you correctly, but I think SCSS does actually support that. dialog { html:has(&[open]) { overflow: hidden; } } Is possible annd creates html:has(dialog[open]) {overflow: hidden;}
- krajzeg 4y agoNo, you're right. My SCSS is a bit rusty these days and I simply forgot how flexible it is, sorry for the misleading comment.
- aasasd 4y agoThis seems to slap the property on html, whereas the proposed nesting only uses the parent as a selector, and specifies properties for the nested element (if I'm not confusing something again). If scss can do `.parent & {...}`, that would be the same as the proposal.