WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
308811
Customizable select issues
https://bugs.webkit.org/show_bug.cgi?id=308811
Summary
Customizable select issues
Jake Archibald
Reported
2026-02-27 02:12:01 PST
https://random-stuff.jakearchibald.com/fancy-select/
- here's a demo where I kinda threw everything at it, and it's unusably broken in TP. There's a layout shift in the rendering of the button, which seems to be a bug (there's no JS on the page, and a single stylesheet). It seems like optgroup isn't properly supported? Demos on
https://codepen.io/editor/argyleink/pen/019c1f28-bbc2-7bac-ad4a-a7e41d3730f1
that use optgroup are also broken.
Attachments
Add attachment
proposed patch, testcase, etc.
Jake Archibald
Comment 1
2026-02-27 03:49:51 PST
The attr() on the legend is also failing.
https://random-stuff.jakearchibald.com/fancy-select/without-optgroup/
- here's a version that doesn't use attr() or legend. When refreshing the page, the picker sometimes flashes open. The position of the picker is wrong. The animation of the highlighted area (using anchor positioning) is flaky. The enter and exit animations of the picker are broken.
Jake Archibald
Comment 2
2026-02-27 03:56:25 PST
Sorry, I should say, the attr isn't on the legend, it's on the opt-group, but it's picked up via a custom property on the legend's ::before
Tim Nguyen (:ntim)
Comment 3
2026-02-27 10:11:17 PST
Thanks for detailed report and the extensive test cases! - optgroup was fixed here:
bug 308109
(that didn't make STP 238 unfortunately) - Regarding `legend::before { content: var(--legend-text) }` I think this is working as expected in Safari, the fact that it works in Chrome seems wrong ? var() does plain text substitution without evaluation, so this ends up becoming `legend::before { content: attr(label) }`, but `legend` has no label attribute, so nothing shows. Not sure if I missed something, but please let me know if I did. - When refreshing the page, the picker sometimes flashes open. That's indeed a bug! - The position of the picker is wrong. Safari has the correct behavior here in terms of anchor positioning. Sizing of the popup does differ though (hopefully
bug 308559
will make it better). - The enter and exit animations of the picker are broken. entry animation works fine on a tip of tree build (assuming sizing/positioning are correct) exit animations seem to be in flux spec-wise:
https://github.com/w3c/csswg-drafts/issues/13200
, we could certainly hack around to make it better, but it wouldn't be spec compliant. - The animation of the highlighted area (using anchor positioning) is flaky. I'm guessing you're referring to the exit animation shifting position? That relies on the issue mentioned in the previous point.
Tim Nguyen (:ntim)
Comment 4
2026-02-27 10:40:07 PST
> - The animation of the highlighted area (using anchor positioning) is flaky.
Oh I see the subtle hover effect now, seems like a bug involving anchor positioning and transitions I would guess
Radar WebKit Bug Importer
Comment 5
2026-03-06 02:12:12 PST
<
rdar://problem/171887062
>
Jake Archibald
Comment 6
2026-03-06 02:29:29 PST
Chrome is doing the right thing with attr() here, but it depends on the newer definition of attr(). I guess that's a pretty separate bit of work, but it plays really well here with enhancing <optgroup>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug