text-expansion
What it does
This skill checks CSS for fixed sizes and hard cut-offs that would break translated text. It is for developers and designers who support more than one language.
When to use it
- ✓When a button or label has a fixed width that would break with a longer language.
- ✓When a website is about to be translated into several languages.
- ✓When a layout cuts off or hides text that comes from translation files.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/text-expansion/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“We're translating our app into German and the buttons overflow. Can you make the layout handle longer text?”
5 new skills a week. 1 minute to read.
How it works
The agent finds fixed widths and hard cut-offs in the styles. It replaces them with flexible sizes and suggests testing with a stretched fake language.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Design UI components to accommodate text expansion from translation
Layouts 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.
Quick Reference
- German translations are typically 30% longer than English; Finnish 50% longer
- Avoid fixed-width containers for text-bearing elements like buttons and labels
- Use min-inline-size instead of inline-size to allow natural growth
- Test with a pseudo-locale that inflates strings before committing translations
- Include pseudolocalization in CI or preview testing, not just manual QA
Check
Identify 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.
Fix
Replace 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.
Explain
Explain how text expansion during translation breaks fixed layouts and what CSS patterns prevent overflow and clipping across locales.
Code Review
Review 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.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/i18n/text-expansion
FAQ
How much longer can translated text be?
The skill notes that German is often about 30 percent longer than English, and Finnish about 50 percent longer.
What is pseudo-localization?
It is a test version of the site with inflated placeholder text, so layout problems show up before real translations arrive.
Should I remove overflow hidden everywhere?
The skill suggests removing it from interactive elements, since hidden overflow can cut off text.
Details
Original description by the author
Use when reviewing CSS for fixed dimensions, truncation, or overflow rules on elements that render translatable strings.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3052
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.