css.properties

block-size

The block-size property sets the size of a block in the block direction.

Formal Syntax

<'width'>

See specification

JavaScript Access

// Access via element.style
element.style.blockSize = 'auto';

Logical Property Group

This property belongs to the size logical property group, which includes:

Browser Support

standard | MDN · Spec · Spec

FeatureChromeFirefoxSafariEdge
block-size574112.179
anchor-size12514726125
auto8415.179
fit-content579412.179
fit-content_function91
max-content576612.179
min-content576612.179
stretch138138

Behind a Flag

Some browsers require enabling a flag or preference:

  • block-size: fit-content_function — firefox: #layout.css.fit-content-function.enabled (since 91)

Related Properties