W3C home > Mailing lists > Public > www-style@w3.org > April 2018

Re: [css-grid] :nth-row, :nth-column selectors and similar

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Tue, 10 Apr 2018 12:39:41 +0200
Message-ID: <CAERejNYvy16J25Qgc6ytWv9A3ahjU-=CzCJzkxp55gPFjYAe9g@mail.gmail.com>
To: Jacob Pratt <jhprattdev@gmail.com>
Cc: Sebastian Malton <sebastian@malton.name>, www-style list <www-style@w3.org>
On 23 January 2018 at 04:44, Jacob Pratt <jhprattdev@gmail.com> wrote:
> I thought subgrid was still being promoted, though I haven't been following
> it too closely.
>
> Taking the track with the plurality would certainly make more sense. It may
> not necessarily have >=50%, though.
>
> jhpratt
>
> On Mon, Jan 22, 2018 at 10:41 PM, Sebastian Malton <sebastian@malton.name>
> wrote:
>>
>> Hello,
>> I don't think that there is currently. However, some notes: is subgrid
>> still being promoted? Since we have grids within grids by just css
>> definition.

Subgrids *are* still promoted, they were just deferred to level 2 of
the specfication. See https://drafts.csswg.org/css-grid-2/#subgrids.
Subgrids are special, because they have constraints in regard of the
parent grid.

>> Second, I would say that concerning the multiple rows and columns problem.
>> I would say it should be based off of covering 50% or more of the element.
>> Where that amount is configurable in the grid. This way it can be decided by
>> the designer.
>>
>> Sebastian Malton
>>
>> From: jhprattdev@gmail.com
>> Sent: January 22, 2018 10:34 PM
>> To: www-style@w3.org
>> Subject: [css-grid] :nth-row, :nth-column selectors and similar
>>
>> All,
>>
>> Are there any active proposals (or any that have been shot down) regarding
>> table-like selectors for CSS Grid?

Yes, see https://github.com/w3c/csswg-drafts/issues/1943.

Sebastian

>> Namely the following:
>>
>> - nth-row
>> - nth-column
>> - nth-last-row
>> - nth-last-column
>> - first-row
>> - first-column
>> - last-row
>> - last-column
>>
>> These selectors could prove incredibly useful with `auto-fit`, and
>> especially once subgrid is implemented.
>>
>> The use case would be similar to that of tables, but for cases where
>> tables are not necessarily appropriate to be used.
>>
>> The one problem I can think of: how will elements that span multiple
>> tracks be handled? My naïve solution would be to use the top left cell,
>> though I've no clue on the benefits and drawbacks from such.
>>
>> jhpratt
>
>
Received on Tuesday, 10 April 2018 10:40:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 10 April 2018 10:40:36 UTC