Explorar el Código

LibWeb: Expand background:none into background-color:transparent

Andreas Kling hace 5 años
padre
commit
0e65fc3a6d
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      Libraries/LibWeb/CSS/StyleResolver.cpp

+ 4 - 0
Libraries/LibWeb/CSS/StyleResolver.cpp

@@ -344,6 +344,10 @@ static void set_property_expanding_shorthands(StyleProperties& style, CSS::Prope
     }
 
     if (property_id == CSS::PropertyID::Background) {
+        if (value.to_string() == "none") {
+            style.set_property(CSS::PropertyID::BackgroundColor, ColorStyleValue::create(Color::Transparent));
+            return;
+        }
         auto parts = split_on_whitespace(value.to_string());
         NonnullRefPtrVector<StyleValue> values;
         for (auto& part : parts) {