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

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

From: Amelia Bellamy-Royds via GitHub <sysbot+gh@w3.org>
Date: Sat, 12 Oct 2019 17:47:10 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-541346796-1570902429-sysbot+gh@w3.org>
> An alternative idea is saying that :heading(n) matches if the heading level is less than or equal to n.

I wouldn't want that to be the default behavior, but if this selector is adopted, I think it does make sense to add a second syntax that supports inequalities. It could be harmonized with the syntax being discussed in #4140 for `nth-child()` family of selectors:

- `heading(3)` for only level-3 headings
- `heading(n <= 3)` for level 1, 2, or 3
- `heading(n > 3)` for level 4, 5, 6, (and beyond)

-- 
GitHub Notification of comment by AmeliaBR
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1008#issuecomment-541346796 using your GitHub account
Received on Saturday, 12 October 2019 17:47:12 UTC

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