Author: pogonyshev
Description:
Create a possibility to specify shared attributes for all cells in a given table column. For instance, it is now common to write something like
{| | 1. | align="center" | foo |- | 2. | align="center" | bar |- | 3. | align="center" | foobar |}
which is difficult to read if your table is large. However, in most cases, attributes are meant to be applied to every or almost every cell in a column. For instance, I propose something like this:
{| = == align="center" | 1. | foo |- | 2. | bar |- | 3. | foobar |}
The first space after = sign is meant to specify "no attributes for the first column". Then there goes specfication of align="center" attribute for all cells in the second column. Alternatively, one could write it like this:
{| = = align="center" ...
The syntax can likely be improved.
Default attributes should be ovveridable by per-cell attributes. For instance, one can write sth. like this:
{| = class="shadow" | 12 |- | 15 |- | 9 |- | class="bright" | 12000 |}
It is not clear how default attributes should interfere in case there are colspan="N" cells in a row. For a beginning, simplest solution is to never apply defaults to rows where there is at least one cell spanning several columns. Alternatively (more difficult), default attributes would not apply to such cells, but would apply to non-colspan cells, with column number properly adjusted if needed.
Advantages:
- much easier reading (hence editing) of tables;
- much easier change of look-and-feel per-column (e.g. easy to right-align a whole column, attach a background color to a column, etc.);
- a little easier creation of tables or new rows (not much, because you can copy existing rows anyway).
Disadvantages:
- need to synchronize default-attributes-rows and the data rows;
- more complications in table syntax.
However, I don't see the disadvantages as being really significant.
(The link is to today's featured article in en-wiki, illustrating how attributes are attached currently.)
URL: http://en.wikipedia.org/wiki/Norwich_City_F.C.#Managers