[css-tables] Transposing table contents

Open
#8,529 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
css
Domain
frontend

Research direction

Start by reviewing the issue's proposed table transposition use case and the reported writing-mode behavior in Chrome and Firefox. Compare whether an extra table-layout keyword or a new CSS property best fits the existing CSS Tables model. Done means reaching a standards-backed resolution for transposed rows and columns, including the Firefox zero-height-row case.

Written by the indexing model from the issue text.

Description

css-tables-3 css-tables-4

There should be a way to make the rows and columns transposed, possibly as an extra keyword on the table-layout property, or a new CSS property.

If you have a very long form where you are modifying multiple objects, e.g. editing multiple Persons with shortName, longName, age, gender, address, etc, it is much easier to generate HTML going by column, instead of looping through all objects per row.

Currently one way to do that is to use writing-mode: vertical-lr on the table and then writing-mode: horizontal-tb on the td and th. That works on Google Chrome, but causes each table row to become 0px tall on Firefox.

Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.