Mailing List Archive

CSS usage by Trac
Hi folks,

I have been spending some time looking at the Trac templates and style
sheets, and have a couple of questions:

The style bindings seem to be suffering from "divitis" and "classitis",
as Jeffrey Zeldman calls it (in "Designing with Web Standards"): There
are far too many classes used, and those classes have rather long names
like "br-summary-col" or "wiki-history-link". Properly taking advantage
of CSS contextual selectors should drastically reduce the number of
distinct classes: you'd have selectors like ".browser td.summary" and
".wiki #history :link" instead of the above two examples. On the other
hand -- here comes the "divitis" part -- Trac currently overuses divs
and spans for structures that could more easily (and more semantically
correct) be expressed by using standard HTML tags such as definition
lists.

As I will soon be creating a customization of the Trac layout for our
in-house use of Trac, I'm thinking about cleaning up the templates and
style sheets so that they are more lightweight and easier to work with.
I would love to contribute those changes back to the Trac community.

So the question is: do you think that's a good idea? Would such changes
be accepted by the Trac dev team?

Cheers,
Chris
--
Christopher Lenz
/=/ cmlenz at gmx.de
CSS usage by Trac [ In reply to ]
On Thu, May 06, 2004 at 12:38:23PM +0200, Christopher Lenz wrote:
> like "br-summary-col" or "wiki-history-link". Properly taking advantage
> of CSS contextual selectors should drastically reduce the number of
> distinct classes: you'd have selectors like ".browser td.summary" and

Bear in mind that not all of the CSS selectors are supported by certain
popular browsers...

--
Tristan Seligmann
Developer / Network Administrator
CSS usage by Trac [ In reply to ]
Am 06.05.2004 um 12:58 schrieb Tristan Seligmann:
> On Thu, May 06, 2004 at 12:38:23PM +0200, Christopher Lenz wrote:
>> like "br-summary-col" or "wiki-history-link". Properly taking
>> advantage
>> of CSS contextual selectors should drastically reduce the number of
>> distinct classes: you'd have selectors like ".browser td.summary" and
>
> Bear in mind that not all of the CSS selectors are supported by certain
> popular browsers...

Well, with the exception of Netscape 4.x, every browser that supports
CSS at all also supports simple CSS 1 contextual selectors.

I'm not talking about child, adjacent or attribute selectors here. I
know those don't work in IE.

Cheers,
Chris
--
Christopher Lenz
/=/ cmlenz at gmx.de
CSS usage by Trac [ In reply to ]
We are definitely moving that direction (xhtml/css) for our code base -- I'd
sure find it useful in the base templates of Trac. Someone would use it!
:) Netscape 4.x is not an issue for us (thankfully).

Thanks, Ben

-----Original Message-----
From: Christopher Lenz
Subject: [Trac] CSS usage by Trac

So the question is: do you think that's a good idea? Would such changes be
accepted by the Trac dev team?