- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 23 Jul 2015 11:18:23 -0700
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style list <www-style@w3.org>
On Thu, Jul 23, 2015 at 11:10 AM, fantasai
<fantasai.lists@inkedblade.net> wrote:
> On 07/23/2015 07:21 AM, Manuel Rego Casasnovas wrote:
>> On 21/07/15 22:30, fantasai wrote:
>>>
>>> ? Column combinator
>>> Want to double-check satisfaction with syntax, impl interest
>>> ? :nth-column() pseudo-class
>>> Biased to at-risk
>>
>> Regarding this, I think that a column and row selector would be handy
>> for CSS Grid Layout. I don't know if it was discussed previously or not,
>> but it seems an interesting use case.
>>
>> Just one example, imagine that you have a grid showing a random number
>> of elements (images, texts, whatever) and the grid have several rows and
>> columns, maybe you want to use a different background for items in
>> odd/even rows.
>
> No, this is only applicable to HTML tables -- it calculates column
> membership based on the markup only.
In particular, the standard example of:
```
div:in-grid-row(2) {
grid-row: 3;
}
```
shows why we can't do this for Grid.
Since tables associate elements with a row/column based on the pre-CSS
markup, it's fine. Note that the column selectors *do not* work on
display:table and friends, for the same reason we can't use them on
Grid.
~TJ
Received on Thursday, 23 July 2015 18:19:12 UTC