From 7e78e4b23233b17cbad3c501f5c128254d82db40 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 15 Dec 2020 12:03:17 +0100 Subject: [PATCH] LibWeb: Make CSS "background: none" work again This broke since "none" is now always going to be an identifier value. --- Libraries/LibWeb/CSS/StyleResolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/StyleResolver.cpp b/Libraries/LibWeb/CSS/StyleResolver.cpp index f0bf42782e..5eb4091e2f 100644 --- a/Libraries/LibWeb/CSS/StyleResolver.cpp +++ b/Libraries/LibWeb/CSS/StyleResolver.cpp @@ -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(value).id() == CSS::ValueID::None) { style.set_property(CSS::PropertyID::BackgroundColor, ColorStyleValue::create(Color::Transparent)); return; }