[csswg-drafts] Pull Request: [css-selectors-5] add :heading, :heading() pseudo classes

keithamus has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [css-selectors-5] add :heading, :heading() pseudo classes ==
This fixes #10296, #351, #1008 by specifying the `:heading` and `:heading(An+B)` pseudo classes, which will match against elements with a defined [heading level](https://html.spec.whatwg.org/multipage/sections.html#heading-level). As it stands, the current elements with a heading level are `h1`, `h2`, `h3`, `h4`, `h5`, and `h6`.

There is a proposal being actively prototyped to allow for more _dynamic_ heading levels that do not strictly adhere to their tagname (see https://github.com/whatwg/html/issues/5033 for more). This proposal (adding the `headingoffset`, `headingreset` attributes) will make it significantly more complex to unilaterally style elements with a heading level of, say, 1, raising the importance of the selectors proposed in this PR.

I've https://github.com/w3c/csswg-drafts/labels/Agenda%2B the issue #10296 in order to discuss _this_, the proposed selectors, that we may resolve and merge this PR, but in the meantime I would appreciate editorial review from those that have time.

See https://github.com/w3c/csswg-drafts/pull/11836


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 5 March 2025 18:14:10 UTC