Community Wishlist Survey 2022/Editing/Formatting columns in table

This is an archived version of this page, as edited by JAn Dudík (talk | contribs) at 20:35, 31 January 2022 (Support proposal). It may differ significantly from the current version.

Formatting columns in table

  • Problem: When editing a table in wikitext, it is possible to add CSS properties to rows and to cells, but not to columns. When a property applies to an entire column, we are compelled to copy-paste this property in every cell of the column; it would be easier and shorter to write it only once, at the beginning of the column.
  • Proposed solution: Enable in some way the use of the <colgroup> and <col> HTML attributes within {| |}.
  • Who would benefit: Contributors who create or edit tables on any Wiki project.
  • More comments:
  • Phabricator tickets: phab:T2986, phab:T103276
  • Proposer: ElioPrrl (talk) 16:27, 11 January 2022 (UTC)[reply]

Discussion

  • I can see this as being useful for centering a column of flags (images) or right aligning a numeric column, but my tests on Windows 10 (Chrome, Edge, Firefox) browsers showed that the "text-align" style on the colgroup's col didn't work. I found some other styles didn't work too like "font-weight". It needs more browser support to be effective. Jroberson108 (talk) 10:43, 30 January 2022 (UTC)[reply]
  • A mostly numeric table can be right-aligned as a whole. But there are usually also 1 or more columns that need to be left aligned. style=text-align:left has to be added to every cell in those columns. I can usually find a mass find-and-replace method to do that, but it can be difficult. It would be nice if the Visual Editor could do that to selected columns. --Timeshifter (talk) 14:31, 31 January 2022 (UTC)[reply]

Voting