[csswg-drafts] [css-tables] Allow 'order' on table columns (#7340)

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-tables] Allow 'order' on table columns ==
Posted in https://lists.w3.org/Archives/Public/www-style/2022Jun/0005.html :

> I recently wondered why the order property only exists for flexbox and grid. Imo it makes a lot of sense for the table element as well. Sometimes you want to reorder columns and other is no convenient way to do so besides changing the whole dom structure.
>
> Adding an order property to td would tackle that issue. An obvious problem is that you can easily create conflicts by setting different orders for tds of the same column. That's why the better place to define this is probably colgroup. However, it seems like the spec moved away of using colgroup at all because all attributes (including width) seem to be deprecated. I find this a bit strange because it allows a convenient way to define column properties. Since tables are defined column-wise but are rendered row-wise, it becomes hard to define column props without writing nth-child selectors all the time. As written above, for ordering, nth-child doesn't seem to be a proper solution anyway. Hiding or rearranging columns are powerful features needed in a lot of rich web applications and providing an easy way to do it in CSS would be awesome.
> 
> What do you think? 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7340 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 7 June 2022 20:49:54 UTC