W3C home > Mailing lists > Public > www-style@w3.org > March 2008

Re: [CSS3] ltr and rtl pseudo-class proposal

From: Alan Gresley <alan@css-class.com>
Date: Sun, 16 Mar 2008 01:33:35 -0700
To: Andrew Fedoniouk <news@terrainformatica.com>
cc: www-style@w3.org
Message-ID: <20080316013335.f8d1e42eb1f8db40312f41775502f7f0.e96cf80027.wbe@email.secureserver.net>

Andrew Fedoniouk wrote:


> I propose to add :ltr and :rtl pseudo classes to the Selector module.
> 
> These classes reflect value of nearest element with defined @dir
> attribute in child/parent chain of the element.
> 
> So if someone will define:
> <body dir=rtl>
> ...
> <ul dir=ltr>
> <li>Some text</li>
> </ul>
> </body>
> 
> then li element here can be styled appropriately:
> 
> li:rtl { padding-left: 0; padding-right: 10px;}
> li:ltr { padding-left: 10px; padding-right: 0;}
> 
> The problem is that attribute selector [dir=rtl|ltr] tests
> only the element itself but not its environment (parent chain).
> 
> Selectors like these:
> 
> *[dir="ltr"] li,
> *[dir="rtl"] li { .... }
> 
> and their variations are not quite working for the markup above.
[...]
> Andrew Fedoniouk.


Shouldn't that be?

*[dir="ltr"] li;
*[dir="rtl"] li { .... }

You have a ',' which should be a ';'


Alan

http://css-class.com/test/
Received on Sunday, 16 March 2008 17:50:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:02 GMT