W3C home > Mailing lists > Public > www-style@w3.org > June 2010

RE: [css21-selectors] Interpretation of attribute selector

From: Belov, Charles <Charles.Belov@sfmta.com>
Date: Wed, 2 Jun 2010 11:13:45 -0700
Message-ID: <E17F75B6E86AE842A57B4534F82D03769C29EE@MTAMAIL.muni.sfgov.org>
To: "Boris Zbarsky" <bzbarsky@MIT.EDU>
Cc: "www-style list" <www-style@w3.org>, "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>
> Boris Zbarsky [mailto:bzbarsky@MIT.EDU] wrote on Tuesday, June 01,
2010 12:23 PM:
> On 6/1/10 3:12 PM, Belov, Charles wrote:
> > No, Word 2003 generates filtered HTML such as
> >
> > <p style="text-align:justify;">
> 
> Which is fine.
> 
> > which I wish to override using CSS using
> >
> > p[style="text-align:justify;"] {
> > 	text-align:left;
> > }
> 
> This is what I claimed was rare.  That doesn't help the few 
> people trying to do it, of course.....

Presumably it would become less rare once WCAG 2.0 becomes a
recommendation.

From
http://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast :

1.4.8 Visual Presentation:  For the visual presentation of blocks of
text, a mechanism is available to achieve the following: (Level AAA)

   3. Text is not justified (aligned to both the left and the right
margins).

> Note that your situation happens to have a simple solution, 
> though, given the small scale and specific nature of what 
> you're trying to do:
> 
>    p[style="text-align: justify;"], p[style="text-align:justify;"] {
>      text-align: left;
>    }
> 
> This will obviously not work if the @style has more stuf in 
> it, etc, but neither did your original selector above.

Alas, it appears not to work at all, producing justified text in Firefox
3.6.3 Windows, Safari 4 Windows and Internet Explorer 8.

Please see http://www.sfmta.com/cms/testSelectorD.htm .

Hope this helps,
Charles Belov
SFMTA Webmaster
 
Received on Wednesday, 2 June 2010 18:21:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT