CSSMay 2026 Β· 5 min read

CSS Logical Properties: Writing Mode-Aware Layouts

Replace physical properties (top, left, right, bottom) with logical ones for internationalized layouts.

🌐
Try the CSS Minifier
Free, no signup
β†’
DG
Derek Giordano
Designer & Developer
In this guide
01What Logical Properties Are02Physical vs Logical Mapping03Practical Migration04When to Switch
⚑ Key Takeaways
  • Replace physical properties (top, left, right, bottom) with logical ones for internationalized layouts.
  • What Logical Properties Are.
  • Physical vs Logical Mapping.
  • Practical Migration.
  • When to Switch.

What Logical Properties Are

CSS logical properties replace physical direction properties (top, right, bottom, left, width, height) with flow-relative equivalents that adapt to writing direction. margin-left becomes margin-inline-start. padding-top becomes padding-block-start. width becomes inline-size. Why? In right-to-left (RTL) languages like Arabic and Hebrew, β€˜start’ is the right side, not the left. Logical properties automatically flip, so one stylesheet works for both LTR and RTL without overrides.

Physical vs Logical Mapping

The mapping is straightforward. Inline axis (horizontal in LTR): left β†’ inline-start, right β†’ inline-end, width β†’ inline-size. Block axis (vertical in LTR): top β†’ block-start, bottom β†’ block-end, height β†’ block-size. Shorthands exist: margin-inline: 0 16px; sets start and end margins. padding-block: 8px; sets both block start and end. Border, inset, and overflow properties all have logical equivalents. Use the CSS Minifier to optimize your updated stylesheets.

Practical Migration

Migrate incrementally: start with new components using logical properties exclusively. For existing code, replace physical properties in shared/base styles first (typography, spacing utilities, layout primitives), then component styles. Tools like stylelint-use-logical can flag physical properties in new code. The switch is mechanical β€” margin-left to margin-inline-start β€” and rarely affects visual output in LTR layouts.

When to Switch

Switch to logical properties when: you support or plan to support RTL languages, you’re building a design system or component library (future-proof), or you’re starting a new project (no legacy to migrate). Physical properties remain fine for: truly physical positioning (a shadow should always fall down regardless of text direction), legacy projects with no internationalization plans, and quick prototypes. Browser support is excellent: all modern browsers since 2020.

Frequently Asked Questions

Will logical properties change my LTR layout?+
No. In LTR mode, logical properties produce identical results to physical ones. margin-inline-start equals margin-left in LTR. The difference only appears in RTL contexts.
Are logical properties supported everywhere?+
Yes, in all modern browsers since 2020. Safari 15+, Chrome 87+, Firefox 66+, Edge 87+. Safe to use without fallbacks for modern browser targets.
Should I use logical properties for everything?+
For layout and spacing, yes. For truly physical effects (box-shadow direction, background-position), physical properties still make more sense.
Try it yourself

Use the CSS Minifier β€” free, no signup required.

⚑ Open CSS Minifier
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.