1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00

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

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;
}