fix(theme): show every language in the selector without scrolling - #22
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
24rem resolves to 480px, which clears thirteen entries — enough headroom that adding a language does not immediately reintroduce the problem. The
75vhterm keeps the menu on screen on a short display, where a fixed 24rem would run past the bottom edge.:focus-withinis included alongside:hoverbecause 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:
Verified in the browser on both sites: the menu opens to its full height with no scrollbar.
🤖 Generated with Claude Code