1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibWeb: Resolve style values from the element inline style

This will set the background color in the project header on GitHub! :^)
This commit is contained in:
Karol Kosek 2022-03-26 16:06:31 +01:00 committed by Andreas Kling
parent 0934573deb
commit 44bfca369a

View file

@ -571,7 +571,12 @@ void StyleComputer::cascade_declarations(StyleProperties& style, DOM::Element& e
for (auto const& property : inline_style->properties()) {
if (important != property.important)
continue;
set_property_expanding_shorthands(style, property.property_id, property.value, m_document);
auto property_value = property.value;
if (property.value->is_unresolved()) {
if (auto resolved = resolve_unresolved_style_value(element, property.property_id, property.value->as_unresolved()))
property_value = resolved.release_nonnull();
}
set_property_expanding_shorthands(style, property.property_id, property_value, m_document);
}
}
}