css-i18n
Installation
SKILL.md
CSS Internationalization
Convert physical CSS properties (left, right, margin-left) to logical equivalents (inset-inline-start, margin-inline-start) so layouts flip automatically in RTL contexts.
Why this matters: Physical properties are anchored to the viewport, not the text direction. A margin-left: 16px stays on the left even when dir="rtl" — breaking the visual flow for Arabic, Hebrew, and other RTL scripts. Logical properties follow the text direction automatically.
Step 1: Detect Styling Approach
Determine how the project writes CSS. This decides which patterns to scan for and which reference file to follow.
Check in order:
- Tailwind CSS —
tailwind.config.*exists, or@tailwind/@import "tailwindcss"appears in CSS files. Seereferences/tailwind.md. - CSS Modules — files matching
*.module.cssor*.module.scss. Seereferences/css-modules-and-vanilla.md. - CSS-in-JS — imports from
styled-components,@emotion/styled,@emotion/css,stitches,vanilla-extract. Follow the same property mappings as vanilla CSS, but in camelCase (see Step 2 inline styles section). - Vanilla CSS — plain
.cssor.scssfiles. Seereferences/css-modules-and-vanilla.md. - Inline styles —
style={{ marginLeft: ... }}in JSX/TSX. Follow camelCase mappings in Step 2.