CSS block-size Property
Description
The block-size CSS property is a modern, logical way to control the dimension of an element along the block axis of the writing mode in use. Unlike traditional properties such as height, which explicitly target the vertical dimension, block-size adapts automatically to the writing mode, text direction, and text orientation. In horizontal writing modes, the block axis corresponds to the vertical direction, while in vertical writing modes, it corresponds to the horizontal direction. This makes block-size particularly useful for responsive design and internationalization, as it allows elements to resize correctly across different languages and writing systems without needing to redefine separate width or height values.
Using block-size can simplify layout management when combined with other logical properties, such as inline-size. Together, these properties provide a more consistent and predictable approach to dimensioning elements across varying writing modes and container orientations. For example, when designing a multilingual website, a text container’s block dimension can remain consistent whether the content flows top-to-bottom or left-to-right. This logical approach reduces the need for complex media queries or conditional CSS rules, which traditionally relied on absolute dimensions using height and width.
Additionally, block-size integrates seamlessly with CSS layout models, including Flexbox, Grid, and multi-column layouts. In a Flexbox container, for instance, an element’s block-size can be used to define its growth along the cross axis without disrupting the flow along the main axis. Similarly, in a grid layout, specifying block-size for grid items can help maintain proportional spacing and alignment while respecting the grid tracks. This property also works well with other box model properties such as min-block-size and max-block-size, allowing designers to create adaptable, constraint-based designs that maintain both flexibility and visual stability.
Definition
Interactive Demo
Syntax
block-size: <width>
Example
Browser Support
The following information will show you the current browser support for the CSS block-size property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
