@@ -14,6 +14,7 @@ const MEDIA_SYM: &str = "@media";
14
14
const FONT_FACE_SYM : & str = "@font-face" ;
15
15
const KEY_FRAMES : & str = "@keyframes" ;
16
16
const W_KEY_FRAMES : & str = "@-webkit-keyframes" ;
17
+ const M_KEY_FRAMES : & str = "@-moz-keyframes" ;
17
18
const O_KEY_FRAMES : & str = "@-o-keyframes" ;
18
19
const SUPPORTS : & str = "@supports" ;
19
20
@@ -251,9 +252,10 @@ impl<'a> Parser<'a> {
251
252
}
252
253
253
254
pub fn parse_declaration ( & mut self ) {
254
- if self . check_token_type ( TokenType :: IdentToken ) {
255
+ if self . check_token_type ( TokenType :: IdentToken )
256
+ || self . check_token_type ( TokenType :: Asterisk )
257
+ {
255
258
self . builder . start_node ( TokenType :: Declaration ) ;
256
-
257
259
self . parse_property ( ) ;
258
260
259
261
self . check_token_and_advance ( TokenType :: Colon ) ;
@@ -266,7 +268,12 @@ impl<'a> Parser<'a> {
266
268
267
269
pub fn parse_property ( & mut self ) {
268
270
self . builder . start_node ( TokenType :: Property ) ;
271
+ //兼容ie
272
+ if self . check_token_type ( TokenType :: Asterisk ) {
273
+ self . advance ( ) ;
274
+ }
269
275
self . check_token_and_advance ( TokenType :: IdentToken ) ;
276
+
270
277
self . builder . finish_node ( ) ;
271
278
}
272
279
@@ -393,6 +400,7 @@ impl<'a> Parser<'a> {
393
400
|| self . token_eq_str ( & token, KEY_FRAMES )
394
401
|| self . token_eq_str ( & token, W_KEY_FRAMES )
395
402
|| self . token_eq_str ( & token, O_KEY_FRAMES )
403
+ || self . token_eq_str ( & token, M_KEY_FRAMES )
396
404
|| self . token_eq_str ( & token, SUPPORTS )
397
405
{
398
406
self . parse_nest_at_rule ( ) ;
0 commit comments