diff --git a/Libraries/LibWeb/CSS/Parser/ValueParsing.cpp b/Libraries/LibWeb/CSS/Parser/ValueParsing.cpp index 8f0590f86ef..4127436b97d 100644 --- a/Libraries/LibWeb/CSS/Parser/ValueParsing.cpp +++ b/Libraries/LibWeb/CSS/Parser/ValueParsing.cpp @@ -3842,6 +3842,12 @@ RefPtr Parser::parse_calculated_value(ComponentValue const& // caller to handle the resolved value being a percentage. return CalculationContext {}; } + if (function.name.is_one_of_ignoring_ascii_case( + "rgb"sv, "rgba"sv, "hsl"sv, "hsla"sv, + "hwb"sv, "lab"sv, "lch"sv, "oklab"sv, "oklch"sv, + "color"sv)) { + return CalculationContext {}; + } // FIXME: Add other functions that provide a context for resolving values return {}; }, diff --git a/Tests/LibWeb/Ref/expected/css/gradient-calc-inside-stop-color-ref.html b/Tests/LibWeb/Ref/expected/css/gradient-calc-inside-stop-color-ref.html new file mode 100644 index 00000000000..89d2057d0a5 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/css/gradient-calc-inside-stop-color-ref.html @@ -0,0 +1,11 @@ + + + +
+ diff --git a/Tests/LibWeb/Ref/input/css/gradient-calc-inside-stop-color.html b/Tests/LibWeb/Ref/input/css/gradient-calc-inside-stop-color.html new file mode 100644 index 00000000000..11db96c9b09 --- /dev/null +++ b/Tests/LibWeb/Ref/input/css/gradient-calc-inside-stop-color.html @@ -0,0 +1,12 @@ + + + + +
+