CSS Bug Hunt Hard +35 XP
Subgrid Missing
Grid items don't align to parent grid columns.
CSSFind the bug
1
.parent { display: grid; grid-template-columns: 1fr 1fr 1fr; }2
.child { display: grid; } The bug is on line 2
Select the correct fix
Show answer and explanation
Answer: Use display: contents or grid-column: span 3 with subgrid
Children of a grid container create their own grid context. Use subgrid (grid-template-columns: subgrid) to inherit parent tracks.
Hint: A child grid doesn't automatically inherit parent grid tracks.
What this challenge tests
Bug Hunt in CSS: grid, subgrid.