Hacker News new | ask | show | jobs
by Honzo 3366 days ago
Why wouldn't grid-column-start/end be zero indexed?
1 comments

Ah I'm thinking of it wrong. The indexes are not the boxes but the splits in between.

| <- 0 1 -> | <- 1 2 -> | <- 2 3 -> |

That makes more sense.

You're halfway there. The indices are the grid lines, but they're also one-indexed. That's consistent with other parts of CSS, though it's inconsistent with the rest of the programming world.
Julia, R, Matlab, Basic and Fortran disagree.

It's just that C's heavy influence resulted in most languages with arrays being 0 indexed.

APL disagrees too. Except when it doesn't.