Skip to content

docs: add a warning for Customizable select elements #40400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 22, 2025

Conversation

paoloricciuti
Copy link
Contributor

Description

This PR adds a warning to the Customizable select elements article to warn about the fact that those features are not widely available.

Motivation

The way this article is presented and described make it seems like this is the modern, generally available way to style selects ( sveltejs/svelte#15617 (comment) ). This couldn't be further from being true as this is only available in Chrome. Furthermore since the changes to the parser (again only available in Chrome) most Javascript frameworks that handle hydration will either prevent you from writing such code (like Svelte and Solid) or even worse just straight up fail hydration. It will also probably be a while before frameworks can adapt since they basically need to branch their hydration logic based on the availability of this feature.

I'm open to rephrase this if it's too scary but i think we should have some sort of warning here.

Related issues and pull requests

sveltejs/svelte#15963
sveltejs/svelte#15617

@paoloricciuti paoloricciuti requested a review from a team as a code owner July 17, 2025 08:46
@paoloricciuti paoloricciuti requested review from chrisdavidmills and removed request for a team July 17, 2025 08:46
@github-actions github-actions bot added Content:Learn Learning area docs size/xs [PR only] 0-5 LoC changed labels Jul 17, 2025
Copy link
Contributor

github-actions bot commented Jul 18, 2025

Preview URLs

(comment last updated: 2025-07-22 16:25:47)

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Hi @paoloricciuti, and thanks for your consideration here. I agree that something needs to be added. I've provided some initial thoughts, and I'll get some other folks to look at this too.

@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Jul 22, 2025
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

OK, let's get this in.

@chrisdavidmills chrisdavidmills merged commit 485cdaa into mdn:main Jul 22, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Learn Learning area docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants