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.
Reference
Properties for sizing
Properties for margins, borders, and padding
border-blockborder-block-colorborder-block-endborder-block-end-colorborder-block-end-styleborder-block-end-widthborder-block-startborder-block-start-colorborder-block-start-styleborder-block-start-widthborder-block-styleborder-block-widthborder-colorborder-inlineborder-inline-colorborder-inline-endborder-inline-end-colorborder-inline-end-styleborder-inline-end-widthborder-inline-startborder-inline-start-colorborder-inline-start-styleborder-inline-start-widthborder-inline-styleborder-inline-widthborder-start-start-radiusborder-start-end-radiusborder-end-start-radiusborder-end-end-radiusborder-styleborder-widthmargin(logicalExperimental keyword)margin-blockmargin-block-endmargin-block-startmargin-inlinemargin-inline-endmargin-inline-startpadding(logicalExperimental keyword)padding-blockpadding-block-endpadding-block-startpadding-inlinepadding-inline-endpadding-inline-start
Properties for floating and positioning
clear(inline-endandinline-startkeywords)float(inline-endandinline-startkeywords)insetinset-blockinset-block-endinset-block-startinset-inlineinset-inline-endinset-inline-start
Properties for size containment
Other properties
caption-side(inline-endandinline-startkeywords)overflow-blockoverflow-inlineoverscroll-behavior-blockoverscroll-behavior-inlineresize(blockandinlinekeywords)text-align(endandstartkeywords)
Deprecated properties
offset-block-endNon-standard Deprecated (nowinset-block-end)offset-block-startNon-standard Deprecated (nowinset-block-start)offset-inline-endNon-standard Deprecated (nowinset-inline-end)offset-inline-startNon-standard Deprecated (nowinset-inline-start)
Guides
Specifications
| Specification |
|---|
| CSS Logical Properties and Values Level 1 |
Browser compatibility
See the individual property pages for full compatibility information.