white-space-collapseBaseline · Widely available
The white-space-collapse CSS property sets whether new line characters are shown as line breaks, and whether multiple consecutive spaces are all displayed or combined.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 19, 2024. Widely available since Sep 19, 2026.
Browser support
DesktopChrome
1–113Not supported
114+Supportedsince May 30, 2023
Current: 155Edge
12–113Not supported
114+Supportedsince Jun 2, 2023
Current: 154Firefox
1–123Not supported
124+Supportedsince Mar 19, 2024
Current: 157Safari
1–17.3Not supported
17.4+Supportedsince Mar 5, 2024
Current: 27MobileChrome Android
18–113Not supported
114+Supportedsince May 30, 2023
Current: 155Firefox Android
4–123Not supported
124+Supportedsince Mar 19, 2024
Current: 157Safari iOS
1–17.3Not supported
17.4+Supportedsince Mar 5, 2024
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: white-space-collapse.
Feature detection
CSS · check before using
@supports (white-space-collapse: initial) {
/* styles that rely on white-space-collapse */
}
/* or in JavaScript */
if (CSS.supports("white-space-collapse", "initial")) {
// use it
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| white-space-collapse | 114 | 114 | 124 | 17.4 | 114 | 124 | 17.4 |
| white-space-collapse.break-spaces | 114 | 114 | 124 | 17.4 | 114 | 124 | 17.4 |
| white-space-collapse.collapse | 114 | 114 | 124 | 17.4 | 114 | 124 | 17.4 |
| white-space-collapse.preserve | 114 | 114 | 124 | 17.4 | 114 | 124 | 17.4 |
| white-space-collapse.preserve-breaks | 114 | 114 | 124 | 17.4 | 114 | 124 | 17.4 |
| white-space-collapse.preserve-spaces | ✕ | ✕ | 124 | ✕ | ✕ | 124 | ✕ |