Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions selectors-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,16 @@ Heading Structures: the heading pseudo-classes '':heading'', and '':heading()''<

As a functional pseudo-class,
<dfn id='heading-functional-pseudo' lt=':heading()'>:heading()</dfn>
notation represents elements that have a <a>heading level</a> among <var>An+B</var>.
notation represents elements that have a <a>heading level</a> among matching
any of the provided <var>integer</var> values.
The syntax is:

<pre class=prod>
:heading() = :heading( <<An+B>># )
:heading() = :heading( <<level>># )
</pre>

where <dfn><code>&lt;level></code></dfn> is a <<number-token>> with its type flag set to "integer".

The [=specificity=] of '':heading()'' is that of a class.

<div class="example">
Expand All @@ -188,10 +191,10 @@ Heading Structures: the heading pseudo-classes '':heading'', and '':heading()''<
500, additionally heading levels 1 and 2 will be underlined, while 3 and
beyond will have no text-decoration:

<pre>:heading(-n+3) { font-weight: 900; }</pre>
<pre>:heading(n+6) { font-weight: 500; }</pre>
<pre>:heading(1, 2, 3) { font-weight: 900; }</pre>
<pre>:heading(6, 7, 8, 9) { font-weight: 500; }</pre>
<pre>:heading(1, 2) { text-decoration: underline; }</pre>
<pre>:heading(n+3) { text-decoration: none; }</pre>
<pre>:heading(3, 4, 5, 6, 7, 8, 9) { text-decoration: none; }</pre>
</div>

Note: The <a>heading level</a> might be different from an element's
Expand Down