×

css · level 3 · unit 4 · lesson 2

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Logical properties follow the text, not the screen edges.

English runs left to right, but Arabic and Hebrew run right to left. A property like margin-left is tied to the screen, so it lands on the wrong side when the page flips. A follows the text instead.

The is the way text runs along a line. The is the way paragraphs stack. So padding-inline sets both ends of a line, margin-block sets above and below, and inline-size replaces width.

-start means where the text begins. In English that is the left, but in a box with dir="rtl" it becomes the right.

<blockquote class="quote">Hello</blockquote>
<blockquote class="quote" dir="rtl">مرحبا</blockquote>
.quote {
  margin-inline: 0;
  padding-inline-start: 16px;
  border-inline-start: 6px solid #0f766e;
}

Press show my page to see it here.