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

Precedence when checking for more than one attribute

6 views
Skip to first unread message

Georg Maaß

unread,
Sep 13, 2009, 12:33:00 PM9/13/09
to
Hi

I have two rule sets:

toolbarbutton[command="cmd_newMainWindow"][type="menu-button"]
{
list-style-image: url("chrome://gmL/skin/newMainWindow_small.png");
}

toolbarbutton[command="cmd_newMainWindow"]
{
list-style-image: url("chrome://gmL/skin/newMainWindow.png");
}

What I want is to use a smaller image for the toolbar button, when it is
of type "menu-button". What I expect is the more precise selector to
have precedence over the less precise selector. In this case the first
one is more precise, because it matches only on toolbar buttons with
both attributes set accurate.

But what I get is, the second rule always wins, but it should win only,
if the type attribute is not "menu-button".

Is my understanding of CSS wrong, or is there a bug in XULRunner
(Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a1pre)
Gecko/20090829)?

http://www.w3.org/TR/CSS21/selector.html#attribute-selectors

0 new messages