<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Bugzilla is being converted to structural HTML and stylistic CSS for
both <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=251068">skinnability</a>
and <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=251740">customizability</a>,
and we need a CSS plan that works for both.  Here's what I'm thinking:<br>
<br>
<hr size="2" width="100%">We move the Bugzilla CSS files, which
currently live in css/, to skins/default/.  We style all Bugzilla pages
with skins/default/global.css, and we style pages needing special
styling with page-specific files named after the page they style (f.e.
skins/default/buglist.css).<br>
<br>
[Why move from css/ to skins/?  Because modern CSS often includes
images, and we need to store them somewhere, and it'll be much easier
to install skins into a single directory instead of breaking out the
stylesheet and image files, and "css" is misleading if we're storing
images there too.]<br>
<br>
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/.  We also point
out that customizers can put all their rules, including page-specific
rules, into the single file skins/custom/global.css to make things
easier.  We give all body tags page-specific IDs to make this
possible.  We add a caveat about the performance cost of this approach.<br>
<br>
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.  Skins can be either a single file named
skins/other/<name>.css or a
directory of files named skins/other/<name>/.  The <name>
of the
file/directory will be the title of the alternate stylesheet.<br>
<br>
[Why make checksetup create the skins/custom/ and skins/other/
directories?  Because we don't want them managed by CVS, since that
complicates the output of "cvs diff".]<br>
<br>
Bugzilla automatically adds custom and alternate stylesheets to pages
via a template plugin that trawls skins/custom/ and skins/other/ and
provides a list of available custom/alternate stylesheets to
header.html.tmpl.<br>
<br>
header.html.tmpl generates persistent stylesheet tags for custom
stylesheets, preferred stylesheet tags with the title "standard" for
default stylesheets, and alternate stylesheet tags with the titles
"<name>" for other stylesheets.  Thus pages take on the default
style, as modified by custom styles, until the user selects an
alternate style, whereupon they take on the default style, as modified
by custom styles.<br>
<br>
More on persistent, preferred, and alternate stylesheets:<br>
  <a class="moz-txt-link-freetext" href="http://www.w3.org/TR/html4/present/styles.html#h-14.3.1">http://www.w3.org/TR/html4/present/styles.html#h-14.3.1</a><br>
  <a class="moz-txt-link-freetext" href="http://www.alistapart.com/articles/alternate/">http://www.alistapart.com/articles/alternate/</a><br>
<br>
Installations admins can choose a different default skin via a
parameter, in which case the skin they choose becomes the preferred
stylesheet.<br>
<br>
Portions of this proposal that can be usefully implemented
independently should be.<br>
<hr size="2" width="100%"><br>
Thoughts?<br>
<br>
-myk<br>
<br>
</body>
</html>