Re: [Selectors4] :dir()

On Fri, Sep 30, 2011 at 2:43 AM, Daniel Glazman
<daniel.glazman@disruptive-innovations.com> wrote:
> Le 30/09/11 10:57, Christoph Päper a écrit :
>> fantasai:
>>
>>>    Added :dir() selector to select based on element directionality (ltr
>>> vs. rtl).
>>
>> When there is a small, fixed set of possible arguments one should consider
>> not using arguments at all. That means, ‘:ltr’ etc. seem the better choice.
>>
>> Also, abbrevs are evil, i.e. rather use ‘:direction()’.
>>
>
> Because the text direction is going to remain limited to horizontal
> in the future? The set of directions is not small...

The :dir() pseudo is not based off of either the 'direction' or
'writing-mode' properties.  It keys off of the host language's own
sense of direction, exemplified by the @dir attribute in HTML.  Thus,
at least currently, there are only two values we have to worry about.
The design is extensible if HTML gains further @dir values in the
future.

I think the abbreviation to "dir" is appropriate, as it helps to link
it to the @dir attribute rather than the 'direction' property.

~TJ

Received on Friday, 30 September 2011 14:50:56 UTC