Repository navigation
fix(website): keep phone navigation labels from splitting mid-word - #7497
Merged
morluto merged 1 commit intoOct 27, 2026
Merged
Conversation
The phone header gave each link an equal minmax(0, 1fr) column and allowed overflow-wrap: anywhere, so single-word labels such as "Showcases", "Anleitungen", "Руководства" and "Посібники" broke between letters at 320-430px. Links now share the row as flex items that never shrink below their longest word. Labels wrap only at spaces, and a word wider than the whole row can still break, preserving the enlarged-text fit from morluto#3598. Refs morluto#3597
Contributor
[Medium impact] The CSS change appears safe to merge; no actionable issues were found. SummaryChanges phone navigation from four fixed grid columns to wrapping flex links. Each link keeps enough room for its longest word, with a fallback for words wider than the row.
Reviews (1) · Last reviewed commit: "fix(website): keep phone navigation labe..." · Reviewed by Greptile |
2 tasks done
pirrozani
marked this pull request as ready for review
October 27, 2026 13:39
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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.
Summary
Fixes #3597.
On phones, single-word navigation labels split between letters, such as "Showcase|s", "Anleitunge|n", "Руководст|ва" and "Посібник|и". This change keeps every label whole and wraps multi-word labels only at spaces.
The desktop cases in #3597 no longer reproduce on current
main: a174892 reduced the header to four links and #3851 gave the navigation more room. This PR does not change desktop rules; the measurements below confirm that every edition stays on one line from 641px to 2560px.Problem and expected behavior
Below 640px,
.navigationused fourminmax(0, 1fr)columns, and its links usedoverflow-wrap: anywhere. That combination reduced each link's minimum width to a single character, so a label longer than a quarter of the row broke mid-word. Before this change, with system fonts in Chromium, splits occurred in en, ml, ur-Latn and ro at 320px; de at 320–375px; ru at 320–390px; and uk at 320px. With a wider font, el, tr, fr, pl and es also split.Expected: four links on one row that read cleanly in every edition.
Change and scope
At phone widths, the links are flex items with
flex: 1 1 0. They share the row evenly, but the automatic minimum keeps each link at least as wide as its longest word.max-width: 100%withoverflow-wrap: break-wordstill lets a word wider than the whole row break, so enlarged text continues to fit, as fixed by #3598. The base.navigationrule already suppliesdisplay: flexandflex-wrap: wrap. CSS only; one file.Contribution scope: not applicable (website layout fix).
Contract and boundary impact
Semantic owner and earliest changed stage:
website/public/assets/styles.css, phone@media (max-width: 640px)navigation rules.Contribution scope fit and linked maintainer decision: not applicable.
CLI and MCP/tool-catalog contract: none.
Provider, bridge, target-format, or platform compatibility: none.
Evidence, artifact, provenance, or reconstruction contract: none.
Target selection, authority, upstream behavior, and cleanup details: not applicable.
Generated metadata, package, or installation impact: none.
Documentation or usability only; no target interaction.
Evidence and regression coverage
Executed with Playwright 1.64.1 and Chromium on Windows 11 against a local
prepare-website.pybuild of all 23 editions. A script measured the header's links and boxes directly instead of comparing screenshots.main(570abe9), mid-word splits occurred in the languages and widths listed above.main, and the overflow is identical without this change./rea/base path were not exercised.Phone header at 320px,
maincompared with this PR (Chromium, Windows, light theme):Header at 1280px (tightest desktop width) and 900px in all 23 editions. This PR does not change desktop CSS; these cases already pass on
mainafter a174892 and #3851. Each header is labeled with its measured navigation row count.Desktop headers in all 23 editions
Validation performed
python scripts/website.py check: build, translation checks, shared HTML, sitemap and Cairo sharing-card stages completed. 21 of 25 maintenance tests passed; the 4 errors areWinError 1314when the tests create directory symlinks on Windows without that privilege.npx [email protected] --check website/public/assets/styles.css: passed.git diff --check: passed.check:fastwith Node 24.22.1: passed.Compatibility, safety, and release
Author readiness
Human owner: @pirrozani
Before merge
type(scope): outcome.🤖 Generated with Claude Code