[Pmwiki-users] Styling simple table rules

Patrick R. Michaud pmichaud
Thu Dec 9 11:39:54 CST 2004

On Thu, Dec 09, 2004 at 08:03:18AM +0000, Ciaran wrote:
> After our quick conversation in irc t'other afternoon/morning I
> implemented a simple row counter in the simple table markup.  Used in
> conjunction with || class="someclass" this gives great flexibility in
> the styling of tables. I can now simply setup styles for my users such
> as
> || class="headedTable
> || Item || Size  || Cost ||
> || foo || bar || fish ||
> And get a nice table with a grey header...

Perhaps it would've been better to do

    || class="headedTable"
    ||! Item ||! Size ||! Cost ||
    || foo   || bar   || fish  ||

and then styled the <th> elements to be gray background 
for the headings, with

   table.headedTable th { background-color:#eeeeee; }

> The changes I made were basic/naieve imho, just adding a global
> rowCounter that FormatTableRow both used and incremented and modifying
> the block table markup to call a function that reset the rowCounter
> back to 0/1 before performing the original markup change.

I've gone ahead and implemented something like this into the
beta8 distribution -- maybe it's feature creep but it was 
fairly easy to do.  If someone needs it taken out I can turn it into
an option.


More information about the pmwiki-users mailing list