From 3417d75bf2e06fee15093e06feed07c8d4baa2c5 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Wed, 12 Jun 2024 15:10:33 +0000 Subject: [PATCH] Bug 1900494 [wpt PR 46609] - Add checkmark to base-select options, a=testonly Automatic update from web-platform-tests Add checkmark to base-select options This is being discussed in OpenUI here: https://github.com/openui/open-ui/issues/863 The discussion suggested that we should use a unicode checkmark instead of an SVG, so that's what this patch does. It might be better to use ::marker instead of ::before, but we might also end up with something else entirely and I think that reusing ::marker would be harder to implement, so I am using ::before for now. Bug: 1511354 Change-Id: I29c1dfc26208e6fc13cf42782a3d9d6fae2e711c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5578818 Reviewed-by: David Baron Commit-Queue: Joey Arhar Cr-Commit-Position: refs/heads/main@{#1313329} -- wpt-commits: 56ec66da8735eb2ccbd9be689917b2b1aad6faed wpt-pr: 46609 --- .../option-computed-style.tentative.html | 17 +++++++++++++++++ .../resources/stylable-select-styles.css | 7 +++++++ .../select-child-button-and-datalist-ref.html | 2 +- .../select-open-invalidation-ref.html | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/option-computed-style.tentative.html diff --git a/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/option-computed-style.tentative.html b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/option-computed-style.tentative.html new file mode 100644 index 0000000000000..14650f3f320ae --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/option-computed-style.tentative.html @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css index 7f4c8b6c448af..0052b3863e2ef 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css +++ b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/resources/stylable-select-styles.css @@ -38,6 +38,13 @@ align-content: center; } +.stylable-select-option::before { + content: '\2713' / ''; +} +.stylable-select-option:not(.selected)::before { + visibility: hidden; +} + .stylable-select-button { color: FieldText; background-color: Field; diff --git a/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-child-button-and-datalist-ref.html b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-child-button-and-datalist-ref.html index e99ca4d57a8b2..a27e662b1c4ca 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-child-button-and-datalist-ref.html +++ b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-child-button-and-datalist-ref.html @@ -10,7 +10,7 @@
-
+
option one
diff --git a/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-open-invalidation-ref.html b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-open-invalidation-ref.html index f5b70c495bc82..fb609a7247e64 100644 --- a/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-open-invalidation-ref.html +++ b/testing/web-platform/tests/html/semantics/forms/the-select-element/stylable-select/select-open-invalidation-ref.html @@ -10,7 +10,7 @@
-
one
+
one
two