From bd497052f63c5f6702bcedecb26c22e28e8a2a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helmi=20Hy=C3=B6dynmaa?= Date: Thu, 6 Aug 2026 11:03:32 +0300 Subject: [PATCH] docs(skill): record the language-selector rule in translate-page Helmi has asked for the selector height override once per site. The skill now carries it under 'Adding a language to the site' so the next site to gain a second language gets it as part of the same work, and says to keep the three copies identical. Co-Authored-By: Claude Opus 5 (1M context) --- .claude/skills/translate-page/SKILL.md | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.claude/skills/translate-page/SKILL.md b/.claude/skills/translate-page/SKILL.md index 67e6793..2c96b0f 100644 --- a/.claude/skills/translate-page/SKILL.md +++ b/.claude/skills/translate-page/SKILL.md @@ -88,6 +88,33 @@ one failure the status check cannot detect, and this skill is where the discipline lives. If you touched only the target language (fixing wording, fixing a typo), the English source did not change: leave the stamp alone. +## Adding a language to the site + +When a locale is added to `mkdocs.yml`, check the language selector too. The +Material theme caps the open menu at `10rem`, which fits five entries at the +site's font size; the sixth language onward scrolls out of sight behind a +scrollbar that gives no hint anything is below it. + +`docs/stylesheets/extra.css` should carry: + +```css +.md-select:focus-within .md-select__inner, +.md-select:hover .md-select__inner { + max-height: min(24rem, 75vh); +} +``` + +24rem clears thirteen entries; the viewport term keeps the menu on screen on a +short display. The same block is in the HALPI2 and HALMET repositories — keep +the three identical, and add it to any further site that gains a second +language. + +Verify by measuring rather than by eye: open the site, read the rule's +`max-height` off the stylesheet, and compare it against the list's natural +height with `.md-select__list.getBoundingClientRect()`. Hovering for a +screenshot is unreliable — the menu often has not opened by the time the frame +is captured. + ## Verifying All four, every time: