white-space
matches Chrome on some values: 8 of 10 examples match Chrome
css-text-4
Some of the examples match Chrome and some do not: the count says how many, and the values that differ are listed first, each with its difference map.
The 2 that do not: white-space:nowrap, white-space:pre. They come first below, each with its difference map.
What the specification says
| Initial value | normal |
|---|---|
| Applies to | text |
| Inherited | see individual properties |
| Percentages | n/a |
| Computed value | specified keyword |
| Syntax | normal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'> || <'white-space-trim'> |
The measurements
10 examples: two render differently and come first and eight match Chrome. Each is one declaration on a small page, drawn by Chrome and by our engine. Drag on a picture to move the line between them.
white-space:nowrap
renders differently

| Pixels that differ from Chrome | 584 |
|---|---|
| The same, on the page without the declaration | 584 |
| Largest difference on one colour channel | 52 of 255 |
| The same, on the page without the declaration | 48 of 255 |
The declaration takes effect differently from Chrome: the difference map shows where.
white-space:pre
renders differently

| Pixels that differ from Chrome | 584 |
|---|---|
| The same, on the page without the declaration | 584 |
| Largest difference on one colour channel | 52 of 255 |
| The same, on the page without the declaration | 48 of 255 |
The declaration takes effect differently from Chrome: the difference map shows where.
white-space:collapse, white-space:wrap, white-space:normal
same effect as Chrome

| Pixels that differ from Chrome | 584 |
|---|---|
| The same, on the page without the declaration | 584 |
| Largest difference on one colour channel | 48 of 255 |
| The same, on the page without the declaration | 48 of 255 |
The pages differ by 584 pixels with the declaration and by 584 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.
white-space:pre-line, white-space:preserve-breaks
same effect as Chrome

| Pixels that differ from Chrome | 584 |
|---|---|
| The same, on the page without the declaration | 584 |
| Largest difference on one colour channel | 48 of 255 |
| The same, on the page without the declaration | 48 of 255 |
The pages differ by 584 pixels with the declaration and by 584 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.
white-space:break-spaces
same effect as Chrome

| Pixels that differ from Chrome | 1,402 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 of 255 |
The pages differ by 1,402 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.
white-space:pre-wrap, white-space:preserve
same effect as Chrome

| Pixels that differ from Chrome | 852 |
|---|---|
| The same, on the page without the declaration | 852 |
| Largest difference on one colour channel | 48 of 255 |
| The same, on the page without the declaration | 48 of 255 |
The pages differ by 852 pixels with the declaration and by 852 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.
Which values were measured
A match on one example means a match at the value tried. The property’s grammar has 16 branches, and 10 of them carry a measurement.
| Value | Measured |
|---|---|
pre | renders differently |
pre-wrap | same effect as Chrome |
pre-line | same effect as Chrome |
collapse | same effect as Chrome |
discard | not measured |
preserve | same effect as Chrome |
preserve-breaks | same effect as Chrome |
preserve-spaces | not measured |
break-spaces | same effect as Chrome |
wrap | same effect as Chrome |
nowrap | renders differently |
discard-before | not measured |
discard-after | not measured |
discard-inner | not measured |
normal | same effect as Chrome |
none | not measured |
Measured against Chrome 148.0.7778.96 on 5 November 2026, with up to 40 candidate values tried per property. How it was measured