What's the point of naming grid lines?
Hi guys; so here's some code:
5 Replies
So my question is, whats the point of naming grid lines when I can just use the line number itself?
Instead of
Why not just omit
col-start
and do this:
With a repeat, it doesnt make much sense, because all grid lines will get the same name, but when you give each column separate line names, you can assign childs easier (specially with overlapping regions), here a wonderful example (not mine)
https://codepen.io/hexagoncircle/pen/dyejrpE
Ryan Mulligan
CodePen
Layout Breakouts with CSS Grid
Demo for the article Layout Breakouts with CSS Grid....
Thanks!
following up on this.
what is the advantage (if there is any) of naming grid lines over using grid-template-areas with named areas?
Overlapping content, for one. Named areas can't overlap other areas. With line names, you can easily overlap content.