CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
IBM developerWorks
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 10th, 2003, 06:24 AM
tyndyll tyndyll is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Belfast
Posts: 78 tyndyll User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 33 m 18 sec
Reputation Power: 6
Constants in CSS?

Hello Readers One and All
(and Seasons Greetings too...)

Is it possible to define constants in a CSS so for example each time I use

color = 'Grey';

It inserts #D6D7DE? I appreciate there are already defaults (and Grey is probably one of them. This isn't about overwriting those defaults, but about adding my own...

Any information appreciated

Thanks

Tyndyll

Reply With Quote
  #2  
Old December 10th, 2003, 06:28 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,622 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 2 h 13 m 2 sec
Reputation Power: 548
no, there is no way to do that.

Reply With Quote
  #3  
Old December 10th, 2003, 06:49 AM
Arden's Avatar
Arden Arden is offline
HTML/CSS/Photoshop maven
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: CA
Posts: 184 Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Arden
You'd have to use some fancy code to accomplish that, like storing your value in a variable in PHP, Perl, Javascript, etc.

BTW: That's why they call them constants.

Reply With Quote
  #4  
Old December 10th, 2003, 08:53 AM
tyndyll tyndyll is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Belfast
Posts: 78 tyndyll User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 33 m 18 sec
Reputation Power: 6
Cheers for the info - could set it up in PHP but probably more effort than its worth. The design department are still playing with the shades to make it look all pretty so it would have been handy just to change the constant in one place....

As an aside I think TopStyle has an option like this (from memory) but just wanted to check it out for academia's sake

Reply With Quote
  #5  
Old December 10th, 2003, 05:15 PM
Arden's Avatar
Arden Arden is offline
HTML/CSS/Photoshop maven
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: CA
Posts: 184 Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Arden
Yes, it would need a good bit of PHP coding to get it to interpret "gray" as a # value you set.

To congregate all the tags you'd need as gray into one spot, define them all at the same time, like:

a, h1, etc. {color: gray}

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Constants in CSS?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway