Skip to content

Commit 05a535f

Browse files
committed
Follow changes in WD-css-fonts-4-20170711
See also: http://www.w3.org/TR/2017/WD-css-fonts-4-20170711/
1 parent 789b3fa commit 05a535f

File tree

3 files changed

+38
-9
lines changed

3 files changed

+38
-9
lines changed

after/syntax/css/css-fonts-4.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
syn match cssFontProp contained "\<font-\(min\|max\)-size\>"
2+
syn match cssFontProp contained "\<font-display\>"
13
syn match cssFontProp contained "\<font-optical-sizing\>"
24
syn match cssFontProp contained "\<font-variation-settings\>"
3-
syn keyword cssFontAttr contained emoji math fangsong
5+
syn match cssFontProp contained "\<font-palette\>"
6+
syn match cssFontProp contained "\<font-presentation\>"
7+
syn match cssFontProp contained "\<base-palette\>"
8+
syn keyword cssFontAttr contained emoji math fangsong infinity swap fallback optional light dark
49
syn match cssFontAttr contained "\<system-ui\>"
10+
syn region cssInclude start=/@font-palette-values\>/ end=/\ze{/ skipwhite skipnl contains=css.*Prop,css.*Attr,cssValueInteger,cssValueLength,cssMediaKeyword,cssVendor,cssIncludeKeyword,cssComment nextgroup=cssMediaBlock

test/test.css

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@
285285
display: auto;
286286
}
287287

288+
.fonts-4 {
289+
}
290+
288291
.fonts-3 {
289292
font-feature-settings: common-ligatures;
290293
font-kerning: no-common-ligatures;
@@ -324,10 +327,20 @@
324327
}
325328

326329
.fonts-4 {
327-
font-optical-sizing: emoji;
328-
font-variation-settings: math;
329-
display: fangsong;
330-
display: system-ui;
330+
font-min-size: emoji;
331+
font-max-size: math;
332+
font-display: fangsong;
333+
font-optical-sizing: system-ui;
334+
font-variation-settings: infinity;
335+
font-palette: swap;
336+
font-presentation: fallback;
337+
display: optional;
338+
display: light;
339+
display: dark;
340+
}
341+
342+
@font-palette-values Test {
343+
base-palette: 1;
331344
}
332345

333346
.gcpm-3::footnote-call,

test/test.html

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,20 @@
358358
</style>
359359
<style>
360360
.fonts-4 {
361-
font-optical-sizing: emoji;
362-
font-variation-settings: math;
363-
display: fangsong;
364-
display: system-ui;
361+
font-min-size: emoji;
362+
font-max-size: math;
363+
font-display: fangsong;
364+
font-optical-sizing: system-ui;
365+
font-variation-settings: infinity;
366+
font-palette: swap;
367+
font-presentation: fallback;
368+
display: optional;
369+
display: light;
370+
display: dark;
371+
}
372+
373+
@font-palette-values Test {
374+
base-palette: 1;
365375
}
366376
</style>
367377
<style>

0 commit comments

Comments
 (0)