CSS Portal

CSS min-block-size Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The min-block-size property defines the minimum size that an element is allowed to occupy along the block dimension — the logical axis that runs in the flow direction of the document. It establishes a lower bound for the used block-size during layout, so even when the surrounding layout, flex or grid rules, or intrinsic sizing would otherwise reduce an element, it cannot be made smaller than this constraint. The property is part of the logical-sizing family and is used to make layouts writing-mode–aware without switching between physical dimensions like height or width; it is not inherited by default and applies to the element’s own box when computing its used size. For comparison with a related physical property see min-height.

In practice, min-block-size interacts with other logical-size constraints and layout mechanisms. It works together with block-size (the element’s desired size on the block axis) and max-block-size (an upper bound) to form the range of allowed sizes during the formatting process; these constraints are taken into account when resolving intrinsic size calculations, percentage-based layout, and when distributing available space in layout models. Layout systems such as flexbox and grid respect the minimum block-size when determining how items shrink or expand, so a flex item will not be reduced below its established minimum even if the flex container’s algorithm would otherwise reduce it further.

Because min-block-size is a logical property, its effect depends on the element’s writing mode and directionality: in horizontal writing modes it maps to the usual vertical dimension, while in vertical writing modes it maps to the horizontal extent. It also interacts with box model considerations — for example, how padding and borders factor into the rendered result is influenced by box-sizing — and with overflow behavior: if content grows beyond the minimum the element may expand (up to limits) or trigger overflow handling such as scrolling or clipping depending on the container’s overflow settings (overflow). Because it imposes a lower bound, authors commonly use it to ensure minimum legibility, spacing, or to avoid unwanted collapse in responsive and component-based layouts while keeping layouts robust across different writing modes and orientations; see also layout positioning and size tuning via logical properties.

Definition

Initial value
0
Applies to
same as width and height
Inherited
no
Computed value
same as width and height
Animatable
a length, percentage or calc();
JavaScript syntax
object.style.minBlockSize

Interactive Demo

This is a box where you can change the minimum block size.
If there is more content than the minimum the box will grow in the block dimension as needed by the content.

Syntax

min-block-size: <min-width>  

Values

  • <min-width>Defines the min-block-size as an value or percentage.

Example

<div class="demo">
<h2>Horizontal example (default)</h2>
<div class="box short">
Short content
</div>

<h2>Vertical example</h2>
<div class="box vertical short">
Short
</div>
</div>
:root {
    --min-block: 120px;
    --block: 50px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    padding: 24px;
    background: #f7f9fc;
    color: #111827;
}

.demo {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

h2 {
    margin: 0;
    font-size: 16px;
    color: #374151;
}

.box {
    /* block-size sets the size along the block axis; min-block-size enforces a minimum */
    block-size: var(--block);
    min-block-size: var(--min-block);
    inline-size: 100%;
    padding: 12px;
    background: linear-gradient(180deg, #fff, #eef2ff);
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box.vertical {
    /* In vertical writing modes the block axis runs horizontally, so min-block-size affects width */
    writing-mode: vertical-rl;
    inline-size: auto;
    padding: 8px;
}

.box.short {
    /* content is intentionally short so block-size would be smaller than min-block-size */
}

Browser Support

The following information will show you the current browser support for the CSS min-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
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!