On Thu, 07 Apr 2005 10:33:58 +0100, C Slack <[EMAIL PROTECTED]> wrote:

I group and sort properties in rule like this:

selector {
   positioning; floats;
   width; height;
   margin; padding;
   border;
   color; background;
   text-; font-;
}

For programming languages I prefer Allman style of braces, but for CSS K&R
style
saves precious space and clarity doesn't suffer that much.

If rule has few properties I usually type it in one line:
* html foo {height: 1%; margin-left: -3px;}

In stylesheet I generally sort rules by selector (cascade value).
Simplest selectors (body, h1, a, hr, form) go on top
and then more specific rules (#menu, #sidebar, #sidebar foo.bar) follow.

I make one general stylesheet that applies to all pages
and, when neccessary, add second stylesheet with specific rules for page
or group of pages.


I've implemented preprocessor for CSS (in PHP + apache mod_rewrite) that allows me to use variables and math expressions:

#menu {
   width: [$menuwidth-$menupadding-2*5px];
   padding: $menupadding;
   border: 5px solid red;
}

(ofcourse that is evaluated before sending to the client)

--
regards, Kornel Lesiński

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to