HighDots Forums  

Re: Will CSS ever be programmable?

alt.html alt.html


Discuss Re: Will CSS ever be programmable? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Spartanicus
 
Posts: n/a

Default Re: Will CSS ever be programmable? - 07-14-2006 , 09:57 AM






TreatmentPlant <treatmentplant (AT) DIESPAMMERS (DOT) iinet.net.au> wrote:

Quote:
colour1:=red;
colour2:=blue;
colour3:=white;

body {background-color:colour3; color:colour2; border: thin solid colour1}
h1 {background-color:colour2; color:colour3;}
h2 {background-color:colour3; color:colour1;}
etc

...you could change the entire site colour scheme more easily.
...it would save you minutes!
Any decent editor has a S&R feature

Search: color:blue
Replace: color:red

Only takes a few seconds

Btw, this is off topic in alt.html.critique, crossposted and follow-up
set to alt.html

--
Spartanicus


Reply With Quote
  #2  
Old   
Eric Bohlman
 
Posts: n/a

Default Re: Will CSS ever be programmable? - 07-14-2006 , 06:00 PM






Spartanicus <invalid (AT) invalid (DOT) invalid> wrote in
news:2f8fb2p75b5ejrst9jojnmmhcjii0q2okk (AT) 4ax (DOT) com:

Quote:
TreatmentPlant <treatmentplant (AT) DIESPAMMERS (DOT) iinet.net.au> wrote:

colour1:=red;
colour2:=blue;
colour3:=white;

body {background-color:colour3; color:colour2; border: thin solid
colour1} h1 {background-color:colour2; color:colour3;}
h2 {background-color:colour3; color:colour1;}
etc

...you could change the entire site colour scheme more easily.
...it would save you minutes!

Any decent editor has a S&R feature

Search: color:blue
Replace: color:red

Only takes a few seconds
This would break down if he started with:

colour1:=red;
colour2:=red;
colour3:=white;

and he wanted to change it to his example. "Replace all" would change
his body border and h2 foreground to blue as well. Inspect/confirm S&R
would certainly save keystrokes, but it would have increased cognitive
load (have to determine, for every "red" you find, whether it was one of
the ones you wanted to change).

It's really the old issue of separating the *name* of something from its
*value*. We all, hopefully, know that CSS class names should reflect the
*purpose* of the class rather than its *appearance*, not just because it
lets us easily change them, but also because we might start out with two
or more areas with different purposes but the same appearance, and later
want them to have different appearances.

However, what the OP wants could easily be achieved by using any old text
preprocessor like m4.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.