In https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines square brackets are used to make names. I don’t understand this.
Nothing to understand as such you just use square brackets when you define your gridline names. That’s the spec for those values.
That’s just the way it was designed. I guess it creates separation from other values so the browser knows what’s what.
Well actually the naming is not for the browser, but for the developer. Sometimes it is easier to understand that a particular layout “cell” goes from line “start” to line “end” than to say it goes from line 0 to line 3.
Imagine if you had 30 lines. Some are starts, some are ends, some are header start, some are sidebar end etc. But you had to remember all those numbers instead of easy to remember names. What is line 18? Is that the start of the sidebar? Yikes, having to remember all that would be crazy!
Yes of course, my answer was solely answering the question about the use of square brackets separating the user defined names from the other values.
Maybe I misunderstood the question
I read that as the dev browsing the code.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.