W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

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

From: Francesco Schwarz via GitHub <sysbot+gh@w3.org>
Date: Fri, 06 Jul 2018 05:43:32 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-402932063-1530855811-sysbot+gh@w3.org>

> A lot of the "misuse" of existing nesting is based on the fact that it's compiled down to non-nested CSS. These issues go away if nesting is supported natively and never has to be flattened.

But the specificity of nested selectors, in the end, is the same, isn’t it?


.a {
  & .b {}

is the same as writing 

.a .b {}

At least I hope I understood native CSS nesting correctly here. For me this means that the nesting obfuscates the specificity by a lot. With compiled and flattened CSS selectors (if we were to use Sass nesting), at least in the end I can look at what the browser actually has to deal with. It’s more explicit that way.

> Appeal to authority is not how we work.

I know and I certainly didn’t intend to generate that impression with my comment.

GitHub Notification of comment by isellsoap
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2701#issuecomment-402932063 using your GitHub account
Received on Friday, 6 July 2018 05:43:45 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:33 UTC