[pmwiki-users] facilititate customistion using CSS for simple tables
Patrick R. Michaud
pmichaud at pobox.com
Mon Jan 11 13:54:15 CST 2010
On Mon, Jan 11, 2010 at 09:22:19PM +1300, Simon wrote:
> I'd like to solicit votes for http://www.pmwiki.org/wiki/PITS/00638
> Description: To facilititate customistion using CSS could the table tag
> generated for simple tables markup please have a class added to it. eg
> <table class="wikisimpletable"
On PITS:00638, you added the comment:
... This would simply be a default class added in addition to any a user
declares in a class= parameter. ...
The problem is that this isn't actually "simple" nor "straightforward".
PmWiki doesn't have an easy way to put a default class "in addition to
any a user declares" -- as things currently exist it can either use a
hard-coded one, fall back to a default, or accept the class declaration
provided by the user. There's not a simple mechanism for combining classes
(which, btw, I personally find to be a serious flaw in the design of CSS itself).
So, add "a default class in addition to a user-declared class" would
actually require substantial code changes to the simple table markup.
It also would remove the ability for users to create a simple table
without having the default class in it. So, what you're describing
is not at all a trivial change, and does impact existing wikis.
It's entirely possible for a wiki administrator to set a default
class explicitly in config.php (the PITS comments incorrectly omit
the required  subscript):
$BlockMarkups['table'] = "<table class='wikisimpletable' width='100%'>";
This sets the default class for any simple tables that get generated,
although it can be overridden by any user-supplied class. It only affect
simple tables -- it doesn't change the class settings for advanced tables
or other tables that PmWiki generates.
Having looked at it a bit further, I don't have a big problem with
the above $BlockMarkup value being set as the default in stdmarkup.php,
as long as we're clear that any user-supplied class= attribute continues
to override the default class attribute, and is not in addition
More information about the pmwiki-users