W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

Re: [csswg-drafts] [css-grid-2] Subsetting grid-template-areas in subgrids (#4411)

From: Manuel Rego Casasnovas via GitHub <sysbot+gh@w3.org>
Date: Tue, 15 Oct 2019 14:05:40 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-542229450-1571148339-sysbot+gh@w3.org>
I've been checking this thing and I believe I like C, however I'm worried about the compatibility risk and if we're going to break websites doing this change. Maybe we should add a use counter, to check if people are using random line names to place elements or not.
A safer approach would be go with B, and eventually move to C if the use counter is low.

One thing I don't like about current implementation is that these 2 cases are not identical:
```html
<div style="display: inline-grid; border: solid thick;
            grid-auto-rows: 50px;
            grid-template-columns: repeat(5, 50px);
            grid-template-areas: 'a a a a a';">
  <x style="grid-column: a; background: magenta;">i1</x>
  <div style="display: grid;
              grid: auto / subgrid;
              grid-column: 3 / span 3;">
    <x style="grid-column: a-start; background: cyan;">i2</x>
  </div>
  <div style="display: grid;
              grid: auto / subgrid;
              grid-column: 3 / span 3;">
    <x style="grid-column: a; background: yellow;">i3</x>
  </div>
</div>

<hr>

<div style="display: inline-grid; border: solid thick;
            grid-auto-rows: 50px;
            grid-template-columns: [a-start] repeat(5, 50px) [a-end];">
  <x style="grid-column: a; background: magenta;">i1</x>
  <div style="display: grid;
              grid: auto / subgrid;
              grid-column: 3 / span 3;">
    <x style="grid-column: a-start; background: cyan;">i2</x>
  </div>
  <div style="display: grid;
              grid: auto / subgrid;
              grid-column: 3 / span 3;">
    <x style="grid-column: a; background: yellow;">i3</x>
  </div>
</div>
```

![Output in Firefox nightly 71.0a1](https://user-images.githubusercontent.com/11602/66838742-81354c80-ef65-11e9-8303-e9820f7faaff.png)

I'd expect both render the same and work, like it happens for the first one, but the 2nd one is doing something different.


-- 
GitHub Notification of comment by mrego
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4411#issuecomment-542229450 using your GitHub account
Received on Tuesday, 15 October 2019 14:05:43 UTC

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