Skip to content

Commit 1eeaa8c

Browse files
dletoreygithub-actions[bot]dipikabhcaugnerJosh-Cena
authored
40483 heading selectors (#40784)
* added the :heading and :heading pages * finshed the :heading & :heading() pages * added note to :heading() and added both to pseudo-classes page * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * made explanation match code example * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fixed code blocks * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * updated the Note & parameters * fixed the syntax example * added a note about matching attributes * moved the note to usage notes * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * Update files/en-us/web/css/_colon_heading_function/index.md Co-authored-by: Dipika Bhattacharya <[email protected]> * fixed the code block not ending and the example of aria roles * Update files/en-us/web/css/_colon_heading/index.md Co-authored-by: Estelle Weyl <[email protected]> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Dipika Bhattacharya <[email protected]> Co-authored-by: Claas Augner <[email protected]> Co-authored-by: Joshua Chen <[email protected]> Co-authored-by: Estelle Weyl <[email protected]>
1 parent 21c690a commit 1eeaa8c

File tree

1 file changed

+2
-1
lines changed
  • files/en-us/web/css/_colon_heading

1 file changed

+2
-1
lines changed

files/en-us/web/css/_colon_heading/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ sidebar: cssref
77
---
88

99
The **`:heading`** [CSS](/en-US/docs/Web/CSS) [pseudo-class](/en-US/docs/Web/CSS/Pseudo-classes) matches all [heading elements](/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements) in a document. This allows you to style all headings at once, rather than matching and styling them individually.
10-
This pseudo-class matches only elements that are semantically recognized as headings (`<h1>` through `<h6>`). Elements with [`role="heading"`](/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/heading_role) are not matched; you can select those by using the functional form, {{CSSXRef(":heading_function", ":heading()")}}.
10+
11+
This pseudo-class matches only elements that by default are semantically recognized as headings (`<h1>` through `<h6>`). Elements with [`role="heading"`](/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/heading_role) are not matched; you can select those by using the `[role="heading"]` [attribute selector](/en-US/docs/Web/CSS/Attribute_selectors).
1112

1213
> [!NOTE]
1314
> The `:heading` pseudo-class has the same [specificity](/en-US/docs/Web/CSS/CSS_cascade/Specificity#how_is_specificity_calculated) as a class selector, that is, `0-1-0`. So `:heading` would have a specificity of `0-1-0`, and `section:heading` would have a specificity of `0-1-1`.

0 commit comments

Comments
 (0)