[alreq] :dir lacks wide support (#256)

r12a has just created a new issue for https://github.com/w3c/alreq:

== :dir lacks wide support ==
<i class="meta">This issue is applicable to all languages with RTL orthographies.</i>

Style sheets need to add special rules for RTL styles if they are not supported by logical properties or values.

One approach is to create a second style sheet which, when pulled into an HTML page, overrides styles in the main style sheet with settings for RTL text. This approach is not ideal because it requires maintaining the styles in two separate locations, which can therefore get out of synch, and it requires explicit addition of a call to the second style sheet in every page that will support RTL text.

The `:dir()` pseudo-class avoids these issues by allowing the content author to include the RTL variations in the same style sheet as the others. However, it is not yet supported by all major browser engines.

A workaround that precedes selectors with `:root[dir=rtl] selector_here` can help, but `:dir()` is a better way forward. There also appear to be Shadow DOM implications if this is not supported.



<b class="subhead">Specs:</b>
[issue XXX](url) Closed.

[selectors-4](https://www.w3.org/TR/selectors-4/#the-dir-pseudo) Describes the :dir() feature in CSS.
[html5](https://html.spec.whatwg.org/multipage/semantics-other.html#selector-ltr) Describes the :dir() feature in HTML.


<b class="subhead">Tests & results:</b>
[Can I Use](https://caniuse.com/css-dir-pseudo) indicates that <span class="pass">Gecko</span> supports `:dir()`, but <span class="fail">Blink</span>, and <span class="fail">Webkit</span> do not.

The functionality appears to be available in Blink, but behind a flag.



<b class="subhead">Browser bug reports:</b>
[Blink](https://bugs.chromium.org/p/chromium/issues/detail?id=576815) • [Webkit](https://bugs.webkit.org/show_bug.cgi?id=64861)



<b class="subhead">Priority:</b>
This pseudo-class significantly improves the process of designing style sheets that can cater for both LTR and RTL pages.  It is a valuable enabler for better internationalisation of the Web for the billion or so potential users of RTL scripts.



Please view or discuss this issue at https://github.com/w3c/alreq/issues/256 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 12 July 2022 11:34:01 UTC