Re: [csswg-drafts] [css-nesting] request to pick up the css-nesting proposal

I would like to see a discussion from the authoring perspective on [Nesting](https://tabatkins.github.io/specs/css-nesting/) vs [Scoping](https://www.w3.org/TR/2014/WD-css-scoping-1-20140403/#scope-atrule) and whether one is better or both are needed or what.

It's clear to me that people don't like repeating selectors, but it's less clear to me whether the desire for nesting is related to manipulating the cascade *as well* (which is poorly done via nesting, and better done via scoping) or the current specificity effects are exactly what's desired and only a syntactic manipulation is wanted.

As a review: Nesting merely adds up the specificities of the selectors which are chained together. (It's just a syntactic manipulation, which can be done with a preprocessor.) With Scoping, “The specificity of selectors inside the @scope rule is calculated locally: the selector specifying the scoping element is ignored. However, because scoped styles override non-scoped styles, style rules inside the @scope will override rules outside of it.” (If multiple `@scope`ed rules apply to an element, the rule with the deepest scoping element wins. See details in [Cascade](https://www.w3.org/TR/2016/CR-css-cascade-3-20160519/#cascading).)

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2701#issuecomment-395245179 using your GitHub account

Received on Wednesday, 6 June 2018 23:27:21 UTC