3 ms·
I'm a bit confused by level six. grid-column-start: 0 - doesn't exist grid-column-start: 1 - leftmost square grid-column-start: 2 - 2nd square left to right gr
by codyb 10y ago
I'm a bit confused by level six.
grid-column-start: 0 - doesn't exist
grid-column-start: 1 - leftmost square
grid-column-start: 2 - 2nd square left to right
grid-column-start: -1 - also doesn't exist?
grid-column-start: -2 - rightmost square
Very strange. Although the concepts are neat so far.
The / notation in
grid-column: 2 / 4;
is interesting. I'm surprised it's not similar to say
margin: 20 30 20 20;
where there's no slash, just an ordering to remember (clockwise from top).
Default span is 1 which is sensible so
grid-column: 3 === grid-column: 3/4 === grid-column: 3/span 1;
Wow the fr unit is pretty neat!
You can see where the slash is very useful in grid-template which makes a lot sense for dynamic numbers of rows and columns.
Very fun. I still have some questions about the numbering, but a great way to learn about CSS grid and have a bit of fun.