mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibWeb: Use ValueID for media-query identifiers
This commit is contained in:
parent
0371d33132
commit
fd47460141
4 changed files with 26 additions and 24 deletions
|
@ -1187,8 +1187,10 @@ Optional<MediaFeatureValue> Parser::parse_media_feature_value(TokenStream<StyleC
|
|||
}
|
||||
|
||||
// `<ident>`
|
||||
if (first.is(Token::Type::Ident) && !tokens.has_next_token())
|
||||
return MediaFeatureValue(first.token().ident());
|
||||
if (first.is(Token::Type::Ident)) {
|
||||
if (auto ident = value_id_from_string(first.token().ident()); ident != ValueID::Invalid)
|
||||
return MediaFeatureValue(ident);
|
||||
}
|
||||
|
||||
// `<ratio>`
|
||||
// Note that a single <number> is a valid <ratio>, but it gets parsed above as a <number>.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue