Skip to content

Commit 565cf25

Browse files
committed
[selectors-4][editorial] First, and incomplete, cut at an Explainer, for eventual TAG review #12799
1 parent 45502bb commit 565cf25

File tree

1 file changed

+38
-6
lines changed

1 file changed

+38
-6
lines changed

selectors-4/Selectors _4_Explainer.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Selectors 4 Explainer
22

3-
## Authors
3+
## Author
44

55
- Chris Lilley (W3C)
66

77
## Participate
8+
89
- [Issue tracker](https://github.com/w3c/csswg-drafts/issues?q=state%3Aopen%20label%3A%22selectors-4%22)
910

1011
## What are Selectors
@@ -20,7 +21,10 @@ and in [Selectors 3](https://www.w3.org/TR/selectors-3/)
2021
(W3C Recommendation, 2018).
2122

2223
[Selectors 4](https://www.w3.org/TR/selectors-4/)
23-
is now widely deployed, stable,
24+
is an incremental improvement to previous Selectors specifications,
25+
responding to common user needs.
26+
27+
It is now widely deployed, stable,
2428
and is being prepared for W3C Recommendation,
2529
while less-mature Selectors have been moved to
2630
[Selectors 5](https://www.w3.org/TR/selectors-5/).
@@ -52,9 +56,20 @@ These are both majority uses, hence the naming of the specification.
5256
formerly called `:matches()`,
5357
has been added to allow stylesheet authors to group functionally related elements,
5458
such as any element that is either hovered or focussed.
59+
- The specificity-adjusting [`:where()`](https://www.w3.org/TR/selectors-4/#zero-matches) pseudo-class
60+
has been added to construct zero-specificity filters,
61+
which are easy to override,
62+
replacing the many ugly hacks previously required to simulate this
63+
- The relational [`:has()`]() pseudo-class
5564

5665
### Interactivity and Forms
5766

67+
- Added the [`:modal`](https://www.w3.org/TR/selectors-4/#modal-state) pseudo-class,
68+
to select elements which exclude interaction with all other elements until dismissed
69+
- Added [`:open`](https://www.w3.org/TR/selectors-4/#open-state)
70+
and [`:popover-open`](https://www.w3.org/TR/selectors-4/#popover-open-state) pseudo-classes,
71+
primarily but not exclusively to use with HTML forms
72+
5873
### Hyperlinking Support
5974

6075
- Added [`:any-link`](https://www.w3.org/TR/selectors-4/#the-any-link-pseudo) to match
@@ -66,17 +81,34 @@ These are both majority uses, hence the naming of the specification.
6681
and negation [`:not()`](https://www.w3.org/TR/selectors-4/#negation) pseudo-classes
6782
to accept a **selector list**.
6883

84+
### Media State
85+
86+
- Added the `:playing`, `:paused` and `:seeking` [media playback state](https://www.w3.org/TR/selectors-4/#video-state) pseudo classes,
87+
to enable selecting on the dynamic state of video elements,
88+
functionality which previously required JavaScript
89+
- Added the `:buffered` and `:stalled`
90+
[media loading state](https://www.w3.org/TR/selectors-4/#media-loading-state) pseudo-classes,
91+
again providing functionality that previously needed JavaScript
92+
- Added the [`:fullscreen`](https://www.w3.org/TR/selectors-4/#fullscreen-state)
93+
and [`:picture-in-picture`](https://www.w3.org/TR/selectors-4/#pip-state) pseudo-classes
94+
- Added the `:muted` and `volume-locked` pseudo-classes
95+
for sound-producing elements
96+
6997
### Internationalization Improvements
7098

71-
- Expanded the content language [`:lang()`](https://www.w3.org/TR/selectors-4/#the-lang-pseudo) pseudo-class
72-
to accept **wildcard matching** and **lists of language codes**.
73-
-
99+
- Expanded the content language
100+
[`:lang()`](https://www.w3.org/TR/selectors-4/#the-lang-pseudo) pseudo-class
101+
to accept **wildcard matching** and **lists of language codes**
102+
for greater flexibility styling related languages
103+
- Added the content language writing direction
104+
[`dir()`](https://www.w3.org/TR/selectors-4/#the-dir-pseudo) pseudo-class
105+
for convenient styling of left-to-right and righ-to-left content
106+
- Clarified case-insensitive string matching
74107

75108
### Consolidation
76109

77110
Selectors first introduced in
78111
[CSS Basic UI 3](https://www.w3.org/TR/css-ui-3/),
79-
such as
80112
have been moved to the main Selectors 4 specification.
81113

82114
## Further reading

0 commit comments

Comments
 (0)