🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 4 Min Lesezeit
0

Is Your CSS Logical?

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Take a look at this CSS snippet. What's wrong with it?




CODE
p {
border-top: 2px solid red;
margin-left: 2rem;
width: 80ch;
}






Depending on your website audience, there are either zero or three errors. Before explaining which errors, let's set some context.






A Matter of Perspective



When you step onto a boat, you won't hear terms like "left" or "right". That's because the left/right sides of a boat depend on the observer's perspective. Instead, they use

Image created by Pearson Scott Foresman and released into the public domain. , which allow doctors and veterinarians to describe the location of body parts unambiguously, regardless of the relative position of the patient or doctor.





CSS Internationalization



If your web applications are used globally, you must design them to adapt to various linguistic needs. For example, languages like English and Spanish are written from left-to-right (LTR); Arabic and Hebrew are written from right-to-left (RTL); Mongolian and traditional Japanese are written from top to bottom.



So, when you use a CSS declaration like this:




CODE
p {
margin-left: 2rem;
}






Do you mean that (1) you want to add space to the physical left of the paragraph, or (2) you want to add some space before the content starts? For a fully internationalized UI, the correct answer is always (2).






The Logical Solution



You could create separate stylesheets for LTR and RTL languages and load them conditionally. There are even tools like the



Using logical properties, the initial example shown at the beginning of this aticle can be rewritten like this:




CODE
p {
border-block-start: 2px solid red;
margin-inline-start: 2rem;
inline-size: 80ch;
}






Updating an existing CSS stylesheet to use logical properties might seem daunting at first. However, most of the work involves simply replacing left with inline-start, right with inline-end, top with block-start, and bottom with block-end. Some properties require different renaming; for example, border-bottom-left-radius becomes border-end-start-radius, height becomes block-size, etc.



The effort is well worth it, as this is a future-proof solution that ensures your website is accessible to everyone. For instance, the to use logical properties.






Logical Properties Reference



Here's a reference table of all the logical properties to help you update your own projects:




























































































































































































Physical Property Logical Property
border-bottom border-block-end
border-bottom-color border-block-end-color
border-bottom-left-radius border-end-start-radius
border-bottom-right-radius border-end-end-radius
border-bottom-style border-block-end-style
border-bottom-width border-block-end-width
border-left border-inline-start
border-left-color border-inline-start-color
border-left-style border-inline-start-style
border-left-width border-inline-start-width
border-right border-inline-end
border-right-color border-inline-end-color
border-right-style border-inline-end-style
border-right-width border-inline-end-width
border-top border-block-start
border-top-color border-block-start-color
border-top-left-radius border-start-start-radius
border-top-right-radius border-start-end-radius
border-top-style border-block-start-style
border-top-width border-block-start-width
bottom inset-block-end
container-intrinsic-height contain-intrinsic-block-size
container-intrinsic-width contain-intrinsic-inline-size
height block-size
left inset-inline-start
margin-bottom margin-block-end
margin-left margin-inline-start
margin-right margin-inline-end
margin-top margin-block-start
max-height max-block-size
max-width max-inline-size
min-height min-block-size
min-width min-inline-size
overscroll-behavior-x overscroll-behavior-inline
overscroll-behavior-y overscroll-behavior-block
overflow-x overflow-inline
overflow-y overflow-block
padding-bottom padding-block-end
padding-left padding-inline-start
padding-right padding-inline-end
padding-top padding-block-start
right inset-inline-end
top inset-block-start
width inline-size





Learn More



Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Is Your CSS Logical?

Thematisch verwandte Begriffe: Your, Logical · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...