Forum OpenACS Development: Re: style controls (informal exploration)

Collapse
Posted by Jeff Davis on
Well, for one thing (and it's a nitpick) "_" is not valid in id's or classes. Beyond that, I think it's needlessly verbose. You don't need a <p class="acs-p"> since I see almost nowhere that you would want to style the p tag differently depending on whether it was in adp or user supplied html. The whole point is that the problem with styling now is that things are not generic enough. Providing for ultimate flexibility just makes it harder to get a consistent look, makes the stylesheets verbose and ugly, and ultimately makes theming just not work that well.

I think if you want per package or per instance styling it's better to just have a second stylesheet which modifies the primary stylesheet or is used in place of the primary style sheet rather than add a zillion class names for the particular package.

It also becomes almost impossible to document what css classes are available since they could be literally anything. If you want to be able to have a designer sit down and create css without having to look through the 200+ packages to see which classes they define.

Also you could do per pacakge and per instance styling by making the body tag

<body id="style-@StylePrefix@" class="package-key">
and get most of the advantages yo u would like to get in terms of flexibility without the overwhelmingly verbose complexity your method would entail.