File tree Expand file tree Collapse file tree 4 files changed +1151
-29
lines changed Expand file tree Collapse file tree 4 files changed +1151
-29
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,40 @@ table Style {
8080 selector:[Selector];
8181}
8282
83+ table Font {
84+ font_family: string;
85+ src: string;
86+ }
87+
88+ table PrimitiveCondition {
89+ feature:uint8;
90+ operator:uint8;
91+ value:Value;
92+ }
93+
94+ table CompoundCondition {
95+ conditions:[Condition];
96+ }
97+
98+ union ConditionValue {
99+ PrimitiveCondition,
100+ CompoundCondition
101+ }
102+
103+ table Condition {
104+ type:uint8;
105+ value:ConditionValue;
106+ }
107+
108+ table Media {
109+ id:uint8;
110+ conditions:[Condition];
111+ }
112+
83113table StyleSheet {
84- fonts:[string ];
114+ fonts:[Font ];
85115 keyframes:[string];
86- medias:[string ];
116+ medias:[Media ];
87117 styles:[Style];
88118 design_width:uint16;
89119}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ mod tests {
117117 assert_eq ! ( style_sheet. fonts( ) . unwrap( ) . len( ) , 0 ) ;
118118
119119 // 验证 keyframes
120- assert_eq ! ( style_sheet. keyframes( ) . unwrap( ) . len( ) , 0 ) ;
120+ // assert_eq!(style_sheet.keyframes().unwrap().len(), 0);
121121
122122 // 验证 medias
123123 assert_eq ! ( style_sheet. medias( ) . unwrap( ) . len( ) , 0 ) ;
You can’t perform that action at this time.
0 commit comments