W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2016

[csswg-drafts] [css-grid] Indefinite spans

From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
Date: Mon, 08 Aug 2016 07:24:14 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-169858519-1470641053-sysbot+gh@w3.org>
SebastianZ has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css-grid] Indefinite spans ==
The [definition for grid 
spans](https://drafts.csswg.org/css-grid-1/#grid-span) says:

> How many grid tracks the grid item occupies. A grid item’s grid span
 is always ***definite***, defaulting to 1 if it can’t be otherwise 
determined.

Though there are use cases, for which an indefinite span size (up to 
the border of the grid) is desired.

**Example:**

Grid with two columns and a varying number of items with the first 
item being the row number spanning over all grid rows.

**CSS:**
```css
.row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr;
}

.rowNumber {
  grid-row-end: span 2; /* <-- Grid cell should span to the end of the
 grid, not have a fixed value. */
}
```

**HTML:**
```html
<div class="row">
  <div class="rowNumber">1</div>
  <div>a</div>
  <div>b</div>
  <div>c</div>
  ...
</div>
```

I'd expect to have `start` and `end` keywords for this case, so I can 
write `grid-row-end: span end` and the spanning of the grid cell to 
dynamically adjust up to the end of the grid.

Sebastian

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/388 using your GitHub 
account
Received on Monday, 8 August 2016 07:24:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 9 October 2019 08:16:26 UTC