css.properties

inline-size

The inline-size property sets the size of an element in the inline direction.

Formal Syntax

<'width'>

See specification

JavaScript Access

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

Logical Property Group

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

Browser Support

standard | MDN · Spec · Spec

FeatureChromeFirefoxSafariEdge
inline-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:

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

Related Properties