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

Re: [csswg-drafts] [css-grid] grid area as element (#4416)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Mon, 14 Oct 2019 11:42:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-541628616-1571053373-sysbot+gh@w3.org>
Grid areas only form the containing block in which grid items are sized. But it doesn't establish a formatting context nor anything, the grid items still participate in the grid formatting context established by the grid container.

It seems you want the items to participate in both the grid formatting context of the grid container, and in the flex formatting context of an anonymous flex container. This seems potentially conflictive.

Wouldn't it be easier to just use the following?

```html
<div class="grid">
  <div class="header">...</div>
  <div class="menu">...</div>
  <div class="footer">...</div>
  <div class="content">
    <div>...</div>
    <div>...</div>
    <div>...</div>
    <div>...</div>
  </div>
</div>
```
```css
.content {
  grid-area: content;
  display: flex;
}
```

Regarding things like `:grid-item()` or `:flex-item()`, they are not possible because they would introduce circularities, see #4097.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4416#issuecomment-541628616 using your GitHub account
Received on Monday, 14 October 2019 11:42:56 UTC

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