CSS logical properties and values

The CSS logical properties and values module introduces logical properties and values that provide the ability to control layout through logical, rather than physical, direction and dimension mappings.

The module also defines logical properties and values for properties previously defined in CSS 2.1. Logical properties define direction‐relative equivalents of their corresponding physical properties.

Block vs. inline

Logical properties and values use the abstract terms block and inline to describe the direction in which they flow. The physical meaning of these terms depends on the writing mode.

Block dimension

The dimension perpendicular to the flow of text within a line, i.e., the vertical dimension in horizontal writing modes, and the horizontal dimension in vertical writing modes. For standard English text, it is the vertical dimension.

Inline dimension

The dimension parallel to the flow of text within a line, i.e., the horizontal dimension in horizontal writing modes, and the vertical dimension in vertical writing modes. For standard English text, it is the horizontal dimension.

New properties and values

CSS was initially designed with only physical coordinates in its controls. The module defines new flow–relative equivalents for many values and properties.

Some physical properties now have logical equivalents. Properties that accept physical values (top, bottom, left, right) now also accept flow-relative logical values (block-start, block-end, inline-start, inline-end).

The transition to logical axes is ongoing and not fully defined by the module; some properties don't yet have logical equivalents.

Reference

Properties for sizing

Properties for margins

Properties for paddings

Properties for borders

Properties for border radius

Properties for positioning

Properties for size containment

Properties for scrolling

Properties for floating

  • clear (inline-end and inline-start keywords)
  • float (inline-end and inline-start keywords)

Other properties

Deprecated properties

Unsupported properties

The following properties don't have logical equivalents:

Unsupported values

Guides

Specifications

Specification
CSS Logical Properties and Values Level 1

Browser compatibility

See the individual property pages for full compatibility information.