W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [selectors4] Styling table column child elements

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 18 Mar 2013 17:53:19 -0700
Message-ID: <CAAWBYDBdb+U5+xyipmgYZHHpUBZNguJQO_RCU1R0jhPPXtc3Yg@mail.gmail.com>
To: "www-style@gtalbot.org" <www-style@gtalbot.org>
Cc: Simon Sapin <simon.sapin@exyr.org>, Henrik Andersson <henke@henke37.cjb.net>, "www-style@w3.org" <www-style@w3.org>
On Mon, Mar 18, 2013 at 5:26 PM, "GĂ©rard Talbot" <www-style@gtalbot.org> wrote:
> td:first-child + td + td { ... declaration block ...}
>
> will select cells in 3rd column and is often recommended for CSS 2.1 and
> considered the traditional way to code this in CSS 2.1.

This works badly in the presence of spanning cells, and forces you
into referring to cells by column number.

> In example 52:
>
>   <tr><td span="2">D <td>E
>   <tr><td>F <td span="2">G
>
> should be instead/rather
>
>   <tr><td colspan="2">D <td>E
>   <tr><td>F <td colspan="2">G
>
> Also, example 52 is a rather weak example as
>
> col.selected { background: yellow; }
>
> seems that it should/would suffice too.
>
> This example 52 is not very convincing with regards to how the "||"
> (column combinator) can achieve more or better or overcome difficulties
> that the traditional way is already doing well in this example.

Thanks, I've fixed the markup error and made the CSS apply properties
that can't be simply set on <col>.

~TJ
Received on Tuesday, 19 March 2013 00:54:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT