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: 155Edge
12–83Not supported
84+Supportedsince Jul 16, 2020
Current: 154Firefox
1–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157Safari
1–14Not supported
14.1+Supportedsince Apr 26, 2021
Current: 27MobileChrome Android
18–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155Firefox Android
4–62Not supported
63+Supportedsince Oct 23, 2018
Current: 157Safari iOS
1–14Not supported
14.5+Supportedsince Apr 26, 2021
Current: 27How 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
}Specification
Usage share
Sub-features
Support for each part of the feature (3). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| column-gap.flex_context | 84 | 84 | 63 | 14.1 | 84 | 63 | 14.5 |
| gap.flex_context | 84 | 84 | 63 | 14.1 | 84 | 63 | 14.5 |
| row-gap.flex_context | 84 | 84 | 63 | 14.1 | 84 | 63 | 14.5 |