|
Posted by Rincewind on 10/08/05 23:05
On 8 Oct 2005 11:28:49 -0700, bcr07548@creighton.edu wrote:
> I was validating some CSS last night and kept getting warnings that my
> TD styles had a 'background-color' but no 'color.' I didn't have one
> because I wanted the text to be the color specified in the page's style
> sheet. I thought that was the idea of CSS - styles "cascade" down and
> any property not found for a particular tag at that level are then
> searched for at higher levels of the DOM structure.
>
> Anyway, for the sake of having the CSS validate without warnings, I
> want to add color properties for the tags that need them. But for sake
> of maintainability, can you set one CSS property equal to another so
> you don't have to hunt down all the properties and change their values?
> For example,
>
> body
> {
> background-color: #000088;
> color: #0000FF;
> }
>
> td
> {
> background-color: #000044;
> color: body.color;
> }
>
> This is sort of what I am after but I haven't found any info on it
> online and have no idea what the syntax would be, if it is even
> possible. I've seen this asked in newsgroups (including this one) but
> no one ever seems to answer the question. Does anyone know if this can
> be done?
>
> -Brandon
Take a look at these I asked the same question of W3c :
http://lists.w3.org/Archives/Public/www-validator-css/2005Sep/0014.html
http://www.w3.org/Bugs/Public/show_bug.cgi?id=774
[Back to original message]
|