File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,8 @@ var Properties = {
323
323
"font-weight" : "normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit" ,
324
324
325
325
//G
326
+ "glyph-orientation-horizontal" : "<glyph-angle> | inherit" ,
327
+ "glyph-orientation-vertical" : "auto | <glyph-angle> | inherit" ,
326
328
"grid" : 1 ,
327
329
"grid-area" : 1 ,
328
330
"grid-auto-columns" : 1 ,
@@ -492,6 +494,7 @@ var Properties = {
492
494
"target-name" : 1 ,
493
495
"target-new" : 1 ,
494
496
"target-position" : 1 ,
497
+ "text-anchor" : "start | middle | end | inherit" ,
495
498
"text-align" : "left | right | center | justify | match-parent | start | end | inherit" ,
496
499
"text-align-last" : 1 ,
497
500
"text-decoration" : 1 ,
Original file line number Diff line number Diff line change @@ -148,6 +148,10 @@ var ValidationTypes = {
148
148
return part . type == "angle" ;
149
149
} ,
150
150
151
+ "<glyph-angle>" : function ( part ) {
152
+ return part . type == "angle" && part . units == 'deg' ;
153
+ } ,
154
+
151
155
"<uri>" : function ( part ) {
152
156
return part . type == "uri" ;
153
157
} ,
Original file line number Diff line number Diff line change 809
809
} ) ) ;
810
810
} ) ;
811
811
812
+ suite . add ( new ValidationTestCase ( {
813
+ property : "glyph-orientation-horizontal" ,
814
+
815
+ valid : [
816
+ "-43deg" ,
817
+ ".7deg" ,
818
+ "90deg" ,
819
+ "521deg" ,
820
+ "inherit"
821
+ ] ,
822
+
823
+ invalid : {
824
+ "auto" : "Expected (<glyph-angle> | inherit) but found 'auto'." ,
825
+ "70rad" : "Expected (<glyph-angle> | inherit) but found '70rad'." ,
826
+ "4grad" : "Expected (<glyph-angle> | inherit) but found '4grad'."
827
+ }
828
+ } ) ) ;
829
+
830
+ suite . add ( new ValidationTestCase ( {
831
+ property : "glyph-orientation-vertical" ,
832
+
833
+ valid : [
834
+ "auto" ,
835
+ "-43deg" ,
836
+ ".7deg" ,
837
+ "90deg" ,
838
+ "521deg" ,
839
+ "inherit"
840
+ ] ,
841
+
842
+ invalid : {
843
+ "70rad" : "Expected (<glyph-angle> | inherit) but found '70rad'." ,
844
+ "4grad" : "Expected (<glyph-angle> | inherit) but found '4grad'."
845
+ }
846
+ } ) ) ;
847
+
848
+ suite . add ( new ValidationTestCase ( {
849
+ property : "text-anchor" ,
850
+
851
+ valid : [
852
+ "start" ,
853
+ "middle" ,
854
+ "end" ,
855
+ "inherit"
856
+ ] ,
857
+
858
+ invalid : {
859
+ "foo" : "Expected (start | middle | end | inherit) but found 'foo'."
860
+ }
861
+ } ) ) ;
862
+
812
863
suite . add ( new ValidationTestCase ( {
813
864
property : "text-align" ,
814
865
You can’t perform that action at this time.
0 commit comments