- From: Adam Argyle via GitHub <sysbot+gh@w3.org>
- Date: Wed, 26 Jan 2022 00:08:52 +0000
- To: public-css-archive@w3.org
for me, when I get into scenarios like the above, where i find myself nested kinda deep and needing some specialty syntax adjustments, i trade the deep forming DRY roots for legibility. aka, what @Loirooriol did. less assembling for my brain to do in that moment and less for my brain to do later when i come back. coming back to complex nesting i've made is troublesome, though seemed right in the moment. i wonder if the complexity cliff here is appropriately ~3-4 deep, where these syntax adjustments tend to be requested, but is also at a point one should consider if they need to nest that deep and maybe there's a more legible / simple way to achieve the style? it might behoove the native nesting spec to have a simpler (than less, stylus, scss) offering with less power but also less debt and complexity? custom props are definitely an escape hatch here, because a selector can change a prop and any children can hook into. that being said, i'm not opposed to finding a way for `@nest &` to allow specifying which ancestors to pass forward. numbering like js seems fine, but could have scaling issues. the `&()` seems fine but means you lose the DRYness of nesting in favor of a nested selector convenience. worth hackin on i think! -- GitHub Notification of comment by argyleink Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6330#issuecomment-1021726529 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 January 2022 00:08:54 UTC