W3C home > Mailing lists > Public > www-style@w3.org > December 2004

CSS Suggestion - based-on:

From: by way of Bert Bos <kevin@multiblah.com>
Date: Fri, 10 Dec 2004 16:17:20 +0100
To: www-style@w3.org
Message-Id: <200412101617.20423.kevin@multiblah.com>


Hi,

I'd like to make a small suggestion to the CSS spec. I have looked
through the newly proposed spec, and the archives, so i do hope that I
have not duplicated older suggestions.

I think a 'based-on' option would be of great benefit, as it allows you
to create a ladder of styles, which all hang off the one main rule.
 This is very common in other styles sheets for example, in Adobe
 InDesign, and I find it particularly useful.

Here is an example.

e.g. h1 {
 font-family: Verdana, sans-serif;
 color: red;
 etc...
}

h2 {
 based-on: h1;
 font-size: 1.4em
}

h2 {
	based-on: h1;
	font-size: 1.3em
}

When deploying complex sites with CSS, this would minimize the clutter
of complicated rules that emerge, despite our best efforts to keep it
 as lean as possible.

It would allow great flexibility to chain styles together, which
currently is not easily achieved in a clean and concise fashion.

Thanks for your time,

Kind Regards,

- Kevin
Received on Friday, 10 December 2004 15:17:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:35 GMT