← Back to team overview

launchpad-dev team mailing list archive

Stylesheet changes

 

I moved the last of the basic selectors from the old style sheet to the
3.0 style sheet.  This task was harder than I assumed because there was
several places to put each style, and some the rules looked similar, if
not identical, to existing rules. I think we made a crucial mistake in
the old style sheet and repeated it in the 3.0 stylesheet. Organising
styles by application leads to each application developing similar rules
instead of creating a rule for all Launchpad, or fixing an existing
rule.

I reorganised the stylesheet by selector purpose. Where we once
preferred to define all basic, then class, then id (application) css
rules, the new arrangement places all lists together for example.

It is now very easy to say we have too many kinds of lists and tables
because you can see all the rules in one place and you can see they are
very similar. The w3c css validator reports there is a tremendous amount
of duplicate in our css too.

I think the next steps in CSS fixes is factor out the duplication.
Replace the rarely used style classes with a common class that is easier
to reuse. Both of these action will require template css changes to be
landed with the CSS changes.

As when we created this stylesheet, application specific styles do not
belong in this style sheet; we want to develop common rules. Page
specific rules belong in the template. We do not want ids because they
encourage exceptions and duplication. This is the header of the file.

/* A brief introduction to this stylesheet
   or how not to kill kittens.

   1. This is a global style sheet. Add styles that can be used by all
      launchpad. Rules for just an application or a page do not belong
      in this file.
   2. Do not use IDs because they discourage reuse.
   3. This style sheet depends on YUI-Font;
      Only use these font percentages.
      Pixels  Percent
      10      77
      ...
   4. Use these colors when defining using application colors.
      * Launchpad-Gold: #F8C300
      * Answers: #3840BE
      * Blueprints: #3594BB
      * Bugs: #9F2B33
      * Code: #D18B39
      * Translations: #BB3A84
      * Registry: default (i.e. black)
   5. Add rules to the appropriate section.
      * Page layout
      * Block
      * Inline
      * Block-lists
      * Block-tables
      * Forms
      * Common presentations.
      * Header, footer, side, help
      * Colors
      * Sprites
      * Application or page specific styles that do not belong in this file.
*/


-- 
__Curtis C. Hovey_________
http://launchpad.net/

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups