Re: author-defined color aliases

A similar, more generic proposal was made recently whereby aliases 
could be created for any value. The feeling was that this would add new 
constructs to CSS for little benefit.

The current way to minimise the chance of typos and such is to do 
something more like this:

.banner { font-size:xx-large; }
.copy { font-size:medium; }

.banner, .copy { color:red; }

Almost assigning style selectors to properties rather than the other 
way around.

HTH,

Ben


On Sunday, Jun 15, 2003, at 19:19 Europe/London, Brant Langer Gurganus 
wrote:

>
> While it is probably too late for CSS3 Color Module consideration, I 
> believe that author-definable color aliases would be useful.  CSS can 
> define the RGB values of common colors (red, green, blue, etc.) and 
> then authors can define aliases to their commonly used RGB values.
>
> Example of CSS-defined color (normatively included in specification):
> @color-definition {
>    name: white
>    color: #FFFFFF
> }
>
> Example of Author-defined color:
> @color-definition {
>    name: almostBlack;
>    color: #010101
> }
>
> Example Usage:
> body {
>    color: almostBlack;
>    background-color: white
> }
>
> The advantages of such an addition to CSS would be more consistend 
> color themes because there would be fewer chances for typos.  If I 
> have a color like #7F027E, it is easier to associate that with a color 
> name than to remember that obscure combination over and over.
>
> -- 
> Brant Langer Gurganus
> <http://www.cherokeescouting.org/OtherUnits/Troop545IIN/brant.xhtml>
>
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.1
> GCS/IT/M/P/S/TW d- s+:- a18 C+++ U P+ L E-- W+++ N+++ o K- w+ O--- M-- 
> V- PS+ PE-- Y-- PGP--- t+ 5 X R tv+ b++ DI D G++ e h! !r y-
> ------END GEEK CODE BLOCK------
>
>
>
> avast! (VPS 6/13/2003): the message contains no virus
>
>

(q)	Ben Godfrey?
(a)	Web Developer and Designer
	See http://aftnn.org/ for details

Received on Sunday, 15 June 2003 14:30:24 UTC