The element generates no box: its children take part in its parent's formatting context as if it were not there. Everything that is not the box — its id, its links, its tagged-PDF structure, its string-set — still belongs to the element.
display: contents: none of it is drawn. Its three children are the flex items of the row, spaced by the 6pt gap exactly as if they were direct children.<tr> is display: contents, so the cells are wrapped in one anonymous row: all four sit on one line.| a1 | a2 |
| b1 | b2 |
This sentence has a flagged phrase whose span is contents, with its own ::before still generated in the middle of the line, and it wraps like any other text.
This page's <body> is display: contents with a cream background: it generates no box, and the background still fills the whole page canvas.
The running header above changed from “One” to “Two”: each chapter is a <section style="display: contents"> whose string-set is assigned where its content begins. The page break is on the <h1> inside it: a break-before on the display: contents element itself would have no box to break before.