diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp index ad45162c46..0c0baddd1d 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp @@ -87,9 +87,9 @@ bool PropertyOwningCSSStyleDeclaration::set_property(PropertyID property_id, Str } m_properties.append(CSS::StyleProperty { + .important = false, .property_id = property_id, .value = new_value.release_nonnull(), - .important = false, }); return true; } diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h index 92db88971e..7741e7fbb4 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h @@ -14,10 +14,10 @@ namespace Web::CSS { struct StyleProperty { + bool important { false }; CSS::PropertyID property_id; NonnullRefPtr value; String custom_name {}; - bool important { false }; }; class CSSStyleDeclaration diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index a20dc20391..de28da9894 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -1834,9 +1834,9 @@ Optional Parser::convert_to_style_property(StyleDeclarationRule c } if (property_id == PropertyID::Custom) { - return StyleProperty { property_id, value.release_value(), declaration.m_name, declaration.m_important }; + return StyleProperty { declaration.m_important, property_id, value.release_value(), declaration.m_name }; } else { - return StyleProperty { property_id, value.release_value(), {}, declaration.m_important }; + return StyleProperty { declaration.m_important, property_id, value.release_value(), {} }; } }