HighDots Forums  

css referencing

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss css referencing in the Cascading Style Sheets forum.



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

Default css referencing - 02-03-2008 , 10:17 AM






Hi All,

Can anyone tell me if it's possible to accomplish the following:

a {
background:black;
}

b {
background:blue;
}

c {
background:green;
}

a,b,c {
color: white;
}


In a format such as:

a {
background:black;
color : foreground;
}

b {
background:blue;
color : foreground;
}

c {
background:green;
color : foreground;
}

foreground {
color: white;
}



TIA

~ Big Dog



Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: css referencing - 02-03-2008 , 10:38 AM






On 2008-02-03, Big Dog <bigdog (AT) traxic (DOT) com> wrote:
Quote:
Hi All,

Can anyone tell me if it's possible to accomplish the following:
[...]
In a format such as:

a {
background:black;
color : foreground;
[...]
foreground {
color: white;
}
It's not possible.

Although there's nothing to stop you pre-processing your CSS with
something if you want, if you need that.


Reply With Quote
  #3  
Old   
Big Dog
 
Posts: n/a

Default Re: css referencing - 02-04-2008 , 01:36 AM



Thanks Ben!

I had a feeling that was the answer but wanted to get a definative answer
instead of spinning my wheels.

~ Big Dog

"Ben C" <spamspam (AT) spam (DOT) eggs> wrote

Quote:
On 2008-02-03, Big Dog <bigdog (AT) traxic (DOT) com> wrote:
Hi All,

Can anyone tell me if it's possible to accomplish the following:
[...]
In a format such as:

a {
background:black;
color : foreground;
[...]
foreground {
color: white;
}

It's not possible.

Although there's nothing to stop you pre-processing your CSS with
something if you want, if you need that.



Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Reply With Quote
  #4  
Old   
Jim Palsgrove
 
Posts: n/a

Default Re: css referencing - 02-11-2008 , 12:28 PM



Big Dog wrote:
Quote:
Hi All,

Can anyone tell me if it's possible to accomplish the following:

a {
background:black;
}

b {
background:blue;
}

c {
background:green;
}

a,b,c {
color: white;
}


In a format such as:

a {
background:black;
color : foreground;
}

b {
background:blue;
color : foreground;
}

c {
background:green;
color : foreground;
}

foreground {
color: white;
}



TIA

~ Big Dog



Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
As far as I know no you can't. The format would be more like;
a { background-color: black;
the foreground color would be
color: white;
}

b {
background-color: blue;
color: white;
}

c {
background-color: green;
color: white;
}

and the foreground col0or would be color: white;

as in

body {
background-color: black;
color: white;
}

This would give a black background with white text. I don't know if this
is what you are looking for.


Reply With Quote
  #5  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: css referencing - 02-11-2008 , 07:39 PM



Jim Palsgrove wrote:
Quote:
Big Dog wrote:
Hi All,

Can anyone tell me if it's possible to accomplish the following:

a {
background:black;
}

b {
background:blue;
}

c {
background:green;
}

a,b,c {
color: white;
}


In a format such as:

a {
background:black;
color : foreground;
OP has "foreground" as CSS "variable"

<snip>
Quote:
This would give a black background with white text. I don't know if this
is what you are looking for.

As Ben said. No. CSS does not have variables. Look up the "cascade" in
Cascading StyleSheets for how the cascade can work for you.

BTW No such groups on my server alt.html.css & uiuc.org.css

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


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 - 2008, Jelsoft Enterprises Ltd.