From 7c3fe1efd38b9e8307ab73ba660add974435f36d Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Tue, 10 Sep 2024 10:18:57 -0700 Subject: [PATCH 1/2] Define ::picker() This was discussed here: https://github.com/w3c/csswg-drafts/issues/10440 --- css-pseudo-4/Overview.bs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/css-pseudo-4/Overview.bs b/css-pseudo-4/Overview.bs index cb0497fb9af..643f51d6f9a 100644 --- a/css-pseudo-4/Overview.bs +++ b/css-pseudo-4/Overview.bs @@ -1337,6 +1337,43 @@ details[open]::details-content { } +

+Styling form control pickers: the ''::picker()'' pseudo-element

+ + The ::picker() pseudo-element targets the popup picker of form + control elements which have popup pickers, such as the <{select}> element. It + is a [=part-like pseudo-element=]. + +
+    ::picker() == ::picker( <>+ )
+  
+ + The ''::picker()'' pseudo-element only matches when the originating + element supports base appearance and has a popup picker. The + specified <> must also match the unique picker name of the + originating element. For example, the unique picker name for the + <{select}> element is "select". + + There is no restriction on which properties apply to the ''::picker()'' + pseudo-element. + + In order for the ''::picker()'' pseudo-element to be rendered, it and its + originating element must be rendered with base appearance by + applying ''appearance: base'' to both of them. + +
+<style>
+  select, select::picker(select) {
+    appearance: base;
+  }
+  select::picker(select) {
+    border: 5px solid red;
+    background-color: blue;
+  }
+</style>
+  
+ +

Overlapping Pseudo-element Interactions

From d279917cbf7cea6b485a7a5277b843d67b06aef7 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Wed, 11 Sep 2024 14:36:52 -0700 Subject: [PATCH 2/2] address comments --- css-pseudo-4/Overview.bs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/css-pseudo-4/Overview.bs b/css-pseudo-4/Overview.bs index 643f51d6f9a..b3ca89619e6 100644 --- a/css-pseudo-4/Overview.bs +++ b/css-pseudo-4/Overview.bs @@ -1348,14 +1348,17 @@ Styling form control pickers: the ''::picker()'' pseudo-element ::picker() == ::picker( <>+ ) + Note: Once all of the controls that might support picker styling have it, + then we might add a (no-argument) ''::picker'' pseudo-element as well. + The ''::picker()'' pseudo-element only matches when the originating element supports base appearance and has a popup picker. The - specified <> must also match the unique picker name of the - originating element. For example, the unique picker name for the - <{select}> element is "select". + specified <> must also match the unique picker name of the + originating element. For example, the unique picker name for + the <{select}> element is "select". - There is no restriction on which properties apply to the ''::picker()'' - pseudo-element. + Since it is a [=part-like pseudo-element=], There is no restriction on which + properties apply to the ''::picker()'' pseudo-element. In order for the ''::picker()'' pseudo-element to be rendered, it and its originating element must be rendered with base appearance by