Logical properties adapt layouts for different writing modes and languages. Here's how to use them.
Physical vs Logical
Block and Inline Axes
Sizing Properties
Padding and Margin
Border Properties
Position Properties
Text Alignment
Writing Modes
RTL Support
Practical Examples
Scroll Properties
Migration Strategy
Best Practices
Adoption:
✓ Use logical properties for new code
✓ Migrate gradually
✓ Test with RTL languages
✓ Consider writing mode changes
Naming:
✓ block = vertical (in horizontal modes)
✓ inline = horizontal (in horizontal modes)
✓ start/end instead of left/right
✓ Use shorthand when possible
Avoid:
✗ Mixing physical and logical for same property
✗ Assuming left-to-right only
✗ Forgetting border-radius logical values
✗ Ignoring writing-mode contexts
Conclusion
Logical properties create layouts that adapt to different writing modes and text directions. Use them for international-ready designs, replacing physical properties like margin-left with margin-inline-start. They're well-supported in modern browsers and essential for RTL language support.