W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

Re: [csswg-drafts] CSS pseudo-selector for h1-h6? (#1008)

From: Anne van Kesteren via GitHub <sysbot+gh@w3.org>
Date: Fri, 11 Oct 2019 09:35:51 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-540993124-1570786550-sysbot+gh@w3.org>
@emilio raised an interesting concern that I don't have a good solution for. If you have
```css
:heading(1) { ... }
:heading(2) { ... }
:heading(3) { ... }
```
and then for some reason you end up with a level 4 heading on your page, the ideal "failure mode" is that it'll render the same as 3.

Maybe instead what you want is `heading-level` as a variable that can be used by `calc()` or some such.

Thoughts?

Unless there's a relative clear answer here I'm inclined to leave this feature out of https://github.com/whatwg/html/pull/3499 and save that for a future iteration.

cc @hober 

-- 
GitHub Notification of comment by annevk
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1008#issuecomment-540993124 using your GitHub account
Received on Friday, 11 October 2019 09:35:53 UTC

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