LibWeb/CSS: Make color-interpolation-method optional in color-mix()
This commit is contained in:
parent
89a391198e
commit
ade44c7ddb
4 changed files with 40 additions and 34 deletions
|
|
@ -2203,6 +2203,7 @@ RefPtr<StyleValue const> Parser::parse_color_mix_function(TokenStream<ComponentV
|
|||
// <custom-color-space> = <dashed-ident>
|
||||
// <hue-interpolation-method> = [ shorter | longer | increasing | decreasing ] hue
|
||||
// <color-interpolation-method> = in [ <rectangular-color-space> | <polar-color-space> <hue-interpolation-method>? | <custom-color-space> ]
|
||||
auto transaction = function_tokens.begin_transaction();
|
||||
function_tokens.discard_whitespace();
|
||||
if (!function_tokens.consume_a_token().is_ident("in"sv))
|
||||
return {};
|
||||
|
|
@ -2243,6 +2244,7 @@ RefPtr<StyleValue const> Parser::parse_color_mix_function(TokenStream<ComponentV
|
|||
return color_space_name;
|
||||
};
|
||||
|
||||
transaction.commit();
|
||||
return ColorMixStyleValue::ColorInterpolationMethod {
|
||||
.color_space = canonical_color_space_name(color_space),
|
||||
.hue_interpolation_method = hue_interpolation_method,
|
||||
|
|
@ -2283,9 +2285,8 @@ RefPtr<StyleValue const> Parser::parse_color_mix_function(TokenStream<ComponentV
|
|||
};
|
||||
};
|
||||
|
||||
// color-mix() = color-mix( <color-interpolation-method> , [ <color> && <percentage [0,100]>? ]#)
|
||||
// color-mix() = color-mix( <color-interpolation-method>? , [ <color> && <percentage [0,100]>? ]#)
|
||||
// FIXME: Update color-mix to accept 1+ colors instead of exactly 2.
|
||||
// FIXME: <color-interpolation-method> is optional in the current spec.
|
||||
auto transaction = tokens.begin_transaction();
|
||||
tokens.discard_whitespace();
|
||||
|
||||
|
|
@ -2296,11 +2297,11 @@ RefPtr<StyleValue const> Parser::parse_color_mix_function(TokenStream<ComponentV
|
|||
auto context_guard = push_temporary_value_parsing_context(FunctionContext { function_token.function().name });
|
||||
auto function_tokens = TokenStream { function_token.function().value };
|
||||
auto color_interpolation_method = parse_color_interpolation_method(function_tokens);
|
||||
if (!color_interpolation_method.has_value())
|
||||
return {};
|
||||
function_tokens.discard_whitespace();
|
||||
if (!function_tokens.consume_a_token().is(Token::Type::Comma))
|
||||
return {};
|
||||
if (color_interpolation_method.has_value()) {
|
||||
function_tokens.discard_whitespace();
|
||||
if (!function_tokens.consume_a_token().is(Token::Type::Comma))
|
||||
return {};
|
||||
}
|
||||
|
||||
auto first_component = parse_component(function_tokens);
|
||||
if (!first_component.has_value())
|
||||
|
|
@ -2324,7 +2325,7 @@ RefPtr<StyleValue const> Parser::parse_color_mix_function(TokenStream<ComponentV
|
|||
return {};
|
||||
|
||||
transaction.commit();
|
||||
return ColorMixStyleValue::create(move(*color_interpolation_method), move(*first_component), move(*second_component));
|
||||
return ColorMixStyleValue::create(move(color_interpolation_method), move(*first_component), move(*second_component));
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/css-color-5/#funcdef-light-dark
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
ValueComparingNonnullRefPtr<ColorMixStyleValue const> ColorMixStyleValue::create(ColorInterpolationMethod interpolation_method, ColorMixComponent first_component, ColorMixComponent second_component)
|
||||
ValueComparingNonnullRefPtr<ColorMixStyleValue const> ColorMixStyleValue::create(Optional<ColorInterpolationMethod> interpolation_method, ColorMixComponent first_component, ColorMixComponent second_component)
|
||||
{
|
||||
return adopt_ref(*new (nothrow) ColorMixStyleValue(move(interpolation_method), move(first_component), move(second_component)));
|
||||
}
|
||||
|
||||
ColorMixStyleValue::ColorMixStyleValue(ColorInterpolationMethod color_interpolation_method, ColorMixComponent first_component, ColorMixComponent second_component)
|
||||
ColorMixStyleValue::ColorMixStyleValue(Optional<ColorInterpolationMethod> color_interpolation_method, ColorMixComponent first_component, ColorMixComponent second_component)
|
||||
: ColorStyleValue(ColorType::ColorMix, ColorSyntax::Modern)
|
||||
, m_properties {
|
||||
.color_interpolation_method = move(color_interpolation_method),
|
||||
|
|
@ -114,10 +114,15 @@ void ColorMixStyleValue::serialize(StringBuilder& builder, SerializationMode mod
|
|||
}
|
||||
};
|
||||
|
||||
builder.appendff("color-mix(in {}", m_properties.color_interpolation_method.color_space);
|
||||
if (m_properties.color_interpolation_method.hue_interpolation_method.value_or(HueInterpolationMethod::Shorter) != HueInterpolationMethod::Shorter)
|
||||
builder.appendff(" {} hue", CSS::to_string(*m_properties.color_interpolation_method.hue_interpolation_method));
|
||||
builder.append(", "sv);
|
||||
builder.append("color-mix("sv);
|
||||
|
||||
if (m_properties.color_interpolation_method.has_value()) {
|
||||
builder.appendff("in {}", m_properties.color_interpolation_method->color_space);
|
||||
if (m_properties.color_interpolation_method->hue_interpolation_method.value_or(HueInterpolationMethod::Shorter) != HueInterpolationMethod::Shorter)
|
||||
builder.appendff(" {} hue", CSS::to_string(*m_properties.color_interpolation_method->hue_interpolation_method));
|
||||
builder.append(", "sv);
|
||||
}
|
||||
|
||||
m_properties.first_component.color->serialize(builder, mode);
|
||||
serialize_first_percentage(builder, m_properties.first_component.percentage, m_properties.second_component.percentage);
|
||||
builder.append(", "sv);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public:
|
|||
bool operator==(ColorMixComponent const&) const = default;
|
||||
};
|
||||
|
||||
static ValueComparingNonnullRefPtr<ColorMixStyleValue const> create(ColorInterpolationMethod, ColorMixComponent first_component, ColorMixComponent second_component);
|
||||
static ValueComparingNonnullRefPtr<ColorMixStyleValue const> create(Optional<ColorInterpolationMethod>, ColorMixComponent first_component, ColorMixComponent second_component);
|
||||
|
||||
virtual bool equals(StyleValue const&) const override;
|
||||
virtual Optional<Color> to_color(ColorResolutionContext) const override;
|
||||
|
|
@ -35,13 +35,13 @@ public:
|
|||
|
||||
private:
|
||||
struct Properties {
|
||||
ColorInterpolationMethod color_interpolation_method;
|
||||
Optional<ColorInterpolationMethod> color_interpolation_method;
|
||||
ColorMixComponent first_component;
|
||||
ColorMixComponent second_component;
|
||||
bool operator==(Properties const&) const = default;
|
||||
};
|
||||
|
||||
ColorMixStyleValue(ColorInterpolationMethod, ColorMixComponent first_component, ColorMixComponent second_component);
|
||||
ColorMixStyleValue(Optional<ColorInterpolationMethod>, ColorMixComponent first_component, ColorMixComponent second_component);
|
||||
|
||||
struct PercentageNormalizationResult {
|
||||
Percentage p1;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 631 tests
|
||||
|
||||
588 Pass
|
||||
43 Fail
|
||||
603 Pass
|
||||
28 Fail
|
||||
Pass e.style['color'] = "color-mix(in srgb, red, blue)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, 70% red, 50% blue)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hsl, red, blue)" should set the property value
|
||||
|
|
@ -74,7 +74,7 @@ Pass e.style['color'] = "color-mix(in hsl, hsl(none 20% 40%), hsl(30deg none 80%
|
|||
Pass e.style['color'] = "color-mix(in hsl, hsl(120deg 40% 40% / none), hsl(0deg 40% 40%))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hsl, hsl(120deg 40% 40% / none), hsl(0deg 40% 40% / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hsl, hsl(120deg 40% 40% / none), hsl(0deg 40% 40% / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(hsl(120deg 10% 20%), hsl(30deg 30% 40%))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(hsl(120deg 10% 20%), hsl(30deg 30% 40%))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hsl, color(display-p3 0 1 0) 100%, rgb(0, 0, 0) 0%)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hsl, lab(100 104.3 -50.9) 100%, rgb(0, 0, 0) 0%)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hsl, lab(0 104.3 -50.9) 100%, rgb(0, 0, 0) 0%)" should set the property value
|
||||
|
|
@ -156,7 +156,7 @@ Pass e.style['color'] = "color-mix(in hwb, oklch(100 0.399 336.3) 100%, rgb(0, 0
|
|||
Pass e.style['color'] = "color-mix(in hwb, oklch(0 0.399 336.3) 100%, rgb(0, 0, 0) 0%)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hwb, oklab(1 0.365 -0.16) 100%, rgb(0, 0, 0) 0%)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in hwb, oklch(1 0.399 336.3) 100%, rgb(0, 0, 0) 0%)" should set the property value
|
||||
Fail e.style['color'] = "color-mix(hwb(120deg 10% 20%), hwb(30deg 30% 40%))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(hwb(120deg 10% 20%), hwb(30deg 30% 40%))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in lch, lch(10 20 30deg), lch(50 60 70deg))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in lch, lch(10 20 30deg) 25%, lch(50 60 70deg))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in lch, 25% lch(10 20 30deg), lch(50 60 70deg))" should set the property value
|
||||
|
|
@ -214,7 +214,7 @@ Pass e.style['color'] = "color-mix(in lch, lch(none 20 30deg), lch(50 none 70deg
|
|||
Pass e.style['color'] = "color-mix(in lch, lch(10 20 30deg / none), lch(50 60 70deg))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in lch, lch(10 20 30deg / none), lch(50 60 70deg / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in lch, lch(10 20 30deg / none), lch(50 60 70deg / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(lch(10 20 30), lch(50 60 70))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(lch(10 20 30), lch(50 60 70))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in oklch, oklch(0.1 0.2 30deg), oklch(0.5 0.6 70deg))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in oklch, oklch(0.1 0.2 30deg) 25%, oklch(0.5 0.6 70deg))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in oklch, 25% oklch(0.1 0.2 30deg), oklch(0.5 0.6 70deg))" should set the property value
|
||||
|
|
@ -300,7 +300,7 @@ Pass e.style['color'] = "color-mix(in lab, lab(none 20 30), lab(50 none 70))" sh
|
|||
Pass e.style['color'] = "color-mix(in lab, lab(10 20 30 / none), lab(50 60 70))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in lab, lab(10 20 30 / none), lab(50 60 70 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in lab, lab(10 20 30 / none), lab(50 60 70 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(lab(10 20 30), lab(50 60 70))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(lab(10 20 30), lab(50 60 70))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(in oklab, oklab(0.1 0.2 0.3), oklab(0.5 0.6 0.7))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(in oklab, oklab(0.1 0.2 0.3) 25%, oklab(0.5 0.6 0.7))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(in oklab, 25% oklab(0.1 0.2 0.3), oklab(0.5 0.6 0.7))" should set the property value
|
||||
|
|
@ -328,7 +328,7 @@ Fail e.style['color'] = "color-mix(in oklab, oklab(none 0.2 0.3), oklab(0.5 none
|
|||
Fail e.style['color'] = "color-mix(in oklab, oklab(0.1 0.2 0.3 / none), oklab(0.5 0.6 0.7))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(in oklab, oklab(0.1 0.2 0.3 / none), oklab(0.5 0.6 0.7 / 0.5))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(in oklab, oklab(0.1 0.2 0.3 / none), oklab(0.5 0.6 0.7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(oklab(0.1 0.2 0.3), oklab(0.5 0.6 0.7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(oklab(0.1 0.2 0.3), oklab(0.5 0.6 0.7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, color(srgb .1 .2 .3), color(srgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, 50% color(srgb .1 .2 .3), color(srgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, color(srgb .1 .2 .3), 50% color(srgb .5 .6 .7))" should set the property value
|
||||
|
|
@ -357,7 +357,7 @@ Pass e.style['color'] = "color-mix(in srgb, color(srgb none .2 .3), color(srgb .
|
|||
Pass e.style['color'] = "color-mix(in srgb, color(srgb .1 .2 .3 / none), color(srgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, color(srgb .1 .2 .3 / none), color(srgb .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, color(srgb .1 .2 .3 / none), color(srgb .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(srgb .1 .2 .3), color(srgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(srgb .1 .2 .3), color(srgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb-linear, color(srgb-linear .1 .2 .3), color(srgb-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb-linear, 50% color(srgb-linear .1 .2 .3), color(srgb-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb-linear, color(srgb-linear .1 .2 .3), 50% color(srgb-linear .5 .6 .7))" should set the property value
|
||||
|
|
@ -386,7 +386,7 @@ Pass e.style['color'] = "color-mix(in srgb-linear, color(srgb-linear none .2 .3)
|
|||
Pass e.style['color'] = "color-mix(in srgb-linear, color(srgb-linear .1 .2 .3 / none), color(srgb-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb-linear, color(srgb-linear .1 .2 .3 / none), color(srgb-linear .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb-linear, color(srgb-linear .1 .2 .3 / none), color(srgb-linear .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(srgb-linear .1 .2 .3), color(srgb-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(srgb-linear .1 .2 .3), color(srgb-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3, color(display-p3 .1 .2 .3), color(display-p3 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3, 50% color(display-p3 .1 .2 .3), color(display-p3 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3, color(display-p3 .1 .2 .3), 50% color(display-p3 .5 .6 .7))" should set the property value
|
||||
|
|
@ -415,7 +415,7 @@ Pass e.style['color'] = "color-mix(in display-p3, color(display-p3 none .2 .3),
|
|||
Pass e.style['color'] = "color-mix(in display-p3, color(display-p3 .1 .2 .3 / none), color(display-p3 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3, color(display-p3 .1 .2 .3 / none), color(display-p3 .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3, color(display-p3 .1 .2 .3 / none), color(display-p3 .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(display-p3 .1 .2 .3), color(display-p3 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(display-p3 .1 .2 .3), color(display-p3 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3-linear, 50% color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3), 50% color(display-p3-linear .5 .6 .7))" should set the property value
|
||||
|
|
@ -444,7 +444,7 @@ Pass e.style['color'] = "color-mix(in display-p3-linear, color(display-p3-linear
|
|||
Pass e.style['color'] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in display-p3-linear, color(display-p3-linear .1 .2 .3 / none), color(display-p3-linear .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(display-p3-linear .1 .2 .3), color(display-p3-linear .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in a98-rgb, color(a98-rgb .1 .2 .3), color(a98-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in a98-rgb, 50% color(a98-rgb .1 .2 .3), color(a98-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in a98-rgb, color(a98-rgb .1 .2 .3), 50% color(a98-rgb .5 .6 .7))" should set the property value
|
||||
|
|
@ -473,7 +473,7 @@ Pass e.style['color'] = "color-mix(in a98-rgb, color(a98-rgb none .2 .3), color(
|
|||
Pass e.style['color'] = "color-mix(in a98-rgb, color(a98-rgb .1 .2 .3 / none), color(a98-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in a98-rgb, color(a98-rgb .1 .2 .3 / none), color(a98-rgb .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in a98-rgb, color(a98-rgb .1 .2 .3 / none), color(a98-rgb .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(a98-rgb .1 .2 .3), color(a98-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(a98-rgb .1 .2 .3), color(a98-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in prophoto-rgb, color(prophoto-rgb .1 .2 .3), color(prophoto-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in prophoto-rgb, 50% color(prophoto-rgb .1 .2 .3), color(prophoto-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in prophoto-rgb, color(prophoto-rgb .1 .2 .3), 50% color(prophoto-rgb .5 .6 .7))" should set the property value
|
||||
|
|
@ -502,7 +502,7 @@ Pass e.style['color'] = "color-mix(in prophoto-rgb, color(prophoto-rgb none .2 .
|
|||
Pass e.style['color'] = "color-mix(in prophoto-rgb, color(prophoto-rgb .1 .2 .3 / none), color(prophoto-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in prophoto-rgb, color(prophoto-rgb .1 .2 .3 / none), color(prophoto-rgb .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in prophoto-rgb, color(prophoto-rgb .1 .2 .3 / none), color(prophoto-rgb .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(prophoto-rgb .1 .2 .3), color(prophoto-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(prophoto-rgb .1 .2 .3), color(prophoto-rgb .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in rec2020, color(rec2020 .1 .2 .3), color(rec2020 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in rec2020, 50% color(rec2020 .1 .2 .3), color(rec2020 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in rec2020, color(rec2020 .1 .2 .3), 50% color(rec2020 .5 .6 .7))" should set the property value
|
||||
|
|
@ -531,7 +531,7 @@ Pass e.style['color'] = "color-mix(in rec2020, color(rec2020 none .2 .3), color(
|
|||
Pass e.style['color'] = "color-mix(in rec2020, color(rec2020 .1 .2 .3 / none), color(rec2020 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in rec2020, color(rec2020 .1 .2 .3 / none), color(rec2020 .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in rec2020, color(rec2020 .1 .2 .3 / none), color(rec2020 .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(rec2020 .1 .2 .3), color(rec2020 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(rec2020 .1 .2 .3), color(rec2020 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz, color(xyz .1 .2 .3), color(xyz .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz, 50% color(xyz .1 .2 .3), color(xyz .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz, color(xyz .1 .2 .3), 50% color(xyz .5 .6 .7))" should set the property value
|
||||
|
|
@ -560,7 +560,7 @@ Pass e.style['color'] = "color-mix(in xyz, color(xyz none .2 .3), color(xyz .5 n
|
|||
Pass e.style['color'] = "color-mix(in xyz, color(xyz .1 .2 .3 / none), color(xyz .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz, color(xyz .1 .2 .3 / none), color(xyz .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz, color(xyz .1 .2 .3 / none), color(xyz .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(xyz .1 .2 .3), color(xyz .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(xyz .1 .2 .3), color(xyz .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d50, color(xyz-d50 .1 .2 .3), color(xyz-d50 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d50, 50% color(xyz-d50 .1 .2 .3), color(xyz-d50 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d50, color(xyz-d50 .1 .2 .3), 50% color(xyz-d50 .5 .6 .7))" should set the property value
|
||||
|
|
@ -589,7 +589,7 @@ Pass e.style['color'] = "color-mix(in xyz-d50, color(xyz-d50 none .2 .3), color(
|
|||
Pass e.style['color'] = "color-mix(in xyz-d50, color(xyz-d50 .1 .2 .3 / none), color(xyz-d50 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d50, color(xyz-d50 .1 .2 .3 / none), color(xyz-d50 .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d50, color(xyz-d50 .1 .2 .3 / none), color(xyz-d50 .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(xyz-d50 .1 .2 .3), color(xyz-d50 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(xyz-d50 .1 .2 .3), color(xyz-d50 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d65, color(xyz-d65 .1 .2 .3), color(xyz-d65 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d65, 50% color(xyz-d65 .1 .2 .3), color(xyz-d65 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d65, color(xyz-d65 .1 .2 .3), 50% color(xyz-d65 .5 .6 .7))" should set the property value
|
||||
|
|
@ -618,7 +618,7 @@ Pass e.style['color'] = "color-mix(in xyz-d65, color(xyz-d65 none .2 .3), color(
|
|||
Pass e.style['color'] = "color-mix(in xyz-d65, color(xyz-d65 .1 .2 .3 / none), color(xyz-d65 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d65, color(xyz-d65 .1 .2 .3 / none), color(xyz-d65 .5 .6 .7 / 0.5))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in xyz-d65, color(xyz-d65 .1 .2 .3 / none), color(xyz-d65 .5 .6 .7 / none))" should set the property value
|
||||
Fail e.style['color'] = "color-mix(color(xyz-d65 .1 .2 .3), color(xyz-d65 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(color(xyz-d65 .1 .2 .3), color(xyz-d65 .5 .6 .7))" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, red 50%, blue 50%)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, red 10%, blue 90%)" should set the property value
|
||||
Pass e.style['color'] = "color-mix(in srgb, red 50%, blue 40%)" should set the property value
|
||||
|
|
|
|||
Loading…
Reference in a new issue