Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

multiple class selectors: IE bug?

0 views
Skip to first unread message

Lucas Fletcher

unread,
Jun 27, 2002, 9:06:17 PM6/27/02
to
After experimenting around with multiple class selectors in css:

.red.yellow {
background-color: orange;
}

I've come to the conclusion that IE6 at least implements it incorrectly
(actually in a rather bizarre fashion). According to CSS2:

To match a subset of "class" values, each [selector] value must be preceded
by a ".", in any order.

This means that all selectors must be classes of an element for the rule to
apply to it. (in other words the element's classes must form a super-set of
the selectors, or a third way of saying it, the selector values must form a
subset of the element's classes)

However: a class of "red" matches ".yellow.red" in violation of the above.
(btw, a class of "red" _doesn't_ match ".red.yellow" though, although order
isn't supposed to matter.)

There are so many weirdnesses to IE's algorithm for determining if a rule
with multiple class selectors applies to a given element that I have given
up trying to determine what it must be. If anyone knows, please let me know.

Lucas Fletcher
Dealers In Notions


Lucas Fletcher

unread,
Jul 3, 2002, 3:18:35 AM7/3/02
to
0 new messages