background-color: transparent versus omitted

Greetings,

When a text colour is specified at a particular level of specificity,
without specifying a background-colour, the CSS validator rightly
objects, advising that it's good practice to specify both at a given
level of specificity, or neither.  This is, of course, good advice
and the reasons relating to the effect of the cascade (with
different levels of specificity and with stylesheets from different
sources) are quite widely known.

However, if one specifies a background-color of 'transparent', the
validator stops complaining (if I'm not mistaken).  I beg to suggest
that specifying a background-color of 'transparent' along with an
explicitly-specified text colour, can lead to cascading problems which
are very similar in nature to those resulting from not specifying a
background-color at all.

A chance discussion on de.comm.infosystems.www.authoring.misc has just
confirmed that I am not alone in considering this to be a problem.

May I suggest that the validator should give out analogous warnings
in this situation (i.e text colour specified explicitly and background
specified by 'transparent')?

While composing this note, it occurs to me that difficulties of a
similar nature might arise if an explicit background-color is
specified while the text colour is specified as 'inherit'.

best regards

Received on Tuesday, 14 August 2001 12:55:39 UTC