From 556a0f7c342fbf887a28d972b0d3c23401ae7570 Mon Sep 17 00:00:00 2001 From: Geoffrey Eisenbarth Date: Thu, 12 Mar 2026 12:33:19 -0500 Subject: [PATCH 1/3] Implement customizable selects --- src/main.css | 228 +++++++++++++++++++++++++++++++++++----------- src/variables.css | 6 ++ 2 files changed, 181 insertions(+), 53 deletions(-) diff --git a/src/main.css b/src/main.css index 8d2b2dc..2c56650 100644 --- a/src/main.css +++ b/src/main.css @@ -747,80 +747,202 @@ input[type=file] { } select { - &:is([multiple], [size]) { - padding: 0; + /*** + 15.5.16 Rendering: The select element + https://html.spec.whatwg.org/multipage/rendering.html#the-select-element-2 - &:focus option:checked { - --force-bg-hack: linear-gradient(0deg, var(--graphical-fg) 0%, var(--graphical-fg) 100%); - background: var(--force-bg-hack); - color: var(--bg); - } + - Revisit the spec above once browserlist supports base-select, + since some of the styles are just for e.g. Firefox. + + - It's possible that a pseudo-element (e.g. :is-listbox) will eventually + be implemented, until then we follow the guidance of: + https://github.com/whatwg/html/issues/8189#issuecomment-2877242732 + + - Eventually, `field-sizing: fixed` will re-implement the automagic + width of the base appearance select. + + - Keep in mind that `appearance: base-select` changes the keyboard + controls of a multiple select to be more accessible. + + - While the spec change has relaxed the parsing rules for `