Skip to content

Commit 708f7af

Browse files
committed
Prefer CSS spec
1 parent 7bfab47 commit 708f7af

File tree

4 files changed

+58
-59
lines changed

4 files changed

+58
-59
lines changed

after/syntax/css/fill-stroke-3.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
syn match cssFontProp contained "\<\(fill\|stroke\)-\(break\|color\|image\|origin\|position\|size\|repeat\)\>"
2-
syn match cssFontProp contained "\<stroke-\(align\|dash-\(corner\|justify\)\)\>"
3-
syn keyword cssFontAttr contained stupid compress dashes gaps
1+
syn match cssFontProp contained "\<\(fill\|stroke\)\(-\(break\|color\|image\|origin\|position\|size\|repeat\|opacity\)\)\=\>"
2+
syn match cssFontProp contained "\<fill-rule\>"
3+
syn match cssFontProp contained "\<stroke-\(width\|align\|line\(cap\|join\)\|miterlimit\|dash\(array\|offset\)\|dash-\(corner\|justify\)\)\>"
4+
syn keyword cssFontAttr contained butt arcs stupid compress dashes gaps
5+
syn match cssFontAttr contained "\<bounding-box\>"

after/syntax/css/svg2.vim

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@ syn keyword cssTagName animate animateMotion animateTransform circle clipPath cu
22

33
syn keyword cssFontProp contained cx cy d r rx ry x y
44
syn match cssFontProp contained "\<color-\(interpolation\|rendering\)\>"
5-
syn match cssFontProp contained "\<fill\(-\(opacity\|rule\)\)\=\>"
65
syn match cssFontProp contained "\<image-rendering\>"
76
syn match cssFontProp contained "\<marker-\(end\|mid\|start\)\>"
87
syn match cssFontProp contained "\<pointer-events\>"
98
syn match cssFontProp contained "\<shape-rendering\>"
109
syn match cssFontProp contained "\<solid-\(color\|opacity\)\>"
1110
syn match cssFontProp contained "\<stop-\(color\|opacity\)\>"
12-
syn match cssFontProp contained "\<stroke\(-\(dash\(array\|offset\)\|line\(cap\|join\)\|miterlimit\|opacity\|width\)\)\=\>"
1311
syn match cssFontProp contained "\<text-anchor\>"
1412
syn match cssFontProp contained "\<vector-effect\>"
1513

16-
syn keyword cssFontAttr contained arcs butt crispEdges geometricPrecision optimizeQuality painted stroke viewport visibleFill visiblePainted visibleStroke
17-
syn match cssFontAttr contained "\<bounding-box\>"
14+
syn keyword cssFontAttr contained crispEdges geometricPrecision optimizeQuality painted stroke viewport visibleFill visiblePainted visibleStroke
1815
syn match cssFontAttr contained "\<context-\(fill\|stroke\)\>"
1916
syn match cssFontAttr contained "\<fixed-position\>"
2017
syn match cssFontAttr contained "\<miter\(-clip\)\=\>"

test/test.css

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,24 @@
224224
}
225225

226226
.fill-stroke-3 {
227-
fill-break: stupid;
228-
fill-color: compress;
229-
fill-image: dashes;
230-
fill-origin: gaps;
231-
fill-position: auto;
232-
fill-size: auto;
227+
fill-rule: butt;
228+
fill-break: arcs;
229+
fill-color: stupid;
230+
fill-image: compress;
231+
fill-origin: dashes;
232+
fill-position: gaps;
233+
fill-size: bounding-box;
233234
fill-repeat: auto;
235+
fill: auto;
236+
fill-opacity: auto;
237+
stroke-width: auto;
234238
stroke-align: auto;
239+
stroke-linecap: auto;
240+
stroke-linejoin: auto;
241+
stroke-miterlimit: auto;
235242
stroke-break: auto;
243+
stroke-dasharray: auto;
244+
stroke-dashoffset: auto;
236245
stroke-dash-corner: auto;
237246
stroke-dash-justify: auto;
238247
stroke-color: auto;
@@ -241,6 +250,8 @@
241250
stroke-position: auto;
242251
stroke-size: auto;
243252
stroke-repeat: auto;
253+
stroke: auto;
254+
stroke-opacity: auto;
244255
}
245256

246257
.filter-effects-1 {
@@ -874,18 +885,15 @@ tspan,
874885
unknown,
875886
use,
876887
view {
877-
color-interpolation: arcs;
878-
color-rendering: butt;
879-
cx: crispEdges;
880-
cy: geometricPrecision;
881-
d: optimizeQuality;
882-
fill-opacity: painted;
883-
fill-rule: stroke;
884-
fill: viewport;
888+
color-interpolation: crispEdges;
889+
color-rendering: geometricPrecision;
890+
cx: optimizeQuality;
891+
cy: painted;
892+
d: visiblePainted;
885893
image-rendering: visibleFill;
886-
marker-end: visiblePainted;
887-
marker-mid: visibleStroke;
888-
marker-start: bounding-box;
894+
marker-end: stroke;
895+
marker-mid: viewport;
896+
marker-start: visibleStroke;
889897
pointer-events: context-fill;
890898
r: context-stroke;
891899
rx: fixed-position;
@@ -895,15 +903,7 @@ view {
895903
solid-opacity: non-scaling-size;
896904
stop-color: non-rotation;
897905
stop-opacity: child(1);
898-
stroke-dasharray: icc-color(foo);
899-
stroke-dashoffset: auto;
900-
stroke-linecap: auto;
901-
stroke-linejoin: auto;
902-
stroke-miterlimit: auto;
903-
stroke-opacity: auto;
904-
stroke-width: auto;
905-
stroke: auto;
906-
text-anchor: auto;
906+
text-anchor: icc-color(foo);
907907
vector-effect: auto;
908908
x: auto;
909909
y: auto;

test/test.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,24 @@
253253
</style>
254254
<style>
255255
.fill-stroke-3 {
256-
fill-break: stupid;
257-
fill-color: compress;
258-
fill-image: dashes;
259-
fill-origin: gaps;
260-
fill-position: auto;
261-
fill-size: auto;
256+
fill-rule: butt;
257+
fill-break: arcs;
258+
fill-color: stupid;
259+
fill-image: compress;
260+
fill-origin: dashes;
261+
fill-position: gaps;
262+
fill-size: bounding-box;
262263
fill-repeat: auto;
264+
fill: auto;
265+
fill-opacity: auto;
266+
stroke-width: auto;
263267
stroke-align: auto;
268+
stroke-linecap: auto;
269+
stroke-linejoin: auto;
270+
stroke-miterlimit: auto;
264271
stroke-break: auto;
272+
stroke-dasharray: auto;
273+
stroke-dashoffset: auto;
265274
stroke-dash-corner: auto;
266275
stroke-dash-justify: auto;
267276
stroke-color: auto;
@@ -270,6 +279,8 @@
270279
stroke-position: auto;
271280
stroke-size: auto;
272281
stroke-repeat: auto;
282+
stroke: auto;
283+
stroke-opacity: auto;
273284
}
274285
</style>
275286
<style>
@@ -957,18 +968,15 @@
957968
unknown,
958969
use,
959970
view {
960-
color-interpolation: arcs;
961-
color-rendering: butt;
962-
cx: crispEdges;
963-
cy: geometricPrecision;
964-
d: optimizeQuality;
965-
fill-opacity: painted;
966-
fill-rule: stroke;
967-
fill: viewport;
971+
color-interpolation: crispEdges;
972+
color-rendering: geometricPrecision;
973+
cx: optimizeQuality;
974+
cy: painted;
975+
d: visiblePainted;
968976
image-rendering: visibleFill;
969-
marker-end: visiblePainted;
970-
marker-mid: visibleStroke;
971-
marker-start: bounding-box;
977+
marker-end: stroke;
978+
marker-mid: viewport;
979+
marker-start: visibleStroke;
972980
pointer-events: context-fill;
973981
r: context-stroke;
974982
rx: fixed-position;
@@ -978,15 +986,7 @@
978986
solid-opacity: non-scaling-size;
979987
stop-color: non-rotation;
980988
stop-opacity: child(1);
981-
stroke-dasharray: icc-color(foo);
982-
stroke-dashoffset: auto;
983-
stroke-linecap: auto;
984-
stroke-linejoin: auto;
985-
stroke-miterlimit: auto;
986-
stroke-opacity: auto;
987-
stroke-width: auto;
988-
stroke: auto;
989-
text-anchor: auto;
989+
text-anchor: icc-color(foo);
990990
vector-effect: auto;
991991
x: auto;
992992
y: auto;

0 commit comments

Comments
 (0)