Skip to content

Commit ceab6d3

Browse files
committed
LibWeb: Allow multiple values for transition-behavior
1 parent aa8f6fc commit ceab6d3

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue const>> Parser::parse_css_value(Pr
740740
case PropertyID::TransitionProperty:
741741
return parse_all_as(tokens, [this](auto& tokens) { return parse_transition_property_value(tokens); });
742742
case PropertyID::TransitionTimingFunction:
743-
return parse_all_as(tokens, [this](auto& tokens) { return parse_simple_comma_separated_value_list(PropertyID::TransitionTimingFunction, tokens); });
743+
case PropertyID::TransitionBehavior:
744+
return parse_all_as(tokens, [this, property_id](auto& tokens) { return parse_simple_comma_separated_value_list(property_id, tokens); });
744745
case PropertyID::Translate:
745746
return parse_all_as(tokens, [this](auto& tokens) { return parse_translate_value(tokens); });
746747
case PropertyID::Scale:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#foo { transition-behavior: allow-discrete, normal; }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<style>
4+
#foo {
5+
transition-behavior: allow-discrete, normal;
6+
}
7+
</style>
8+
<script src="../include.js"></script>
9+
<script>
10+
test(() => {
11+
println(document.styleSheets[0].cssRules[0].cssText);
12+
});
13+
</script>
14+
</html>

0 commit comments

Comments
 (0)