From 5dc940911d5871707c2bbb0c589c2ccc992e12c5 Mon Sep 17 00:00:00 2001 From: Kyo Nagashima Date: Thu, 3 Nov 2022 07:32:28 +0900 Subject: [PATCH] Update color-4.vim and color-5.vim https://www.w3.org/TR/2022/CRD-css-color-4-20221101/ --- after/syntax/css/color-4.vim | 5 ++--- after/syntax/css/color-5.vim | 5 ++++- test/test.css | 19 +++++++++++-------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/after/syntax/css/color-4.vim b/after/syntax/css/color-4.vim index 88a38f2..8f63b6b 100644 --- a/after/syntax/css/color-4.vim +++ b/after/syntax/css/color-4.vim @@ -1,3 +1,2 @@ -syn keyword cssFontAttr contained perceptual accentcolor accentcolortext relative-colorimetric absolute-colorimetric -syn region cssFunction contained matchgroup=cssFunctionName start="\<\(hwb\|lab\|lch\|color\|device-cmyk\=\)\s*(" end=")" oneline keepend -syn match cssFontDescriptor "@color-profile\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl +syn keyword cssFontAttr contained accentcolor accentcolortext +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(hwb\|lab\|lch\|oklab\|oklch\|color\=\)\s*(" end=")" oneline keepend diff --git a/after/syntax/css/color-5.vim b/after/syntax/css/color-5.vim index abbf399..ae741ba 100644 --- a/after/syntax/css/color-5.vim +++ b/after/syntax/css/color-5.vim @@ -1 +1,4 @@ -syn region cssFunction contained matchgroup=cssFunctionName start="\" nextgroup=cssFontDescriptorBlock skipwhite skipnl diff --git a/test/test.css b/test/test.css index de5a142..40fc0d2 100644 --- a/test/test.css +++ b/test/test.css @@ -83,21 +83,24 @@ display: hwb(120deg, 44%, 50%); display: lab(1 2 3); display: lch(4 5 6); + display: oklab(1 2 3); + display: oklch(4 5 6); display: color(swopc, 0 206 190 77); - display: device-cmyk(0, 81%, 81%, 30%); - display: relative-colorimetric; - display: absolute-colorimetric; - display: perceptual; display: accentcolor; display: accentcolortext; } -@color-profile swopc { - src: url("http://example.org/swop-coated.icc"); +.color-5 { + display: device-cmyk(0, 81%, 81%, 30%); + display: color-mix(red yellow 65%); } -.color-5 { - display: color-mix(red yellow 65%); +@color-profile swopc { + src: url("http://example.org/swop-coated.icc"); + components: auto; + display: relative-colorimetric; + display: absolute-colorimetric; + display: perceptual; } .color-adjust-1 {