mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibWeb: Allow CSS at-rules to have an empty prelude
I don't see any indication in the spec that an empty prelude should be disallowed. This fixes rules like `@font-face{...}` (note the absence of whitespace before the `{`.)
This commit is contained in:
parent
f64c175960
commit
c5a19a4d55
1 changed files with 1 additions and 1 deletions
|
@ -2608,7 +2608,7 @@ CSSRule* Parser::convert_to_rule(NonnullRefPtr<Rule> rule)
|
|||
if (has_ignored_vendor_prefix(rule->at_rule_name())) {
|
||||
return {};
|
||||
} else if (rule->at_rule_name().equals_ignoring_case("font-face"sv)) {
|
||||
if (rule->prelude().is_empty() || !rule->block() || !rule->block()->is_curly()) {
|
||||
if (!rule->block() || !rule->block()->is_curly()) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "@font-face rule is malformed.");
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue