The max-block-size property sets the maximum size of an element on the block axis — equivalent to max-height in horizontal writing modes or max-width in vertical writing modes, depending on writing-mode..panel {
max-block-size: 400px;
}.article {
max-block-size: 80vh;
}min:0max:9999step:1units:% | px | em | rem | vw | vhnoneNo maximum (default value).min-contentMinimum content size on the block axis.max-contentMaximum content size on the block axis.fit-contentShrinks to content size on the block axis, clamped between min-content and max-content.fit-content()fit-content(<length-percentage>) — constrains size on the block axis.calc()Computes a value from a math expression.CSS Logical Properties and Values Level 1Editor's Draft<length-percentage>W3CMDNCSSShow all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationvalue typessourcesvisual demonstrationpreviousnext