W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

[csswg-drafts] [css-grid] Editorial: Usage of "grid" instead "grid-template" shorthand in section 7.1 ?

From: Smartdog via GitHub <sysbot+gh@w3.org>
Date: Sat, 22 Apr 2017 20:43:06 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-223591618-1492893784-sysbot+gh@w3.org>
sunright has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-grid] Editorial: Usage of "grid" instead "grid-template" shorthand in section 7.1 ? ==
Editorial:
Please explain why CSS Grid Layout editors usage of "grid" instead of "grid-template" shorthand in [section 7.1](https://www.w3.org/TR/css3-grid-layout/#explicit-grids)?

The first paragraph of [Section 7.1](https://www.w3.org/TR/css3-grid-layout/#explicit-grids) says:

> The three properties grid-template-rows, grid-template-columns, and grid-template-areas together define the explicit grid of a grid container. The grid property is a shorthand that can be used to set all three at the same time.

Please note what is written in the second sentence:

> grid property is a shorthand that **can be used to set all three at the same time.**
( I used bold text to high light a question I have.)

Question:
Can "grid-template" property be used to set all three at the same time? 

I am interested in the editors answer. I believe the answer is : yes

So what is the purpose of not using "grid-template" over "grid"?

I believe "grid-template" would be more appropriate.  The "grid" property makes changes other properties (gutter property), which "grid-template" does not do. 
 
I would like to point out another reason for my confusion:
"grid-template" property definition is located in section labeled:
[7.4. Explicit Grid Shorthand: the grid-template property](https://www.w3.org/TR/css3-grid-layout/#explicit-grid-shorthand)

The grid-template property is a shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.

It just seems like the editors are casually saying use "grid" property because it does the job and not pointing out the grid changes things you might not want changed.  Where using "grid-template" does just one thing really well with out any thing else.

I would like to propose two ways to rewrite the second sentence in Section 7.1: 
1) The [grid-template](https://www.w3.org/TR/css3-grid-layout/#explicit-grid-shorthand) is a  shorthand that can be used to set all three at the same time.
2) The [grid-template](https://www.w3.org/TR/css3-grid-layout/#explicit-grid-shorthand)  and [grid](https://www.w3.org/TR/css3-grid-layout/#grid-shorthand) are shorthand properties can be used to set all three at the same time. 

A change that includes "grid-template" would really help the readability of the Module and help explain the flexibility and possible issues with using shorthand properties.

Robert DiBlasi
We all learn by sharing what we know 



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1280 using your GitHub account
Received on Saturday, 22 April 2017 20:43:13 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC