"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.4.246 ...
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> wrote:
Both 'transparent' and 'inherit' rely on getting something appropriate
from the result of the cascade at a different level.
Thus, 'inherit' is no real improvement over 'transparent', especially
since
'inherit' isn't even supported by IE.
Really? It works fine for me in IE6, at least to the extent that it makes
the warning go away and doesn't mess up my pages. Mind you, that may be more
luck than good coding on my part :-)
It's a pity that people use tools like
the "CSS Validator" to get some mystic "approval" and complain about
reasonable warnings or shut them down by making useless or worse than
useless
changes to their style sheets.
I assume you are generalizing, and not just talking about me :-)
Nevertheless, let me say that I found the warning less than clear and
primarily wanted to understand what it was saying and what it implied for
the design of my style sheets. I wasn't primarily trying to get approval or
prevent reasonable warnings. I find some of the messages produced by the CSS
validator to be fairly cryptic: making them clearer and/or linking them to
tutorials to explain the broader issues raised by the messages would go a
long way to helping me write better CSS. But I don't have the expertise to
do this and I don't have the authority to order anyone else to do it so the
best I can do is try to understand what's going on :-)
There's another aspect to this that no one has mentioned.
If I have any halfways substantial number of selectors in my CSS, I might
state the same colour combination for color/background-color quite a few
times. That means that if I want to change that color, I have to change it
in many places. If I use some kind of "change all" command in my editor,
that is not too big a problem but if I change the instances manually, it is
very easy to miss one or two instances of the colour, which can cause some
confusion.
Now, if CSS provided variables, like programming languages do, that would
make life a lot easier. For instance, I would like to be able to do
something like this:
myBackgroundColor = #0000cc;
myTextColor = #ffff66;
p {
background-color: myBackgroundColor;
color: myTextColor;
}
td {
background-color: myBackgroundColor;
color: myTextColor;
}
etc.
Then, changing the background-color would simply be a matter of changing it
once where the variables are defined, even if your editor didn't have a
"change all" feature.
Has anyone heard if there are plans to provide this sort of variable in
future version of CSS? I'm definitely not holding on breath on this being
provided, just curious to know if it is "in the works".
Rhino