From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- .../custom-property-style-queries.html | 35 ++++++++++++++++++ .../registered-color-style-queries.html | 41 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 testing/web-platform/tests/css/css-contain/container-queries/registered-color-style-queries.html (limited to 'testing/web-platform/tests/css/css-contain/container-queries') diff --git a/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html b/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html index 4ae5efca91..d9152432ed 100644 --- a/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html +++ b/testing/web-platform/tests/css/css-contain/container-queries/custom-property-style-queries.html @@ -206,6 +206,9 @@ --inherit-no: bar; --unset-no: baz; --initial-no: baz; + --space-no: baz; + --explicit-initial: initial; + --space: ; } @container style(--initial: initial) { #initial { color: green; } @@ -225,6 +228,18 @@ @container not style(--inherit-no: inherit) { #inherit-no { color: green; } } + @container style(--explicit-initial: initial) { + #explicit-initial { color: green; } + } + @container not style(--explicit-initial) { + #explicit-initial-implicit { color: green; } + } + @container style(--space: ) { + #space { color: green; } + } + @container not style(--space-no: ) { + #space-no { color: green; } + } @container style(--unset: unset) { #unset { color: green; } } @@ -238,6 +253,10 @@
+
+
+
+
@@ -261,6 +280,22 @@ assert_equals(getComputedStyle(document.querySelector("#initial-no-implicit")).color, green); }, "Style query matching value-less query against non-initial value"); + test(() => { + assert_equals(getComputedStyle(document.querySelector("#explicit-initial")).color, green); + }, "Style query 'initial' matching (with explicit 'initial' value)"); + + test(() => { + assert_equals(getComputedStyle(document.querySelector("#explicit-initial-implicit")).color, green); + }, "Style query matching negated value-less query against initial value (with explicit 'initial' value)"); + + test(() => { + assert_equals(getComputedStyle(document.querySelector("#space")).color, green); + }, "Style query 'space' matching"); + + test(() => { + assert_equals(getComputedStyle(document.querySelector("#space-no")).color, green); + }, "Style query 'space' not matching"); + test(() => { assert_equals(getComputedStyle(document.querySelector("#inherit")).color, green); }, "Style query 'inherit' matching"); diff --git a/testing/web-platform/tests/css/css-contain/container-queries/registered-color-style-queries.html b/testing/web-platform/tests/css/css-contain/container-queries/registered-color-style-queries.html new file mode 100644 index 0000000000..6e2bfb896b --- /dev/null +++ b/testing/web-platform/tests/css/css-contain/container-queries/registered-color-style-queries.html @@ -0,0 +1,41 @@ + +CSS Container Queries Test: registered color syntax style queries + + + + + +
+
+
+
+
+
+ -- cgit v1.2.3