display: contents

"display: contents" allows you to control the box generation of an element. The element with "display: contents" won't generate any box, but its children and pseudo-elements will still do it as normal. It's like the element has been replaced by its children and pseudo-elements.

Demo

Specification

Working draft or equivalent

Status in Chromium

Blink>CSS


Enabled by default (tracking bug) in:

  • Chrome for desktop release 65
  • Chrome for Android release 65
  • Android WebView release 65
  • Opera release 52
  • Opera for Android release 52

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Last updated on 2018-01-12