{"data":{"slug":"github-thedaviddias-front-end-checklist-skills-text-expansion-285d9b94f8fb","title":"Prevent Layout Breakage from Text Expansion in Translations","summary":"Ensure UI components adapt to longer translated text by avoiding fixed dimensions and overflow rules on translatable elements. Use min-inline-size and test with pseudo-locale builds to receive a layout that accommodates text expansion.","url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-text-expansion-285d9b94f8fb","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-thedaviddias-front-end-checklist-skills-text-expansion-285d9b94f8fb","markdown_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-text-expansion-285d9b94f8fb.md","download_url":"https:\/\/skillshunter.net\/skills\/github-thedaviddias-front-end-checklist-skills-text-expansion-285d9b94f8fb\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Install a pseudo-locale build step in local development and CI for visual testing. Ensure that min-inline-size is used instead of inline-size on text containers.","instructions":"---\nname: text-expansion\ndescription: \"Use when reviewing CSS for fixed dimensions, truncation, or overflow rules on elements that render translatable strings.\"\nmetadata:\n  category: i18n\n  priority: medium\n  difficulty: intermediate\n  estimatedTime: \"30\"\n  source: frontendchecklist.io\n  url: https:\/\/frontendchecklist.io\/rules\/i18n\/text-expansion\n---\n\n# Design UI components to accommodate text expansion from translation\n\nLayouts designed only with English copy routinely break when translated: buttons overflow their containers, labels truncate, and navigation items wrap unexpectedly. Catching these issues early with pseudo-locale testing is far cheaper than fixing them after translations are delivered.\n\n## Quick Reference\n\n- German translations are typically 30% longer than English; Finnish 50% longer\n- Avoid fixed-width containers for text-bearing elements like buttons and labels\n- Use min-inline-size instead of inline-size to allow natural growth\n- Test with a pseudo-locale that inflates strings before committing translations\n- Include pseudolocalization in CI or preview testing, not just manual QA\n\n## Check\n\nIdentify CSS rules and component styles that use fixed widths or hard truncation on elements containing translatable text, which would break when content expands in other languages. Check that the team can test a pseudolocalized build or preview.\n\n## Fix\n\nReplace fixed inline-size with min-inline-size on text containers, remove overflow: hidden from interactive elements, and add a pseudo-locale build step for visual testing in local development and CI.\n\n## Explain\n\nExplain how text expansion during translation breaks fixed layouts and what CSS patterns prevent overflow and clipping across locales.\n\n## Code Review\n\nReview CSS files and component styles for fixed widths, overflow: hidden, white-space: nowrap, and text-overflow: ellipsis on buttons, labels, navigation items, and headings that contain translatable text.\n\n---\n\nFor full implementation details, code examples, and framework-specific guidance,\nsee `references\/rule.md`.\n\nRule page: https:\/\/frontendchecklist.io\/rules\/i18n\/text-expansion\n","use_cases":["Fixing button overflow in German translations","Preventing label truncation in Finnish UIs","Avoiding unexpected wrapping in navigation menus"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/thedaviddias\/Front-End-Checklist\/blob\/e8d14d049010e2ce25afcd5e8609dfcbbe63e47e\/skills\/text-expansion\/SKILL.md","source_commit":"e8d14d049010e2ce25afcd5e8609dfcbbe63e47e","license":null,"version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T05:54:51.000000Z","updated_at":"2026-11-24T07:12:47.000000Z","seo_title":"Prevent Layout Breakage from Text Expansion in Translations","seo_description":"Avoid layout issues caused by text expansion in translations by using min-inline-size and testing with pseudo-locale builds.","seo_keywords":["text expansion in translations","prevent layout breakage","pseudo-locale testing","min-inline-size CSS","i18n layout issues"]}}