W3C home > Mailing lists > Public > www-style@w3.org > April 1998

Maybe I'm wrong about the Cascading order

From: Russell Steven Shawn O'Connor <roconnor@wronski.math.uwaterloo.ca>
Date: Sat, 11 Apr 1998 19:06:59 -0400 (EDT)
To: www-style@w3.org
Message-ID: <Pine.SOL.3.95q.980411185610.1587A-100000@wronski.math.uwaterloo.ca>
I went back and re-read the sections on the cascading order is CSS1 and
CSS2, and I'm a little confused.

If an author style sheet has the rule  ``EM { color: black }'', and
the user style sheet has the rule ``P EM { color: white }''.   In the case
where an EM element is inside a P element, is its content black or white?
I thought it'd be white.  But after reading the specs I'm not so sure.

The confusion is because I don't know what you mean by ``then sort''.

We are first supposed by sort these rules by author reader.  So we get the

1. EM { color: black }
2. P EM { color: white }

Then we sort by specificity.  If we sort the above list by specificity we get

1. P EM { color: white }
2. EM { color: black }

But if we instead sort each ``block'' obtained in the previous sort we get

Author style sheet
1. EM { color: black }
User style sheet
2. P EM { color: white }

I hope you see where my confusion arises from.  Can someone clarify this
for me, and perhaps clarify this in the specs.  Thanks.

Russell O'Connor                           roconnor@uwaterloo.ca
"And truth irreversibly destroys the meaning of its own message"
-- Anindita Dutta, "The Paradox of Truth, the Truth of Entropy"
Received on Saturday, 11 April 1998 19:07:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:47 UTC