From 19cc3af11bd2c52dfc015060b5c3aa66ec67e588 Mon Sep 17 00:00:00 2001 From: Kyo Nagashima Date: Mon, 16 Jun 2014 23:27:31 +0900 Subject: [PATCH] Highlight `@counter-style` region --- after/syntax/css/css-counter-styles-3.vim | 7 +++++-- test/test.css | 25 ++++++++++++++--------- test/test.html | 25 ++++++++++++++--------- 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/after/syntax/css/css-counter-styles-3.vim b/after/syntax/css/css-counter-styles-3.vim index db42f52..e4d632c 100644 --- a/after/syntax/css/css-counter-styles-3.vim +++ b/after/syntax/css/css-counter-styles-3.vim @@ -1,7 +1,10 @@ -" TODO: create cssCounterStyleDescriptor for `@counter-style` descriptor -syn keyword cssGeneratedContentProp contained negative prefix suffix range pad fallback +" TODO: create cssCounterStyleDescriptor for `@counter-style` descriptors +syn region cssInclude start=/@counter-style\>/ end=/\ze{/ skipwhite skipnl contains=css.*Prop,css.*Attr,cssValueInteger,cssValueLength,cssMediaKeyword,cssVendor,cssIncludeKeyword,cssComment nextgroup=cssMediaBlock +syn keyword cssGeneratedContentProp contained system negative prefix suffix range pad fallback syn match cssGeneratedContentProp contained "\<\(additive-\)\=symbols\>" syn match cssGeneratedContentProp contained "\" +syn keyword cssGeneratedContentAttr contained cyclic symbolic numeric additive override +syn match cssGeneratedContentAttr contained "\" syn match cssGeneratedContentAttr contained "\" syn match cssGeneratedContentAttr contained "\" syn match cssGeneratedContentAttr contained "\" diff --git a/test/test.css b/test/test.css index dcca463..e45430d 100644 --- a/test/test.css +++ b/test/test.css @@ -104,16 +104,21 @@ display: last; } -.counter-styles { - negative: disclosure-open; - prefix: disclosure-closed; - suffix: simp-chinese-informal; - range: simp-chinese-formal; - pad: trad-chinese-informal; - fallback: trad-chinese-formal; - symbols: ethiopic-numeric; - additive-symbols: symbols("*" "\2020" "\2021" "\A7"); - speak-as: auto; +@counter-style counter-style { + system: cyclic; + negative: symbolic; + prefix: numeric; + suffix: additive; + range: override; + pad: cjk-decimal; + fallback: disclosure-open; + symbols: disclosure-closed; + additive-symbols: simp-chinese-informal; + speak-as: simp-chinese-formal; + display: trad-chinese-informal; + display: trad-chinese-formal; + display: ethiopic-numeric; + display: symbols("*" "\2020" "\2021" "\A7"); } .display { diff --git a/test/test.html b/test/test.html index 387ce50..1d35466 100644 --- a/test/test.html +++ b/test/test.html @@ -114,16 +114,21 @@ display: last; } - .counter-styles { - negative: disclosure-open; - prefix: disclosure-closed; - suffix: simp-chinese-informal; - range: simp-chinese-formal; - pad: trad-chinese-informal; - fallback: trad-chinese-formal; - symbols: ethiopic-numeric; - additive-symbols: symbols("*" "\2020" "\2021" "\A7"); - speak-as: auto; + @counter-style counter-style { + system: cyclic; + negative: symbolic; + prefix: numeric; + suffix: additive; + range: override; + pad: cjk-decimal; + fallback: disclosure-open; + symbols: disclosure-closed; + additive-symbols: simp-chinese-informal; + speak-as: simp-chinese-formal; + display: trad-chinese-informal; + display: trad-chinese-formal; + display: ethiopic-numeric; + display: symbols("*" "\2020" "\2021" "\A7"); } .display {