mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
LibWeb/CSS: Consider unresolved calc()
when serializing in Normal mode
Unfortunately, there is no explicit and step-by-step spec to perform the serialization of `color()` declared values, so while being spec-informed, this is quite ad-hoc. Fixes 81 subtests in: - css/css-color/parsing/color-valid-color-function.html
This commit is contained in:
parent
d6abd44522
commit
d879771044
Notes:
github-actions[bot]
2025-01-03 16:50:21 +00:00
Author: https://github.com/LucasChollet
Commit: d879771044
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3010
Reviewed-by: https://github.com/AtkinsSJ ✅
2 changed files with 119 additions and 85 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <AK/TypeCasts.h>
|
||||
#include <LibWeb/CSS/Serialize.h>
|
||||
#include <LibWeb/CSS/StyleValues/NumberStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
@ -90,9 +91,42 @@ CSSColor::Resolved CSSColor::resolve_properties() const
|
|||
}
|
||||
|
||||
// https://www.w3.org/TR/css-color-4/#serializing-color-function-values
|
||||
String CSSColor::to_string(SerializationMode) const
|
||||
String CSSColor::to_string(SerializationMode mode) const
|
||||
{
|
||||
// FIXME: Do this properly, taking unresolved calculated values into account.
|
||||
if (mode == SerializationMode::Normal) {
|
||||
auto convert_percentage = [](ValueComparingNonnullRefPtr<CSSStyleValue> const& value) -> RemoveReference<decltype(value)> {
|
||||
if (value->is_percentage())
|
||||
return NumberStyleValue::create(value->as_percentage().value() / 100);
|
||||
return value;
|
||||
};
|
||||
|
||||
auto alpha = convert_percentage(m_properties.alpha);
|
||||
|
||||
bool const is_alpha_required = [&]() {
|
||||
if (alpha->is_number())
|
||||
return alpha->as_number().value() < 1;
|
||||
return true;
|
||||
}();
|
||||
|
||||
if (alpha->is_number() && alpha->as_number().value() < 0)
|
||||
alpha = NumberStyleValue::create(0);
|
||||
|
||||
if (is_alpha_required) {
|
||||
return MUST(String::formatted("color({} {} {} {} / {})",
|
||||
string_view_from_color_type(m_color_type),
|
||||
convert_percentage(m_properties.channels[0])->to_string(mode),
|
||||
convert_percentage(m_properties.channels[1])->to_string(mode),
|
||||
convert_percentage(m_properties.channels[2])->to_string(mode),
|
||||
alpha->to_string(mode)));
|
||||
}
|
||||
|
||||
return MUST(String::formatted("color({} {} {} {})",
|
||||
string_view_from_color_type(m_color_type),
|
||||
convert_percentage(m_properties.channels[0])->to_string(mode),
|
||||
convert_percentage(m_properties.channels[1])->to_string(mode),
|
||||
convert_percentage(m_properties.channels[2])->to_string(mode)));
|
||||
}
|
||||
|
||||
auto resolved = resolve_properties();
|
||||
if (resolved.alpha == 1) {
|
||||
return MUST(String::formatted("color({} {} {} {})",
|
||||
|
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
|||
|
||||
Found 306 tests
|
||||
|
||||
180 Pass
|
||||
126 Fail
|
||||
261 Pass
|
||||
45 Fail
|
||||
Pass e.style['color'] = "color(srgb 0% 0% 0%)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb 10% 10% 10%)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb .2 .2 25%)" should set the property value
|
||||
|
@ -26,15 +26,15 @@ Pass e.style['color'] = "color(srgb 200% 200% 200% / 200%)" should set the prope
|
|||
Pass e.style['color'] = "color(srgb -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(srgb calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(srgb calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -60,15 +60,15 @@ Pass e.style['color'] = "color(srgb-linear 200% 200% 200% / 200%)" should set th
|
|||
Pass e.style['color'] = "color(srgb-linear -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(srgb-linear calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(srgb-linear 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -94,15 +94,15 @@ Pass e.style['color'] = "color(a98-rgb 200% 200% 200% / 200%)" should set the pr
|
|||
Pass e.style['color'] = "color(a98-rgb -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(a98-rgb calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(a98-rgb 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -128,15 +128,15 @@ Pass e.style['color'] = "color(rec2020 200% 200% 200% / 200%)" should set the pr
|
|||
Pass e.style['color'] = "color(rec2020 -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(rec2020 calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(rec2020 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -162,15 +162,15 @@ Pass e.style['color'] = "color(prophoto-rgb 200% 200% 200% / 200%)" should set t
|
|||
Pass e.style['color'] = "color(prophoto-rgb -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(prophoto-rgb calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(prophoto-rgb 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -196,15 +196,15 @@ Pass e.style['color'] = "color(display-p3 200% 200% 200% / 200%)" should set the
|
|||
Pass e.style['color'] = "color(display-p3 -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(display-p3 calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(display-p3 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -230,15 +230,15 @@ Pass e.style['color'] = "color(xyz 200% 200% 200% / 200%)" should set the proper
|
|||
Pass e.style['color'] = "color(xyz -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(xyz calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(xyz calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -264,15 +264,15 @@ Pass e.style['color'] = "color(xyz-d50 200% 200% 200% / 200%)" should set the pr
|
|||
Pass e.style['color'] = "color(xyz-d50 -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d50 calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d50 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
||||
|
@ -298,15 +298,15 @@ Pass e.style['color'] = "color(xyz-d65 200% 200% 200% / 200%)" should set the pr
|
|||
Pass e.style['color'] = "color(xyz-d65 -200% -200% -200% / -200%)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 calc(0.5 + 1) calc(0.5 - 1) calc(0.5) / calc(-0.5 + 1))" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 calc(50% * 3) calc(-150% / 3) calc(50%) / calc(-50% * 3))" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 calc(50%) 50% 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 none none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 none none none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 10% none none / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 none none none / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 0 0 0 / none)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 0 calc(infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 0 calc(-infinity) 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 calc(NaN) 0 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 calc(50%) 50% 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 none none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 none none none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 10% none none / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 none none none / 0.5)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 0 0 0 / none)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 0 calc(infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 0 calc(-infinity) 0)" should set the property value
|
||||
Pass e.style['color'] = "color(xyz-d65 calc(NaN) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 calc(0 / 0) 0 0)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 calc(50% + (sign(1em - 10px) * 10%)) 0 0 / 0.5)" should set the property value
|
||||
Fail e.style['color'] = "color(xyz-d65 0.5 0 0 / calc(50% + (sign(1em - 10px) * 10%)))" should set the property value
|
Loading…
Add table
Add a link
Reference in a new issue