- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Thu, 11 Nov 2021 18:14:23 +0000
- To: public-css-archive@w3.org
@vrubleg > [using `{{...}}` for nesting] I've already listed the problems with that - it's either an editting hazard (people need to remember to add an extra `{}` if they're just doing nesting, or *remove* the `{}` when they're currently nesting but realize they want to add properties, or remember that they must use a `&{...}` rule to add properties) or it's just as awkward as putting `@nest` on every rule as you wrap every rule in its own `{}` block. (Or you double-indent, as would be natural for this amount of bracing.) Unless you meant that nesting is *only* allowed on its own, with double-braces? This is still an editting hazard - you need to rewrite unrelated parts of the rule if you start with properties and realize you want to nest afterwards (and the same in reverse, tho you *could* keep it as-is with a lone `.foo{{ &{...} }}` nested rule). It's also an OM hazard - what happens if a rule already has properties and you `.insertRule()` on it, or if it already has nesting and you `.setPropertyValue()` on it? We'd either have to make the OM more stateful in a possibly-confusing way and throw in these cases, or magically serialize the existing properties into a phantom `&{...}` block, changing the OM upon reserialization. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4748#issuecomment-966519080 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 11 November 2021 18:14:26 UTC