Logical properties

From thedaviddias/Front-End-Checklist · View interactive version

Logical properties is an AI agent skill from the GitHub repository thedaviddias/Front-End-Checklist. Use when reviewing stylesheets, component styles, and responsive behavior related to Use CSS logical properties for i18n and RTL support. Check the rendered layout across breakpoints and interaction states before proposing a fix.

How to use this skill

Skill file

Use CSS logical properties for i18n and RTL support

Physical CSS properties (margin-left, padding-right) are hardcoded to screen directions. In right-to-left languages (Arabic, Hebrew, Persian), what should be margin-left becomes margin-right. Without logical properties, supporting RTL requires maintaining duplicate stylesheets or complex overrides with [dir=rtl] selectors. Logical properties handle this automatically.

Quick Reference

Check

Find all uses of margin-left, margin-right, padding-left, padding-right, border-left, border-right, left, right (as positioning) that should be converted to logical equivalents.

Fix

Convert physical direction properties to their CSS logical property equivalents for RTL and internationalization support.

Explain

Explain CSS logical properties, the difference between physical and logical directions, and how they enable RTL language support.

Code Review

Review stylesheets, component styles, and responsive states related to Use CSS logical properties for i18n and RTL support. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.


For full implementation details, code examples, and framework-specific guidance,

see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/logical-properties

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.