News for hackers. Stuff that matters.
Re:CSS Grid Areas by layer8 on Friday August 16, 2024 @08:44AM (#41265889)
Do you have a reference for this particular usage of slash? In print, “x / y” is often used to mean “item x out of y” [0], for example in page numbers. I’m only familiar with using slashes for ranges in ISO 8601, where it has purely syntactic reasons and (AFAICT) doesn’t adopt any preexisting convention.

I imagine the slash in CSS grid is for similar syntactic reasons, because the syntax also admits hyphenated identifiers [1] (custom-ident), which precludes the use of “-”. (They could have used a range operator like “~” or “..” though.)

[0] https://en.wikipedia.org/wiki/Slash_(punctuation)#Numbering

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column...

Re:CSS Grid Areas by phrop on Friday August 16, 2024 @08:46AM (#41265910)
And that is exactly what 1/3 means in CSS Grids, the element occupies the grid from slot 1 to 3.
Re:CSS Grid Areas by dnadler on Friday August 16, 2024 @08:50AM (#41265937)
“1 of 3” is not the same thing as “1 to 3”, so I don’t think they mean the same thing here.