Add css-color-4.vim

See also: https://www.w3.org/TR/2016/WD-css-color-4-20160705/
This commit is contained in:
Kyo Nagashima
2016-07-06 09:23:39 +09:00
parent eacc98e57a
commit 519acb02ec
5 changed files with 39 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
syn match cssColorProp contained "\<color-adjust\>"
syn keyword cssColor contained rebeccapurple
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(hwb\|lab\|lch\|gray\|color\|device-cmyk\|color-mod\=\)\s*(" end=")" oneline keepend
syn match cssFontDescriptor "@color-profile\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl

View File

@@ -1,3 +1,3 @@
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsla\=\)\s*(" end=")" oneline keepend
syn keyword cssColorProp contained opacity
syn match cssColor contained "\<currentColor\>"
syn match cssColor contained "\<currentcolor\>"

View File

@@ -5,6 +5,7 @@ syn include @htmlCss syntax/css/css-break-3.vim
syn include @htmlCss syntax/css/css-cascade-3.vim
syn include @htmlCss syntax/css/css-cascade-4.vim
syn include @htmlCss syntax/css/css-content-3.vim
syn include @htmlCss syntax/css/css-color-4.vim
syn include @htmlCss syntax/css/css-counter-styles-3.vim
syn include @htmlCss syntax/css/css-device-adapt-1.vim
syn include @htmlCss syntax/css/css-display-3.vim

View File

@@ -90,7 +90,22 @@
.color {
opacity: rgba(0, 0, 0, 1);
display: hsla(0, 0, 0, 1);
display: currentColor;
display: currentcolor;
}
@color-profile swopc {
src: url('http://example.org/swop-coated.icc');
}
.color-4 {
color-adjust: rebeccapurple;
display: hwb(120deg, 44%, 50%);
display: lab(1 2 3);
display: lch(4 5 6);
display: gray(50%);
display: color(swopc, 0 206 190 77);
display: device-cmyk(0, 81%, 81%, 30%);
display: color-mod(#112233 tint(50%));
}
@supports (display: auto) or

View File

@@ -108,7 +108,23 @@
.color {
opacity: rgba(0, 0, 0, 1);
display: hsla(0, 0, 0, 1);
display: currentColor;
display: currentcolor;
}
</style>
<style>
@color-profile swopc {
src: url('http://example.org/swop-coated.icc');
}
.color-4 {
color-adjust: rebeccapurple;
display: hwb(120deg, 44%, 50%);
display: lab(1 2 3);
display: lch(4 5 6);
display: gray(50%);
display: color(swopc, 0 206 190 77);
display: device-cmyk(0, 81%, 81%, 30%);
display: color-mod(#112233 tint(50%));
}
</style>
<style>