CodePark/ questions / Modern CSS
START PRACTICINGPRACTICE
Frontend question · CSS & HTML › Modern CSS

An element in a dir="rtl" page with horizontal writing mode has margin-inline-start: 1rem. Which side gets the margin?

Right

Right is correct. Logical properties follow the writing direction, not fixed sides. Here the inline axis is horizontal. In right-to-left (rtl) text, it starts on the right. So margin-inline-start adds the margin on the right.

Left is the tempting wrong answer. It would be right in
ltr (left-to-right) text. That is why logical properties make RTL support easier: one rule works for both directions.