[css21-selectors] Interpretation of attribute selector

I am wondering whether a problem I am observing in current browsers is
attributable to browser bugs or to my misunderstanding of the attribute
selector.  The browsers are not overriding a text alignment of justify
with left when I expect.

Given 4 test pages:

http://www.sfmta.com/cms/testSelector4.htm
with style 
p[style="text-align: justify;"] {text-align: left ! important;}
and paragraph tag
<p style="text-align: justify;">...</p>

http://www.sfmta.com/cms/testSelector5.htm
with style 
p[style="text-align:justify;"] {text-align: left ! important;}
and paragraph tag
<p style="text-align:justify;">...</p>

http://www.sfmta.com/cms/testSelector6.htm
with style 
p[style="text-align: justify;"] {text-align: left ! important;}
and paragraph tag
<p style="text-align:justify;">...</p>

http://www.sfmta.com/cms/testSelector7.htm
with style
p[style="text-align:justify;"] {text-align: left ! important;}
and paragraph tag
<p style="text-align: justify;">

Given the CSS 2.1 selector specification, I would expect:
http://www.sfmta.com/cms/testSelector4.htm left
http://www.sfmta.com/cms/testSelector5.htm left
http://www.sfmta.com/cms/testSelector6.htm justify
http://www.sfmta.com/cms/testSelector7.htm justify

but what I am seeing in Firefox 3.6.3 Windows is:
http://www.sfmta.com/cms/testSelector4.htm left
http://www.sfmta.com/cms/testSelector5.htm justify (unexpected)
http://www.sfmta.com/cms/testSelector6.htm left (unexpected)
http://www.sfmta.com/cms/testSelector7.htm justify

and in IE8 Windows, both in standards view and compatibility view:
http://www.sfmta.com/cms/testSelector4.htm justify (unexpected)
http://www.sfmta.com/cms/testSelector5.htm justify (unexpected)
http://www.sfmta.com/cms/testSelector6.htm justify
http://www.sfmta.com/cms/testSelector7.htm justify

and in Safari 4 Windows:
http://www.sfmta.com/cms/testSelector4.htm left
http://www.sfmta.com/cms/testSelector5.htm left
http://www.sfmta.com/cms/testSelector6.htm justify
http://www.sfmta.com/cms/testSelector7.htm justify


Hope this helps,
Charles Belov
SFMTA Webmaster

Received on Thursday, 27 May 2010 22:15:25 UTC