Re:Grid Garden – A game for learning CSS grid
by jwarren on Thursday April 06, 2017 @03:15PM
(#14053644)
You're not wrong on the first point, but I imagine consistency with the front and back of the index was on the spec designers minds.
I do have to point out that your second point is not correct. Remember it's not grid areas, it's grid dividers. So the final grid line <strong>is</strong> in fact -1.
See my very hasty little Codepen: https://codepen.io/jodi/pen/ZeNRJZ
CSS grid's negative indexes, hilarious, don't even get this right. If the first element is 1 then the last must be 0, right? No, it's not. Nor is it -1. It's negative two. Don't ask. I don't know.