Skip to content

Fix select base appearance shadow tree issues#12158

Merged
annevk merged 2 commits intowhatwg:mainfrom
josepharhar:selectshadowfix
Feb 13, 2026
Merged

Fix select base appearance shadow tree issues#12158
annevk merged 2 commits intowhatwg:mainfrom
josepharhar:selectshadowfix

Conversation

@josepharhar
Copy link
Contributor

@josepharhar josepharhar commented Feb 12, 2026

  • Corrects links to the css spec which have changed since I added them.
  • Adds the "select" argument to ::picker
  • Changes code to span for referencing select button slot

This change is editorial.

Fixes #12106


/infrastructure.html ( diff )
/rendering.html ( diff )

- Corrects links to the css spec which have changed since I added them.
- Adds the "select" argument to ::picker
- Changes code to span for referencing select button slot

Fixes whatwg#12106
source Outdated
Comment on lines 148220 to 148224
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li><p>A <dfn>select button slot</dfn>, which is a <code>slot</code> element. It is appended to
the <code>select</code>'s <span>shadow root</span> as the first child. It is
<span>expected</span> to take the first child element of the <code>select</code> if the first
child element is a <code>button</code>.</p></li>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is correct. Though I'm not sure about the "take" terminology, but I guess we use that elsewhere? We take care of the fallback in the next step.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I added this change.

Yeah the "take" terminology is something that I copied from the details element:

The first child element is a slot that is expected to take the details element's first summary element child, if any

Copy link
Member

@lukewarlow lukewarlow Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure that phrasing is correct. It takes the first button element child right? Rather than the first element child if it's a button?

Or does it really only work if the button is the very first element?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it really only works if the button is the very first element: https://chromium-review.googlesource.com/c/chromium/src/+/6012938

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nt1m @lukewarlow want to review as well?

@lukewarlow
Copy link
Member

Lgtm

@annevk annevk merged commit 0d220b5 into whatwg:main Feb 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

select base appearance shadow tree issues

3 participants