Community Wishlist Survey 2022/Editing/Formatting columns in table
Appearance
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)
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)
- Browser support can improve in the future, but what surely can be done right now is to modify the wiki engine to parse these attributes and just duplicate them in each cell of corresponding columns. This will of course bloat the output HTML compared to native
col
(if it were working...), but no more that current manual insertion of all this stuff, and it will greatly relieve us of doing such manual insertions. Maybe this can be optimized by properly defining and automatically using CSS classes. — Mikhail Ryazanov (talk) 23:33, 4 February 2022 (UTC)
- Browser support can improve in the future, but what surely can be done right now is to modify the wiki engine to parse these attributes and just duplicate them in each cell of corresponding columns. This will of course bloat the output HTML compared to native
- 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)
- And please add an option for decimal point alignment. Current "solutions" are even more painful than plain left/right/center override. — Mikhail Ryazanov (talk) 20:04, 4 February 2022 (UTC)
- Note that
<col>
explicitly doesn't support text alignment properties or anything that requires styling the cell itself. It would only be useful for setting the background colour. ESanders (WMF) (talk) 16:33, 29 April 2022 (UTC)
Voting
- Support Lion-hearted85 (talk) 22:53, 28 January 2022 (UTC)
- Support Daud Iffa (talk) 23:40, 28 January 2022 (UTC)
- Support {{u|Sdkb}} talk 00:02, 29 January 2022 (UTC)
- Support --𝑇𝑚𝑣 (𝑡𝑎𝑙𝑘) 01:28, 29 January 2022 (UTC)
- Support JDspeeder1 (talk) 01:48, 29 January 2022 (UTC)
- Support Kishorekumar 62 (talk) 05:46, 29 January 2022 (UTC)
- Support Rupalavanyan (talk) 07:41, 29 January 2022 (UTC)
- Support —Bruce1eetalk 10:05, 29 January 2022 (UTC)
- Support --Mahl (talk) 11:09, 29 January 2022 (UTC)
- Support --Hemantha (talk) 12:35, 29 January 2022 (UTC)
- Support NguoiDungKhongDinhDanh 12:37, 29 January 2022 (UTC)
- Support Aca (talk) 12:56, 29 January 2022 (UTC)
- Support — SHEIKH (Talk) 13:13, 29 January 2022 (UTC)
- Support --Yann (talk) 13:17, 29 January 2022 (UTC)
- Support--Matěj Suchánek (talk) 13:42, 29 January 2022 (UTC)
- Support --Raymonde Lanthier (talk) 14:19, 29 January 2022 (UTC)
- Support Mbrickn (talk) 15:41, 29 January 2022 (UTC)
- Support Saliousoft (talk) 17:42, 29 January 2022 (UTC)
- Support Mohammad ebz (talk) 18:02, 29 January 2022 (UTC)
- Support--Cunegonde1 (talk) 18:21, 29 January 2022 (UTC)
- Support — Jules* Talk 18:26, 29 January 2022 (UTC)
- Support Wostr (talk) 19:41, 29 January 2022 (UTC)
- Support Juenti el toju (talk) 20:04, 29 January 2022 (UTC)
- Support OwenBlacker (Talk) 22:14, 29 January 2022 (UTC)
- Support Goombiis (talk) 22:20, 29 January 2022 (UTC)
- Support josecurioso ❯❯❯ Tell me! 00:19, 30 January 2022 (UTC)
- Support --Timeshifter (talk) 07:19, 30 January 2022 (UTC)
- Support Lectrician1 (talk) 07:28, 30 January 2022 (UTC)
- Support DePlusJean (talk) 09:14, 30 January 2022 (UTC)
- Support F. Riedelio (talk) 11:02, 30 January 2022 (UTC)
- Support Better for editing tables. We can't not color table nowadays Thingofme (talk) 15:11, 30 January 2022 (UTC)
- Support --F0x1 (talk) 19:06, 30 January 2022 (UTC)
- Support daSupremo 22:23, 30 January 2022 (UTC)
- Support This is such a pain in the ass. I would love a feature to deal with it. JPxG (talk) 00:42, 31 January 2022 (UTC)
- Support Lfstevens (talk) 06:39, 31 January 2022 (UTC)
- Support Hb2007 (talk) 15:59, 31 January 2022 (UTC)
- Support RamónMC (talk) 16:32, 31 January 2022 (UTC)
- Support JAn Dudík (talk) 20:35, 31 January 2022 (UTC)
- Support Shooterwalker (talk) 22:27, 31 January 2022 (UTC)
- Support Barcelona (talk) 22:30, 31 January 2022 (UTC)
- Support MONUMENTA (talk) 00:03, 1 February 2022 (UTC)
- Support -- Ulanwp (talk) 10:42, 1 February 2022 (UTC)
- Support -- Ahecht (TALK
PAGE) 21:34, 1 February 2022 (UTC) - Support Sabelöga (talk) 15:13, 2 February 2022 (UTC)
- Support ~ Amory (u • t • c) 20:30, 2 February 2022 (UTC)
- Support YBG (talk) 08:03, 3 February 2022 (UTC)
- Support WikiAviator (talk) 10:07, 3 February 2022 (UTC)
- Support Paucabot (talk) 12:25, 3 February 2022 (UTC)
- Support Prof.Flip (talk) 13:46, 3 February 2022 (UTC)
- Support SlowByte (talk) 18:45, 4 February 2022 (UTC)
- Support Mikhail Ryazanov (talk) 20:04, 4 February 2022 (UTC)
- Support Pi.1415926535 (talk) 21:36, 4 February 2022 (UTC)
- Support Geert Van Pamel (WMBE) (talk) 22:16, 4 February 2022 (UTC)
- Support Gary D Robson (talk) 22:36, 4 February 2022 (UTC)
- Support But for all wikis, not only for wiki.en - Darwin Ahoy! 00:32, 5 February 2022 (UTC)
- Support —— Eric Liu(Talk) 05:30, 5 February 2022 (UTC)
- Support Xurizuri (talk) 11:10, 5 February 2022 (UTC)
- Support Kess (talk) 11:32, 5 February 2022 (UTC)
- Support One of the most overdue additions to wiki syntax that comes to mind. ⚞ℜogueScholar⚟ 🞛 ₨Talk📟 12:57, 5 February 2022 (UTC)
- Support —Thanks for the fish! talk•contrib (he/him) 21:31, 5 February 2022 (UTC)
- Support Nkon21 (talk) 03:33, 6 February 2022 (UTC)
- Support Ayumu Ozaki (talk) 06:04, 6 February 2022 (UTC)
- Support Carlos Pozo (talk) 06:59, 6 February 2022 (UTC)
- Support — Bilorv (talk) 11:12, 6 February 2022 (UTC)
- Support — DaxServer (t · c) 12:18, 6 February 2022 (UTC)
- Support Dipsacus fullonum (talk) 14:01, 6 February 2022 (UTC)
- Oppose --Ciao • Bestoernesto • ✉ 17:45, 6 February 2022 (UTC)
- Support Uanfala (talk) 12:54, 7 February 2022 (UTC)
- Support —TheDJ (talk • contribs) 18:37, 7 February 2022 (UTC)
- Support DGG (talk) 20:16, 7 February 2022 (UTC)
- Support ~Cybularny Speak? 20:27, 7 February 2022 (UTC)
- Support ~~~~
User:1234qwer1234qwer4 (talk) 19:16, 8 February 2022 (UTC) - Support Shyam (T/C) 13:37, 9 February 2022 (UTC)
- Support 4nn1l2 (talk) 01:12, 11 February 2022 (UTC)
- Support Bcjohnston (talk) 14:58, 11 February 2022 (UTC)
- Support Nehaoua (talk) 16:15, 11 February 2022 (UTC)
- Support -BRAINULATOR9 (TALK) 17:28, 11 February 2022 (UTC)