David Dorward wrote:

> 2009/9/27 Jukka K. Korpela <[email protected]>:
>> Theoretically, you could use selectors like [dir="rtl"], but I don’t
>> think that’s practical. (For one thing, such a selector matches an
>> element that has the dir property explicitly set to "rtl", as
>> opposite to inherited directionality – and it’s not very practical
>> to set directionality for every element explicitly with an HTML
>> attribute.)
>
> Descendent selectors. :)

... are tricky.

> [dir="rtl'] whatever {
>
> }

I suppose you meant

[dir="rtl"], [dir="rtl"] * { ... }

(since surely the rule should apply to an element that has dir="rtl" set on 
it, even if it is not inside an element with dir="rtl").

But suppose we have

<div dir="rtl">
  <div dir="ltr">
  ...
  </div>
</div>

Then the rule would apply to the inner div, too. So things do get tricky, 
especially considering the possibility that your style sheet may need to 
deal with a document that has no directionality markup.

Of course many important special cases would still be manageable, like a 
document with single directionality everywhere (most documents around, 
undoubtedly) and a document with explicit dir markup for every element.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to