-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:heading() CSS pseudo-class: Level ranges #3500
Comments
Wouldnʼt the established
|
That's quite neat and would address @emilio's concern (if used properly). Perhaps not the most intuitive syntax, but copy-and-paste works. |
An+B is great for selecting the Nth element, or every Nth element. It can be used to select every element before/after a certain N, but it's not very intuitive. I'd much rather use comparison operators like MQs allow. (I don't think the |
As I commented in the related CSS issue discussion, there is open discussion (w3c/csswg-drafts#4140) about adding an intuitive range syntax to the CSS nth-child selectors. If both that and this proposal are adopted, then it would make sense to harmonize the syntax. There might not be much use case for |
Yeah, if An+B grows range restrictions, might as well do the full syntax over here too. Better that than special-casing things. |
How likely is that to happen? If that's likely I'd be happy to start with An+B and update once we get there. |
Closing this given that #7829 happened. If w3c/csswg-drafts#1008 turns into something we can revisit. |
As per #3499 (comment), I’d like to propose an enhancement for #3499 such that its
:heading(n)
CSS pseudo-class accepts range expressions:heading(> n)
,:heading(< n)
,:heading(>= n)
,:heading(<= n)
, and perhaps simple conjunctions such as:heading(> m, < n)
. See also #83 and w3c/csswg-drafts#1008.The text was updated successfully, but these errors were encountered: