---
source: https://iinventedlight.com/library/notes/css-logical-properties.md
title: "CSS logical properties: style against writing direction"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (web.dev); CC-BY-4.0 (Chrome Developers); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: web.dev, Logical properties; Chrome Developers, CSS: Modern Architecture. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-23
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-23
as_of: 2026-11-23
confidence: medium
untested: "Not reproduced (2026-11-23). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: css-logical-properties"
tags: [css, logical-properties, writing-mode, layout, web]
client: Librarian
sources:
  - id: S1
    title: "Logical properties"
    publisher: web.dev
    url: https://web.dev/learn/css/logical-properties
    accessed: 2026-11-23
    license: "CC-BY-4.0"
  - id: S2
    title: "CSS: Modern Architecture"
    publisher: Chrome Developers
    url: https://developer.chrome.com/docs/modern-web-guidance/guides/css/css-layout
    accessed: 2026-11-23
    license: "CC-BY-4.0"
---
# CSS logical properties: style against writing direction
**Answer:** Logical properties can change if the text direction or writing mode changes. Use logical properties such as inline-size, block-size, and margin-inline for layout dimensions and spacing.

## Flow-relative sizing and spacing

A common pattern is a text label with an icon that sits to the left, but that only works when the text direction is left to right.

If the text direction changes to right-to-left, that physical layout can sit the icon up against the text.

Logical properties can change if the text direction or writing mode changes.

Flow-relative equivalents include max-inline-size and max-block-size, and also min-inline-size and min-block-size.

You can use padding-block-start, margin-inline-start, and inset-block-start instead of physical sides.

## When to prefer them in layout

Reach for intrinsic sizing and logical properties before hardcoded dimensions or complicated media queries.

Use logical properties such as inline-size, block-size, margin-inline, padding-block, and inset-inline-start for layout dimensions and spacing.

## See also

- [css-flexbox-basics](https://iinventedlight.com/library/notes/css-flexbox-basics/)
- [css-grid-basics](https://iinventedlight.com/library/notes/css-grid-basics/)
- [css-cascade](https://iinventedlight.com/library/notes/css-cascade/)

## Claims

- id: C1
  claim: Logical properties can change if the text direction or writing mode changes.
  source: S1
  evidence: "change if the text direction or writing mode changes"

- id: C2
  claim: max-inline-size and max-block-size are flow-relative equivalents.
  source: S1
  evidence: "flow-relative equivalents are max-inline-size and max-block-size"

- id: C3
  claim: Prefer logical properties for layout dimensions and spacing.
  source: S2
  evidence: "Use logical properties ( inline-size , block-size , margin-inline"

- id: C4
  claim: Reach for logical properties before hardcoded dimensions.
  source: S2
  evidence: "logical properties, and aspect-ratio before resorting to hardcoded dimensions"

## Sources

- [S1] Logical properties. web.dev. https://web.dev/learn/css/logical-properties . License: CC-BY-4.0. Accessed 2026-11-23.

- [S2] CSS: Modern Architecture. Chrome Developers. https://developer.chrome.com/docs/modern-web-guidance/guides/css/css-layout . License: CC-BY-4.0. Accessed 2026-11-23.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: web.dev, Logical properties; Chrome Developers, CSS: Modern Architecture. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. CC-BY-4.0 (https://developers.google.com/site-policies). Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License. Copyright Google LLC. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
