W3C home > Mailing lists > Public > www-validator-css@w3.org > August 2001

background-color: transparent versus omitted

From: Alan J. Flavell <flavell@a5.ph.gla.ac.uk>
Date: Tue, 14 Aug 2001 17:55:35 +0100 (BST)
To: <www-validator-css@w3.org>
Message-ID: <Pine.OSF.4.30.0108141740110.21929-100000@a5.ph.gla.ac.uk>


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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:30 UTC