W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2018

Re: [csswg-drafts] [css-grid-2] subgrid and grid-gap

From: Daniel Tonon via GitHub <sysbot+gh@w3.org>
Date: Fri, 09 Feb 2018 23:22:16 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-364597843-1518218536-sysbot+gh@w3.org>
> Adding that ability might make for a less complex solution.

Not a bad idea and it might solve other use cases we don't know about yet.

So as in something like this?

`````
grid-column-gap: 20px;
grid-row-gap: repeat(3, 0px) 20px;
`````
The gap would repeat the row-gap pattern over and over like how `grid-auto-rows` works.

That could work to solve the use case but the problem comes in when we use the shortened version of the syntax.

``````css
//this syntax currently sets column-gap
//to 10px and row-gap to 20px

grid-gap: 20px 10px;
``````
Notice that it uses a space to seperate the 2 values?

I think what we could do to get around that problem is to make this syntax also valid:

``````css 
//this syntax could also be introduced to 
//set column-gap to 10px and row-gap to 20px

grid-gap: 20px / 10px;
``````
That way we could do this for the shortened syntax:

```css
grid-gap: repeat(3, 0px) 20px / 10px;
```

-- 
GitHub Notification of comment by Dan503
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2285#issuecomment-364597843 using your GitHub account
Received on Friday, 9 February 2018 23:22:23 UTC

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