W3C home > Mailing lists > Public > www-style@w3.org > March 1999

Re: a simple question

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Sun, 7 Mar 1999 23:15:42 +0000 (BST)
To: Ignacio Javier <ignacio.gomez@dicoruna.es>
cc: www-style@w3.org
Message-ID: <Pine.GSO.4.04.9903072304020.28433-100000@amos.bath.ac.uk>
On Sun, 7 Mar 1999, Ignacio Javier wrote:

> suppose the default is:
>    body {
>      color:green;
>      background-color:black
>    }
> 
> and your new cascading with that is:
> 
>    body {
>     font-size: 20px;
>     color:black
>    }
> 
> You did'n noticed of the first one and there is the disaster: All In
> Black.

This is something I have dubbed "property co-dependency", and which
has already been mentioned a few times.

It occurs in many other cases too, for example:

   DIV { background: green; color: yellow; }
   P { background: white; color: black; }
   EM { color: green; }

Then the following EM:

   <div><em>Hello</em></div>

...would be green on green.

The answer with 'color' and 'background-color' is to *always* specify
them together, and *never* use 'background-color: transparent'. Also,
if you use 'inherit' for one, use it for the other.

This cannot be sidestepped by careful design of author stylesheets,
because USERS can create their own sheets, which get cascaded in
(this, by the way, is a good thing).

Other problems include clashes with the 'display:table-*' constructs,
and the suggested replaced content idea, and x-height adjustments,
and, in fact, any property that depends on other properties or
properties set in other rules.


No one has yet suggested a workable solution to this problem.

-- 
Ian Hickson 
U+2642 U+2651
U+262E U+2603 U+263A
Received on Sunday, 7 March 1999 18:15:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:58 GMT