W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2020

Re: [csswg-drafts] [css-nesting] Make @nest default to descendant when no & is present (#5738)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Sat, 21 Nov 2020 00:05:44 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-731468583-1605917143-sysbot+gh@w3.org>
> nobody gets confused

Well, I have seen CSS newbies confused because `<div><p><span>` was affected by `div span` styles, turns out they thought it meant `div > span`. I suspect this may be happening in a non-negligible amount of cases, it's just that using the descendant combinator instead of the child one is usually harmless, so it goes unnoticed. I think that making the descendant combinator be a space (and thus the default one) was a mistake, and your proposal could produce similar confusions. I don't like having default combinators, since different people can have different intuitions about what the default should be. But well, maybe I should accept that it's a lost battle, your proposal is at least consistent with the current behavior.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 21 November 2020 00:05:46 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:22 UTC