From a37b31b9a74ca1eeafa5ec3cee8da6e40485f682 Mon Sep 17 00:00:00 2001 From: Kyo Nagashima Date: Wed, 14 May 2014 01:54:06 +0900 Subject: [PATCH] Follow WD-css-gcpm-3-20140513 See also: http://www.w3.org/TR/2014/WD-css-gcpm-3-20140513/ NOTE: Some functions are not highlighted correctly. --- after/syntax/css/css-gcpm-3.vim | 7 +++++++ after/syntax/css/css3-gcpm.vim | 6 ------ after/syntax/html.vim | 2 +- test/test.css | 22 +++++++++++++--------- test/test.html | 23 ++++++++++++++--------- 5 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 after/syntax/css/css-gcpm-3.vim delete mode 100644 after/syntax/css/css3-gcpm.vim diff --git a/after/syntax/css/css-gcpm-3.vim b/after/syntax/css/css-gcpm-3.vim new file mode 100644 index 0000000..5452de2 --- /dev/null +++ b/after/syntax/css/css-gcpm-3.vim @@ -0,0 +1,7 @@ +syn keyword cssGeneratedContentProp contained running +syn match cssGeneratedContentProp contained "\" +syn match cssGeneratedContentProp contained "\" +syn match cssGeneratedContentProp contained "\" +syn keyword cssGeneratedContentAttr contained footnote line open closed +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(string\|running\|element\|leader\|target-\(counter\|counters\|text\)\)\s*(" end=")" oneline keepend +syn match cssPseudoClassId contained "\" diff --git a/after/syntax/css/css3-gcpm.vim b/after/syntax/css/css3-gcpm.vim deleted file mode 100644 index 0360ffd..0000000 --- a/after/syntax/css/css3-gcpm.vim +++ /dev/null @@ -1,6 +0,0 @@ -syn region cssFunction contained matchgroup=cssFunctionName start="\<\(target-\(counter\|counters\|text\)\|symbols\)\s*(" end=")" oneline keepend -syn keyword cssGeneratedContentProp contained bleed marks -syn match cssGeneratedContentProp contained "\" -syn match cssGeneratedContentProp contained "\" -syn match cssGeneratedContentProp contained "\" -syn keyword cssGeneratedContentAttr contained open closed crop cross diff --git a/after/syntax/html.vim b/after/syntax/html.vim index 6e2dcf8..80e2994 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -11,7 +11,6 @@ syn include @htmlCss syntax/css/css3-colors.vim syn include @htmlCss syntax/css/css3-content.vim syn include @htmlCss syntax/css/css3-exclusions.vim syn include @htmlCss syntax/css/css3-fonts.vim -syn include @htmlCss syntax/css/css3-gcpm.vim syn include @htmlCss syntax/css/css3-hyperlinks.vim syn include @htmlCss syntax/css/css3-images.vim syn include @htmlCss syntax/css/css3-layout.vim @@ -33,6 +32,7 @@ syn include @htmlCss syntax/css/css3-values.vim syn include @htmlCss syntax/css/css-counter-styles-3.vim syn include @htmlCss syntax/css/css-display-3.vim syn include @htmlCss syntax/css/css-flexbox-1.vim +syn include @htmlCss syntax/css/css-gcpm-3.vim syn include @htmlCss syntax/css/css-grid-1.vim syn include @htmlCss syntax/css/css-line-grid-1.vim syn include @htmlCss syntax/css/css-lists-3.vim diff --git a/test/test.css b/test/test.css index c8810ea..2805e01 100644 --- a/test/test.css +++ b/test/test.css @@ -169,15 +169,19 @@ display: proportional-width; } -.gcpm { - bleed: target-counter(attr(href, url), page, decimal); - marks: target-text(attr(href), content()); - bookmark-label: open; - bookmark-level: closed; - bookmark-state: target-text(attr(href), content()); - bookmark-target: crop; - float-offset: cross; - string-set: auto; +.gcpm::footnote-call, +.gcpm::footnote-marker { + string-set: string(heading, first); + running: running(heading); + footnote-display: element(header); + footnote-policy: footnote; + bookmark-label: line; + bookmark-level: leader('.'); + bookmark-state: target-counter(attr(href url), page); + display: target-counters(lack-of-example); + display: target-text(attr(href url)); + display: open; + display: closed; } .grid-layout { diff --git a/test/test.html b/test/test.html index 73869aa..cdb3326 100644 --- a/test/test.html +++ b/test/test.html @@ -179,15 +179,20 @@ display: proportional-width; } - .gcpm { - bleed: target-counter(attr(href, url), page, decimal); - marks: target-text(attr(href), content()); - bookmark-label: open; - bookmark-level: closed; - bookmark-state: target-text(attr(href), content()); - bookmark-target: crop; - float-offset: cross; - string-set: auto; + + .gcpm::footnote-call, + .gcpm::footnote-marker { + string-set: string(heading, first); + running: running(heading); + footnote-display: element(header); + footnote-policy: footnote; + bookmark-label: line; + bookmark-level: leader('.'); + bookmark-state: target-counter(attr(href url), page); + display: target-counters(lack-of-example); + display: target-text(attr(href url)); + display: open; + display: closed; } .grid-layout {