Test:
You type:
%TABLE{tableborder="2"}%
| *header* | *header* | *header* |
| data | data | data |
| data | data | data |
| data | data | data |
You get:
... and this css in the header:
<!--TABLEPLUGIN_table0--><style type="text/css" media="all">
.twikiTable#table0 {border-width:1px;border-style:solid;}
.twikiTable#table0 td {border-width:0px;}
.twikiTable#table0 th {border-width:0px;}
.twikiTable#table0 td {vertical-align:top;}
.twikiTable#table0 th {vertical-align:top;}
.twikiTable#table0 th {background-color:#6b7f93;}
.twikiTable#table0 th.twikiSortedAscendingCol {background-color:#334455;}
.twikiTable#table0 th.twikiSortedDescendingCol {background-color:#334455;}
.twikiTable#table0 th {color:#ffffff;}
.twikiTable#table0 th a:link {color:#ffffff;}
.twikiTable#table0 th a:visited {color:#ffffff;}
.twikiTable#table0 th a:link font {color:#ffffff;}
.twikiTable#table0 th a:visited font {color:#ffffff;}
.twikiTable#table0 th a:hover {color:#6b7f93;background-color:#ffffff;}
.twikiTable#table0 th a:hover font {color:#6b7f93;background-color:#ffffff;}
.twikiTable#table0 tr.twikiTableRowdataBg0 td {background-color:#eeeeee;}
.twikiTable#table0 tr.twikiTableRowdataBgSorted0 td.twikiSortedCol {background-color:#eeeeee;}
</style>
<!--TABLEPLUGIN_table1--><style type="text/css" media="all">
.twikiTable#table1 {border-width:2px;border-style:solid;}
.twikiTable#table1 td {border-width:0px;}
.twikiTable#table1 th {border-width:0px;}
.twikiTable#table1 td {vertical-align:top;}
.twikiTable#table1 th {vertical-align:top;}
.twikiTable#table1 th {background-color:#6b7f93;}
.twikiTable#table1 th.twikiSortedAscendingCol {background-color:#334455;}
.twikiTable#table1 th.twikiSortedDescendingCol {background-color:#334455;}
.twikiTable#table1 th {color:#ffffff;}
.twikiTable#table1 th a:link {color:#ffffff;}
.twikiTable#table1 th a:visited {color:#ffffff;}
.twikiTable#table1 th a:link font {color:#ffffff;}
.twikiTable#table1 th a:visited font {color:#ffffff;}
.twikiTable#table1 th a:hover {color:#6b7f93;background-color:#ffffff;}
.twikiTable#table1 th a:hover font {color:#6b7f93;background-color:#ffffff;}
.twikiTable#table1 tr.twikiTableRowdataBg0 td {background-color:#ffffff;}
.twikiTable#table1 tr.twikiTableRowdataBg1 td {background-color:#edf4f9;}
.twikiTable#table1 tr.twikiTableRowdataBgSorted0 td.twikiSortedCol {background-color:#f5f5f5;}
.twikiTable#table1 tr.twikiTableRowdataBgSorted1 td.twikiSortedCol {background-color:#dce7ee;}
</style>
<!--TABLEPLUGIN_default-->
So first of all there's only one table to be styled. You'd only need to generate css for one TWikiTable.
Second, instead of just generating css for the
border-width
it generates the full set of all table settings,
no matter if they come from the
TABLEATTRIBUTES
preference variable or the
%TABLE
tag.
This in turn overrides any other css settings that are part of a skin's css, coming earlier in the html header.
A release stopper again
--
TWiki:Main/MichaelDaum - 25 Jun 2007
There really
are 2 tables on this page. The first one is inserted by the template.
But you are right, the css values that are not set should not be written to the page, something I overlooked. But that will be easy to add.
--
TWiki:Main.ArthurClemens - 25 Jun 2007
That was an easy fix.
--
TWiki:Main.ArthurClemens - 25 Jun 2007
Now I am wondering where the 'sorted' style is coming from:
.twikiTable#table0 tr.twikiTableRowdataBg0 td {background-color:#eeeeee;}
Is this set in the template?
--
TWiki:Main.ArthurClemens - 25 Jun 2007
Much better now. But when I only set the
tableborder=2
why do I get
.twikiTable#table0 {border-width:2px;border-style:solid;}
instead of
.twikiTable#table0 {border-width:2px;}
--
TWiki:Main/MichaelDaum - 25 Jun 2007
Yes, that is redundant.
--
TWiki:Main.ArthurClemens - 25 Jun 2007