LibWeb: Prefer transitioned property values over important

CSS transitions have a higher precedence in the cascade than important
properties
This commit is contained in:
Callum Law 2025-11-16 21:16:01 +13:00 committed by Sam Atkins
parent 9afb523be3
commit 63538c8a75
Notes: github-actions[bot] 2025-11-28 16:17:06 +00:00
8 changed files with 89 additions and 18 deletions

View file

@ -860,7 +860,7 @@ CSS::RequiredInvalidationAfterStyleChange Element::recompute_inherited_style()
if (computed_properties->is_animated_property_inherited(property_id) || !computed_properties->animated_property_values().contains(property_id)) {
if (auto new_animated_value = CSS::StyleComputer::get_animated_inherit_value(property_id, { *this }); new_animated_value.has_value())
computed_properties->set_animated_property(property_id, new_animated_value.value(), CSS::ComputedProperties::Inherited::Yes);
computed_properties->set_animated_property(property_id, new_animated_value->value, new_animated_value->is_result_of_transition, CSS::ComputedProperties::Inherited::Yes);
else if (computed_properties->animated_property_values().contains(property_id))
computed_properties->remove_animated_property(property_id);
}