display: contents
The display: contents CSS declaration sets an element to display only its contents, not itself.
Status
Limited availability
MDN documentation
Specifications
Browser support (view on caniuse.com)
- Chrome ❌ See crbug.com/40866683
- Chrome Android ❌ See crbug.com/40866683
- Edge ❌ See crbug.com/40866683
- Firefox ❌ See https://bugzil.la/1791648,https://bugzil.la/1553549 Vendor position : positive
- Firefox for Android ❌ See https://bugzil.la/1791648,https://bugzil.la/1553549 Vendor position : positive
- Safari ❌ See webkit.org/b/255149 Vendor position : neutral (concerns: accessibility)
- Safari on iOS ❌ See webkit.org/b/255149 Vendor position : neutral (concerns: accessibility)
Surveys
- State of CSS 2025 > usage > gamechanger feature
- State of CSS 2025 > usage > favorite new features
- State of CSS 2025 > usage > css interoperability features
- State of CSS 2025 > reading list > reading list
- State of CSS 2025 > other features > other features pain points
- State of CSS 2025 > layout > layout pain points
- State of CSS 2025 > features > all features
Developer signals
Votes: 5
If you want this feature to be available in all browsers, vote for it by adding a thumbs up reaction (👍) to this GitHub issue, and leave a comment with more information.
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist