Bugzilla CSS plan

Myk Melez myk at mozilla.org
Sat Jul 24 00:31:37 UTC 2004


Gervase Markham wrote:

> Why not mirror (fairly closely) the template structure? So 
> skins/default/reports/foo-page.css and 
> skins/default/search/bar-page.css? This gives a level of familiarity, 
> and allows us to separate things a bit more.

We use directories for templates because pages generally comprise 
multiple templates.  Page-specific style rules, however, live in single 
CSS files, and just like single template files (index.html.tmpl and 
sidebar.xul.tmpl) don't need their own directory.  Of course, then 
there's images as well as the question of whether we want to support 
templates/JavaScript in the future, so perhaps this makes sense.

>> checksetup.pl creates a skins/custom/ directory.  We add notes to the 
>> skins/default/ files telling customizers to override default rules by 
>> putting them into the equivalent files in skins/custom/.  
>
>
> Would it make more sense just to have a "skins/<skinname>" directory, 
> and have a Param giving the current skin name?

Yes, to some degree.  For example we could put the standard skin into 
skins/standard/, third-party skins into skins/<name>/, and have a 
"default skin" parameter set to "standard" by default.  The only issue 
with that directory structure is customizations, since skins/custom/ now 
looks like any other skin, whereas customizations should be applied in 
addition to the default skin.

To fix that, we should put customizations into skins/<name>/custom/.  
This makes customizations skin-specific, but I think that's actually 
what we want, since customizations to the standard skin are unlikely to 
apply to any random skin an installation installs.

>> easier.  We give all body tags page-specific IDs to make this possible.  
>
>
> Presumably a combination of site name and page name? Or can we put the 
> site name on the <html> tag and the page name on the <body>? That 
> might be better - keep the two separate. Or we could (hackily) 
> surround every page with one big <div>.

We currently give body tags a domain-specific ID.  We should make that a 
class and give them page-specific IDs instead or make them both classes, 
probably the latter.

>> checksetup.pl creates a skins/other/ directory.  We tell installation 
>> admins who want to add skins as alternate stylesheets to put them 
>> into this directory.  
>
>
> Could this mechanism be combined with the multiple skins thing above? 
> For example, the Param could instead give a list of permitted 
> alternative skins, with the first one being the default.

I want admins to be able to add a skin to their installation just by 
dropping it into the skins/ directory.  Ideally the parameter would 
dynamically populate its list with the contents of skins/, but I'll 
settle for a text field if that's not possible.

-myk




More information about the developers mailing list