smithtimmytim/brightlycolored.org

View on GitHub
_posts/2018-01-23-why-display-contents-is-not-css-grid-layout-subgrid-by-rachel-andrew.markdown

Summary

Maintainability
Test Coverage
---
title: 'Why display: contents Is Not CSS Grid Layout subgrid by Rachel Andrew'
date: 2018-01-23 10:57:00 -06:00
tags:
- CSS
- grid layout
link_url: https://rachelandrew.co.uk/archives/2017/07/20/why-display-contents-is-not-css-grid-layout-subgrid/
---

Rachel Andrew:

> You won’t get far through a conversation about subgrid in CSS Grid Layout without someone suggesting that display: contents solves most of the problems anyway, so do we really need subgrid? This really isn’t the case, display: contents does indeed solve a class of problems, but these are different problems to those that subgrid would help us with.

Rachel Andrew explains in detail how `display: subgrid` is different to `display: contents`. Interestingly, I had a similar issue just the other day. In my situation however, `display: contents` would've worked perfectly. If you're trying to keep up to date with all the new layout stuff, this article is a must-read.