- From: Lina Kemmel <LKEMMEL@il.ibm.com>
- Date: Thu, 22 Sep 2016 18:24:42 +0300
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-international@w3.org
>>> Yes. "auto" is computed to either LTR or RTL at the HTML so that
>>> the result can be selected by the :dir() selectors.
>>
>> I'd say this means that the :dir() selectors should only recognize
>> ltr | rtl... But why does this also affect the "direction"
>> property (which :dir() selectors even won't consider, I think).
> Because selectors cannot depend on the computed value of a property:
> :dir(rtl) { direction: ltr; } /* This is clearly unresolvable. */
According to https://drafts.csswg.org/selectors-4/#the-dir-pseudo,
"... [HTML5] defines how to determine the directionality of an element,
based on a combination of the dir attribute, the surrounding text, and
other factors. The :dir() pseudo-class does not select based on
stylistic states—for example, *the CSS direction property does not*
affect whether it matches."
Doesn't this mean that :dir(rtl) won't even look at {direction: xxx;}
ignoring all of the { direction: ltr; }, { direction: rtl; }, or
[the non-existing] { direction: auto; } equally?
> As the spec says, 'direction' should never have been part of CSS.
> It is not a replacement for having a markup-based 'dir' attribute.
Sure, but it is still part of CSS and is not marked as deprecated /
obsolete explicitly.
In many cases, BTW, it can provide a functional replacement for the
'dir' attribute.
- Lina
Received on Thursday, 22 September 2016 15:25:16 UTC