Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/starlight/components/Select.astro
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,25 @@ interface Props {
color: var(--sl-color-gray-1);
}

/*
* Firefox on Windows renders native select dropdowns with incorrect
* colors in dark mode — option backgrounds appear white and
* checked/hovered text is invisible. Explicitly set colors for the
* dark theme to ensure legibility.
* See: https://github.com/withastro/starlight/issues/3426
*/
:global([data-theme='dark']) select,
:global([data-theme='dark']) select option,
:global([data-theme='dark']) select option:checked {
background-color: var(--sl-color-gray-6);
color: var(--sl-color-text);
}

:global([data-theme='dark']) select option:hover {
background-color: var(--sl-color-accent-high);
color: var(--sl-color-text-invert);
}

@media (min-width: 50rem) {
select {
font-size: var(--sl-text-sm);
Expand Down
Loading