by pidg · 9y ago · 0 comments
This made me uncomfortable though (about CSS grid, not about the game):
grid-area: row start / column start / row end / column end;
So you have to put the rows (Y axis coordinates) first and columns (X axis coordinates) second, i.e. the opposite of how it's done in every other situation - i.e. draw_rect(start_x, start_y, end_x, end_y)
(1, 1, 3, 4) in every other language would draw a box 2 wide and 3 high, but in css grid it selects an area 3 wide and 2 high.
Also the fact it uses 'row' and 'column' to describe the gridlines rather than the actual rows and columns irked me.
I'm sure I'll get over it!
1: https://en.wikipedia.org/wiki/Index_notation#Two-dimensional...
That said, I don't tend to use the shorthands.
Why isn't 0 the left most line as column and the top most line as row. That would make so much more sense, IMO.
What could be the reason they haven't done it this way? Or are 1 based arrays normal here?
There was another one for a different CSS thing (that I'm blanking on) that was based on the word "love" or something like that...