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

Re: [csswg-drafts] CSS pseudo-selector for h1-h6?

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Fri, 23 Feb 2018 19:59:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-368122551-1519415943-sysbot+gh@w3.org>
> But doesn't :matches(h1, h2, h3) from Selectors level 4 already solve the main problem here (code duplication)?

No, because HTML has ways of assigning heading levels that go beyond tagnames - `h1` nested inside of sectioning elements automatically becomes a second/third/etc level heading, as appropriate.  (Plus, `:heading` really is pretty dramatically shorter to type than `:matches(h1, h2, h3, h4, h5, h6)`, and is a pretty common thing to want to style.)

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1008#issuecomment-368122551 using your GitHub account
Received on Friday, 23 February 2018 19:59:11 UTC

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