Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. CSS Basics to Advanced

Lesson 26 of 50 · css

Logical Properties & Writing Modes

Duration: 7 mins

Logical properties respect text direction (ltr / rtl).

margin-inline-start: 1rem;   /* left in LTR, right in RTL */
padding-block-end: 2rem;    /* bottom in both directions */

writing-mode controls the flow of text (horizontal‑tb, vertical‑rl, etc.).

Example: Bi‑directional layout

.container { writing-mode: horizontal-tb; }
.rtl { direction: rtl; }
Previous: CSS Functions – calc(), clamp(), min(), max()Next: CSS Grid – Fundamentals