Skip to content

Commit b581d37

Browse files
committed
Follow changes in WD-selectors-4-20180202
See also: https://www.w3.org/TR/2018/WD-selectors-4-20180202/
1 parent 73292c6 commit b581d37

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

after/syntax/css/selectors4.vim

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
syn match cssSelectorOp "[|]"
2-
syn keyword cssPseudoClassId contained scope current past future default valid invalid required optional blank
2+
syn keyword cssPseudoClassId contained scope current past future default valid invalid required optional blank playing paused
33
syn match cssPseudoClassId contained "\<\(any\|local\)-link\>"
44
syn match cssPseudoClassId contained "\<read-\(only\|write\)\>"
55
syn match cssPseudoClassId contained "\<placeholder-shown\>"
66
syn match cssPseudoClassId contained "\<\(in\|out-of\)-range\>"
7-
syn match cssPseudoClassId contained "\<user-error\>"
8-
syn match cssPseudoClassId contained "\<\(active\|valid\|invalid\)-drop-target\>"
9-
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":\(matches\|dir\|local-link\|current\|nth\(-last\)\=-\(match\|column\)\|column\)(" end=")" oneline
7+
syn match cssPseudoClassId contained "\<user-invalid\>"
8+
syn match cssPseudoClassId contained "\<target-within\>"
9+
syn match cssPseudoClassId contained "\<focus-\(within\|visible\)\>"
10+
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":\(matches\|dir\|local-link\|current\|nth\(-last\)\=-col\|has\|drop\)(" end=")" oneline

test/test.css

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -676,19 +676,20 @@
676676
.selectors4:placeholder-shown,
677677
.selectors4:in-range,
678678
.selectors4:out-of-range,
679-
.selectors4:user-error,
680-
.selectors4:active-drop-target,
681-
.selectors4:valid-drop-target,
682-
.selectors4:invalid-drop-target,
679+
.selectors4:user-invalid,
683680
.selectors4:matches(:hover, :focus),
684681
.selectors4:dir(ltr),
685682
.selectors4:local-link(0),
686683
.selectors4:current(p, li, dt, dd),
687-
.selectors4:nth-match(2n+1),
688-
.selectors4:nth-last-match(-n+2),
689-
.selectors4:nth-column(2n+1),
690-
.selectors4:nth-last-column(-n+2),
691-
.selectors4:column(p, li, dt, dd) {
684+
.selectors4:nth-col(2n+1),
685+
.selectors4:nth-last-col(-n+2),
686+
.selectors4:target-within,
687+
.selectors4:focus-within,
688+
.selectors4:focus-visible,
689+
.selectors4:playing,
690+
.selectors4:paused,
691+
.selectors4:has(> img),
692+
.selectors4:drop(active) {
692693
display: auto;
693694
}
694695

0 commit comments

Comments
 (0)