
Picture a pet picker on a web form. Open the dropdown and every option shows a little animal icon next to its name. Close it, and the chosen pet's name sits in the box on its own. New HTML makes that easy to build, and a few lines of CSS hide the icon in the closed box. Then your code checker tells you those lines style an element that doesn't exist.
That's what developermau ran into with Biome, a tool that formats and checks web code, and reported in issue #13064. I picked it up, and my fix was merged in biomejs/biome#13097.
The new select
For years the <select> dropdown was hard to style, because the browser drew it its own way. Customizable select changes that. Once you opt in with the CSS line appearance: base-select, each <option> can hold real HTML, like an icon and a label. You can also put a <button> inside the <select>, and inside that button a new element called <selectedcontent>. The browser copies the content of the chosen option into <selectedcontent>, so the closed select can show what you picked.
The issue's playground was exactly that pet picker. Its options had an icon span and a label span, and this CSS rule hid the icon in the closed box:
selectedcontent .icon {
display: none;
}
In words: anything with the class icon that sits inside selectedcontent is not shown.
What Biome said about it
A linter is a program that reads your code without running it and points out likely mistakes. Each check is called a rule. Biome's noUnknownTypeSelector rule looks at type selectors, the part of a CSS rule that picks elements by their tag name, like p or button. If you type buton, it tells you there's no such element, which is a nice way to catch typos.
On Biome 2.5.15 it reported selectedcontent as an unknown type selector. The issue linked MDN, the main web docs site, for both the element and customizable select, so the element was clearly real. The rule just didn't know it yet.
Why it happened
The rule doesn't ask a browser which elements exist. It compares the name with lists that ship inside Biome. This is the helper it uses, as it was when my PR merged:
pub fn is_known_type_selector(prop: &str) -> bool {
let input = prop.to_ascii_lowercase_cow();
HTML_TAGS.binary_search(&input.as_ref()).is_ok()
|| SVG_TAGS.binary_search(&prop).is_ok()
|| MATH_ML_TAGS.binary_search(&input.as_ref()).is_ok()
|| is_custom_element(prop)
}
A name counts as known if it's in the list of HTML tags, the list of SVG tags (SVG is the web's drawing format), or the list of MathML tags (for writing formulas), or if it looks like a custom element. Custom elements are the ones you define yourself in JavaScript, and their names must contain a hyphen, like pet-card. This check accepts a name that has a hyphen and is all lowercase.
selectedcontent has no hyphen, so it can't pass as a custom element. Only the HTML list could let it through, and it wasn't on it. Think of a guest list at a door: the guest was invited, but the printed list at the door was made before the invitation went out.
The fix
The change itself is two lines in the file that holds the lists:
-pub const HTML_TAGS: [&str; 150] = [
+pub const HTML_TAGS: [&str; 151] = [
// trimmed
"select",
+ "selectedcontent",
"selectlist",
[&str; 150] means "an array of exactly 150 strings". Rust checks that count when it compiles, so adding a name means changing 150 to 151 as well.
Where the name goes matters more than the name. binary_search finds an item the way you'd find page 300 in a thick book: open it in the middle, see whether you're before or after, ignore the half it can't be in, and repeat. That's fast, but it only works on a sorted list, just like the trick only works because page numbers go up in order. If a name sits in the wrong spot, the search can jump right past it. The name is in the list, and a lookup still may not find it.
So selectedcontent goes after select, because a word that starts with another whole word sorts after it, and before selectlist, because at the seventh letter e comes before l.
Biome already guards that order. A test called test_selector_types walks the list two names at a time and fails if any name isn't smaller than the one after it:
for items in HTML_TAGS.windows(2) {
assert!(items[0] < items[1], "{} < {}", items[0], items[1]);
}
So a name in the wrong place makes the tests fail loudly, instead of making lookups fail quietly for users.
The test
Each Biome rule has example files: one with code the rule should report, and valid.css with code it must leave alone. Biome runs the rule on them and saves the result in a snapshot file, a saved copy of the input and any warnings. If the output ever changes, the test fails.
I added the issue's case to valid.css:
selectedcontent,
selectedcontent .icon {
display: none;
}
Without the new entry, both selectors get reported. With it, the snapshot gains only those lines and no warnings. I also added a changeset, a short note Biome turns into its release notes, marking the fix as a patch.
Review and release
dyc3 approved it and merged it on 13 November 2026, and that closed the issue. The fix shipped in Biome 2.6.8, released on 15 November 2026. Thanks, dyc3!
What I'm keeping from this one
When a checker calls something new "unknown", look for a list before looking for a logic bug. Tools that know names from a standard carry their own copy of the names, and the standard keeps growing.
And I really like that little order test. A sorted list with a binary search is quick, but one entry in the wrong place goes invisible without any error. A tiny check like that turns that silent failure into a red test.
Have you tried customizable selects yet? I'm curious which tools in your setup still complain about them.
About the author
- I contribute to open source developer tools: Tauri, Biome, oxc, Julia, Quarkus, Grafana, Burn and a few more. I start from an issue I can reproduce and a test that fails, then fix it. Here I write up the ones worth telling: what broke, why, and how the fix got through review.
Comments
Join the discussionNo comments yet. Be the first to comment.





