LibWeb: Make CSS "background: none" work again

This broke since "none" is now always going to be an identifier value.
This commit is contained in:
Andreas Kling 2020-12-15 12:03:17 +01:00
parent d8c533f588
commit 7e78e4b232
Notes: sideshowbarker 2024-07-19 00:49:04 +09:00

View file

@ -382,7 +382,7 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
}
if (property_id == CSS::PropertyID::Background) {
if (value.to_string() == "none") {
if (value.is_identifier() && static_cast<const IdentifierStyleValue&>(value).id() == CSS::ValueID::None) {
style.set_property(CSS::PropertyID::BackgroundColor, ColorStyleValue::create(Color::Transparent));
return;
}