Day 206 - Please, stop using NON-logical CSS properties!
🎉 An Awesome CSS Link a Day - Day 206 🎉
Please, stop using NON-logical CSS properties!
#AnAwesomeCSSLinkADay #YouDontMessWithCSS #CSS
Hello there 👋 Today we tackle a hot topic in modern CSS: should developers completely abandon non‑logical properties in favor of logical ones? With the rise of internationalization and responsive design, the debate has never been more relevant.
📐 Theory: Logical vs. Non‑Logical Properties
When styling layouts, developers often rely on physical properties like margin-left or padding-top. However, modern CSS provides logical properties that adapt to writing modes, text direction, and international layouts. Understanding when to use them is crucial for accessibility and maintainability.
🚀 Today’s Link
For a thoughtful exploration of this debate, check out this article by Frontend Masters:
It dives deep into the trade‑offs, showing why logical properties are key to modern CSS while recognizing the role of non‑logical ones in certain use cases.
💫 Giveaways
❓ Why This Rocks
🗣️ Join the Conversation
Let’s discuss how logical properties are shaping the future of CSS internationalization! 🚀
Web Architect presso Antreem S.r.l.
1wIt's a pity that many shorthand properties do _not_ suppor logical properties, like `margin` or `inset`. This means `margin: 1px 2px 3px 4px` will always mean the top margin is 1px, then the right is 2px, the bottom is 3px and the left is 4px. Likewise, `translate` too is a translation from the _left_ and the _top_, regardless of the flow direction, and we don't even have a `translate-block`/`translate-inline`. Even new stuff like `shape()` isn't affected by the direction. Maybe I should write an article about it...
🎥 Sensei & Co-Host @ DevDojo IT 🎤 Speaker ♿️ Accessibility WCAG Expert ✨ Turning Designs into interactive things 🦸♂️ Your friendly neighborhood Design Engineer
1wToday's link: https://frontendmasters.com/blog/should-we-never-use-non-logical-properties/