Skip to content

fix(theme): show every language in the selector without scrolling - #22

Merged
helmihyo merged 1 commit into
mainfrom
fix/language-selector-height
Aug 5, 2026
Merged

fix(theme): show every language in the selector without scrolling#22
helmihyo merged 1 commit into
mainfrom
fix/language-selector-height

Conversation

@helmihyo

@helmihyo helmihyo commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

The language selector shows five of the ten languages. The rest are reachable only by scrolling inside the dropdown, which gives no visual hint that there is anything below.

Cause

Material caps the open menu:

.md-select:hover .md-select__inner { max-height: 10rem; }

At the site's root font size that resolves to 200px, and each entry is 36px tall — five rows. The list needs 360px for ten languages.

Fix

.md-select:focus-within .md-select__inner,
.md-select:hover .md-select__inner {
  max-height: min(24rem, 75vh);
}

24rem resolves to 480px, which clears thirteen entries — enough headroom that adding a language does not immediately reintroduce the problem. The 75vh term keeps the menu on screen on a short display, where a fixed 24rem would run past the bottom edge.

:focus-within is included alongside :hover because the theme's own rule covers both, and keyboard users open the menu that way.

Measured, not estimated

Read from the rendered page rather than assumed:

Entry height 36px
List needs 360px for ten languages
Old cap resolved to 200px — five visible
New cap resolves to 480px — all ten visible, room for thirteen

Verified in the browser on both sites: the menu opens to its full height with no scrollbar.

🤖 Generated with Claude Code

The theme caps the open language menu at 10rem. At 36px a row that fits
five entries, and the site now has ten, so half the languages sat below
the fold behind a scrollbar that gives no hint they are there.

24rem clears thirteen, leaving room to add languages before this needs
looking at again. The min() keeps the menu on screen on a short display,
where 24rem would run past the bottom.

Measured rather than guessed: the list needs 360px, the old cap resolved
to 200px, the new one to 480px.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@helmihyo
helmihyo merged commit eb54378 into main Aug 5, 2026
1 check passed
@helmihyo
helmihyo deleted the fix/language-selector-height branch August 5, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant