4 ms·
I hope that's not a stupid question, but why define the syntax as 1/2 and 3/4 (divider) and not 1-2 (column 1 _to_ column 2) and 3-4 or 1->2 or something like t
by tomw1808 2y ago
I hope that's not a stupid question, but why define the syntax as 1/2 and 3/4 (divider) and not 1-2 (column 1 _to_ column 2) and 3-4 or 1->2 or something like that?
- sapling-ginger 2y agoThe column number can be negative. 1--1 vs 1->-1 vs 1/-1 ?
- elteto 2y agoa:b is almost universal as a range designator at this point. / is a _terrible_ choice, especially in a context where a fractional value would also make sense. That was just an objectively bad syntax choice, but probably keeping on track with CSS.
- lionelw 2y agoDon't you think : is already used for something else in CSS?
- nsonha 2y agomaking excuse is easy, here is another one 1..3
- mixmastamyk 2y agoAnd what’s wrong with whitespace? Like every other property.
- nsonha 2y agorange(1, 3) might be more consistent, it's a single value that is a range and not 2 values. On a side note: a problem with CSS' claim to be a programming language is that the grammar is not obvious.
- mixmastamyk 2y agoA single value is a choice, two values as well.
- deleted 2y ago[deleted]
- Izkata 2y agoArrow maybe, but the spaces around it are there for a reason - numbers aren't the only valid values: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column#syntax https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column... Because of how spaces are already used to separate values in CSS (not to mention our own regular intuition when dashes are involved), this: grid-column: 4 somegridarea / 6; grid-column: span 3 / 6; grid-column: span somegridarea / span someothergridarea; is much better than these: grid-column: 4 somegridarea-6; grid-column: span 3-6; grid-column: span 3->6; grid-column: span somegridarea-span someothergridarea; grid-column: span somegridarea->span someothergridarea;