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

Alan Gresley wrote:
> Justin Rogers wrote:
> 
>> Alan, you should review :lang() as a pseudo-class. It is not much different from >
>> :rtl/:ltr in terms of functionality.
> 
> 
> Yes you are correct but I really miss the point why there is such a pseudo class as
> :lang in the first place since it's does nothing once the style sheet is disabled.

:lang is there to allow for styling based on language, so I'm not sure what your
point is here.

> I believe that [lang="val"] is much more suited and the semantic meaning is always
> in the source (accessible).

[lang|="val"] only selects elements with a lang attribute. It's useful for some things
perhaps, but :lang() is much better for most cases since it selects elements that
inherit the language.


Here is an example of a use case for :lang:

em:lang(zh), em:lang(ja), em:lang(ko) { font-style: normal; text-decoration: underline; }

Another use case is changing automatically-generated quote marks to match
language conventions.

   q:lang(en) { .. }
   q:lang(fr) { .. }

~fantasai

Received on Monday, 17 March 2008 17:30:57 UTC