
Anonymous A. answered 12/21/19
CSS Expert with 10+ years of experience
Hello,
You can use the :empty pseudo class.
Note that this isn't strictly related to using CSS Grid for your layout. It's only targeting and empty element within your markup (HTML).
For example, say you have this HTML:
Then when there is no content in .description-container, like this...:
You can then target .description-container, like so with the :empty pseudo-class:
More info on the :empty
CSS pseudo-class on MDN.
Hope this helps.
Regards.