Figma / Anima / Locofy CSS Un-breaker
Relax rigid pixel boxes in CSS exported from Figma, Anima, and Locofy so translated labels can wrap instead of clipping.
100% client-side: Your CSS and HTML files never leave your browser.
Why Figma-to-HTML Exports Break in German, French, and Arabic
Figma frames are drawn around English strings. Auto Layout can become flex or grid, but Anima and Locofy still emit absolute positioning and rigid pixel boxes. A short English label has no spare line in German, French, or Arabic. German copy often runs about thirty percent longer, French about twenty percent longer, and mixed UI copy often grows by twenty to thirty five percent.
A fixed height clips the second line of a button. A fixed width clips the last word of a heading. White space set to nowrap forbids wrapping, and that is harsh for Arabic because the line direction reverses. Overflow set to hidden then discards the extra words, so the label looks cut off. Absolute top and left pin a title to the English baseline, so a wrap covers the subtitle instead of pushing it. Rebuilding that parent needs the markup.
Fluid replacements keep the English size as a floor. A minimum height holds the original pixel size and an automatic height lets a second line grow the box. A minimum width holds a short label, an automatic width lets it grow, and a maximum width of one hundred percent keeps it inside the parent. Normal white space plus overflow wrap anywhere wraps a long token, and visible overflow keeps that line on screen. Icons at or below twenty four pixels stay fixed, because a glyph is artwork and should not stretch.
Rigid vs. Fluid CSS Override
The table is the mapping for each rule block. These sizes match a typical Anima or Locofy button and card. Append the override after the original CSS so a responsive at rule keeps the same selector.
| Trap | Exported CSS | Localization-safe override |
|---|---|---|
| Fixed height | height: 44px | min-height: 44px; height: auto; |
| Fixed width | width: 148px | min-width: 148px; width: auto; max-width: 100%; |
| No wrap | white-space: nowrap | white-space: normal; overflow-wrap: anywhere; |
| Clipping | overflow: hidden with a fixed height | overflow: visible; |
| Absolute | position: absolute with top or left | Manual Flex or Grid on the parent |
FAQ
How do Anima and Locofy exports differ?
Anima often turns auto layout into flexbox. Locofy emits similar CSS that still needs a direct check. Both leave fixed boxes, nowrap, and absolute coordinates on growing text.
Why should icons at twenty four pixels or below stay fixed?
A glyph at that size is artwork. Automatic width or height stretches it when a label wraps. Keep it fixed unless the box holds a word.
When should an override patch be used instead of a full rewrite?
A patch loads after an untouched export. A rewrite replaces one stylesheet or HTML file. Absolute rules stay unchanged either way.
Why is position absolute left for manual review?
Pixel top and left do not reserve space, so text can overlap the next element. Move the parent to flex or grid in the markup. The selector and line are listed, and the rule is not rewritten.
Does the CSS leave the browser?
No. Scanning, patching, and the download run locally. Files stay on the computer, with a two megabyte limit, and nothing is uploaded.
Absolute positioning in these exports is covered in translating Figma, Anima, and Locofy HTML. See also how to translate HTML without breaking layout, the CSS logical properties converter, and the Webflow localization cleaner. More utilities are in the tools hub. Static HTML can be translated with HTML Translate.