Skip to content
Skillpedia
Websites & UI (frontend)75k · #3052

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.md

Copy 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

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/text-expansion/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

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.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#3052
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills