Add selectors4.vim and test

This commit is contained in:
Kyo Nagashima
2013-12-06 15:10:24 +09:00
parent d73ffaf54e
commit b46fc07e3d
5 changed files with 103 additions and 76 deletions

View File

@@ -53,6 +53,7 @@ HISTORY
* Add Compositing and Blending Level 1 features
* Add CSS Fonts Module Level 3 features
* Add CSS Speech Module features
* Add Selectors Level 4 features
* Split CSS Counter Styles Level 3 features from `css3-lists.vim`
* Follow spec updates
* Add missing values

View File

@@ -0,0 +1,5 @@
syn match cssSelectorOp "[|]"
syn match cssPseudoClassId contained "\<\(active\|valid\|invalid\)-drop-target\>"
syn match cssPseudoClassId contained "\<placeholder-shown\>"
syn match cssPseudoClassId contained "\<user-error\>"
syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":dir(" end=")" oneline

View File

@@ -41,3 +41,4 @@ syn include @htmlCss syntax/css/css-text-3.vim
syn include @htmlCss syntax/css/css-text-decor-3.vim
syn include @htmlCss syntax/css/css-variables.vim
syn include @htmlCss syntax/css/css-writing-modes-3.vim
syn include @htmlCss syntax/css/selectors4.vim

View File

@@ -321,44 +321,54 @@
ruby-position: ruby-base-container;
}
.selectors:not([DISABLED]),
.selectors:matches(:hover, :focus),
.selectors:any-link,
.selectors:local-link,
.selectors:local-link(0),
.selectors:target,
.selectors:scope,
.selectors:current,
.selectors:current(p, li, dt, dd),
.selectors:past,
.selectors:future,
.selectors:enabled,
.selectors:disabled,
.selectors:checked,
.selectors:indeterminate,
.selectors:default,
.selecors:in-range,
.selectors:out-of-range,
.selectors:required,
.selectors:optional,
.selectors:read-only,
.selectors:read-write,
.selectors:root,
.selectors:empty,
.selectors:nth-child(2n+1),
.selectors:last-child,
.selectors:nth-last-child(-n+2),
.selectors:only-child,
.selectors:first-of-type,
.selectors:nth-of-type(2n+1),
.selectors:last-of-type,
.selectors:nth-last-of-type(n+2),
.selectors:only-of-type,
.selectors:nth-match(2n+1),
.selectors:nth-last-match(-n+2),
.selectors:column(p, li, dt, dd),
.selectors:nth-column(2n+1),
.selectors:nth-last-column(-n+2) {
.selectors3:not([DISABLED]),
.selectors3:matches(:hover, :focus),
.selectors3:any-link,
.selectors3:local-link,
.selectors3:local-link(0),
.selectors3:target,
.selectors3:scope,
.selectors3:current,
.selectors3:current(p, li, dt, dd),
.selectors3:past,
.selectors3:future,
.selectors3:enabled,
.selectors3:disabled,
.selectors3:checked,
.selectors3:indeterminate,
.selectors3:default,
.selectors3:in-range,
.selectors3:out-of-range,
.selectors3:required,
.selectors3:optional,
.selectors3:read-only,
.selectors3:read-write,
.selectors3:root,
.selectors3:empty,
.selectors3:nth-child(2n+1),
.selectors3:last-child,
.selectors3:nth-last-child(-n+2),
.selectors3:only-child,
.selectors3:first-of-type,
.selectors3:nth-of-type(2n+1),
.selectors3:last-of-type,
.selectors3:nth-last-of-type(n+2),
.selectors3:only-of-type,
.selectors3:nth-match(2n+1),
.selectors3:nth-last-match(-n+2),
.selectors3:column(p, li, dt, dd),
.selectors3:nth-column(2n+1),
.selectors3:nth-last-column(-n+2) {
display: auto;
}
foo | h1,
.selectors4:dir(ltr),
.selectors4:active-drop-target,
.selectors4:valid-drop-target,
.selectors4:invalid-drop-target,
.selectors4:placeholder-shown,
.selectors4:user-error {
display: auto;
}

View File

@@ -331,44 +331,54 @@
ruby-position: ruby-base-container;
}
.selectors:not([DISABLED]),
.selectors:matches(:hover, :focus),
.selectors:any-link,
.selectors:local-link,
.selectors:local-link(0),
.selectors:target,
.selectors:scope,
.selectors:current,
.selectors:current(p, li, dt, dd),
.selectors:past,
.selectors:future,
.selectors:enabled,
.selectors:disabled,
.selectors:checked,
.selectors:indeterminate,
.selectors:default,
.selecors:in-range,
.selectors:out-of-range,
.selectors:required,
.selectors:optional,
.selectors:read-only,
.selectors:read-write,
.selectors:root,
.selectors:empty,
.selectors:nth-child(2n+1),
.selectors:last-child,
.selectors:nth-last-child(-n+2),
.selectors:only-child,
.selectors:first-of-type,
.selectors:nth-of-type(2n+1),
.selectors:last-of-type,
.selectors:nth-last-of-type(n+2),
.selectors:only-of-type,
.selectors:nth-match(2n+1),
.selectors:nth-last-match(-n+2),
.selectors:column(p, li, dt, dd),
.selectors:nth-column(2n+1),
.selectors:nth-last-column(-n+2) {
.selectors3:not([DISABLED]),
.selectors3:matches(:hover, :focus),
.selectors3:any-link,
.selectors3:local-link,
.selectors3:local-link(0),
.selectors3:target,
.selectors3:scope,
.selectors3:current,
.selectors3:current(p, li, dt, dd),
.selectors3:past,
.selectors3:future,
.selectors3:enabled,
.selectors3:disabled,
.selectors3:checked,
.selectors3:indeterminate,
.selectors3:default,
.selectors3:in-range,
.selectors3:out-of-range,
.selectors3:required,
.selectors3:optional,
.selectors3:read-only,
.selectors3:read-write,
.selectors3:root,
.selectors3:empty,
.selectors3:nth-child(2n+1),
.selectors3:last-child,
.selectors3:nth-last-child(-n+2),
.selectors3:only-child,
.selectors3:first-of-type,
.selectors3:nth-of-type(2n+1),
.selectors3:last-of-type,
.selectors3:nth-last-of-type(n+2),
.selectors3:only-of-type,
.selectors3:nth-match(2n+1),
.selectors3:nth-last-match(-n+2),
.selectors3:column(p, li, dt, dd),
.selectors3:nth-column(2n+1),
.selectors3:nth-last-column(-n+2) {
display: auto;
}
foo | h1,
.selectors4:dir(ltr),
.selectors4:active-drop-target,
.selectors4:valid-drop-target,
.selectors4:invalid-drop-target,
.selectors4:placeholder-shown,
.selectors4:user-error {
display: auto;
}