coderef

Flexbox gapBaseline · Widely available

The gap CSS property in a flexbox layout sets the size of the space between items.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 26, 2021. Widely available since Oct 26, 2023.

Browser support

DesktopChrome
1–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155
Edge
12–83Not supported
84+Supportedsince Jul 16, 2020
Current: 154
Firefox
1–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157
Safari
1–14Not supported
14.1+Supportedsince Apr 26, 2021
Current: 27
MobileChrome Android
18–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155
Firefox Android
4–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157
Safari iOS
1–14Not supported
14.5+Supportedsince Apr 26, 2021
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

CSS
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px; /* row-gap column-gap */
}

Feature detection

CSS · check before using
@supports (column-gap: initial) {
  /* styles that rely on column-gap */
}

/* or in JavaScript */
if (CSS.supports("column-gap", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (3). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
column-gap.flex_context84846314.1846314.5
gap.flex_context84846314.1846314.5
row-gap.flex_context84846314.1846314.5