Skip to content

Commit 2afbd47

Browse files
committed
Fix transitions that use var() never starting
1 parent 2cd2886 commit 2afbd47

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Source/Core/ElementStyle.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,17 @@ void ElementStyle::TransitionPropertyChanges(const PropertySources& sources, Pro
389389
const Property* transition_property = GetLocalProperty(PropertyId::Transition, sources.inline_properties, new_definition);
390390
if (!transition_property)
391391
return;
392+
Property transition_property_storage;
393+
if (transition_property->unit == Unit::VAR_EXPRESSION)
394+
{
395+
SmallUnorderedSet<String> transition_variable_dependencies;
396+
std::optional<PropertyDictionary> transition_substituted_shorthands;
397+
PropertySources transition_sources{sources.element, new_definition, sources.inline_properties};
398+
transition_property = ResolveVariablesWithShorthandExpansion(transition_sources, PropertyId::Transition, transition_property,
399+
transition_substituted_shorthands, transition_variable_dependencies, transition_property_storage);
400+
if (!transition_property)
401+
return;
402+
}
392403
if (transition_property->value.GetType() != Variant::TRANSITIONLIST)
393404
return;
394405

0 commit comments

Comments
 (0)