Skip to content

Commit

Permalink
fix(css_parser): fix Parser is no longer progressing #3284 (#3433)
Browse files Browse the repository at this point in the history
  • Loading branch information
denbezrukov authored Jul 14, 2024
1 parent f80f505 commit eaa5731
Show file tree
Hide file tree
Showing 3 changed files with 631 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/biome_css_parser/src/syntax/at_rule/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,12 @@ fn parse_any_media_query(p: &mut CssParser) -> ParsedSyntax {
parse_any_media_type_query(p)
} else if is_at_grit_metavariable(p) {
parse_grit_metavariable(p)
} else {
} else if is_at_any_media_condition(p) {
let m = p.start();
parse_any_media_condition(p).ok(); // TODO handle error
Present(m.complete(p, CSS_MEDIA_CONDITION_QUERY))
} else {
Absent
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@media (--umrel-breakpoints$-breakpoint) {}

@media only screen and width <= 500px {
.left-block {
width: 100%;
}
}

@media only screen and (width 500px) {
.left-block {
width: 100%;
}
}

@media only screen and (width => 500px) {
.left-block {
width: 100%;
}
}
Loading

0 comments on commit eaa5731

Please sign in to comment.