:dir()

Widely Available (since 2026-06-07)

The :dir() CSS functional pseudo-class matches elements by text direction, either right to left (rtl) or left to right (ltr).

Browser support (view on caniuse.com)

  • Chrome 120 Released on 2023-12-05
  • Chrome Android 120 Released on 2023-12-05
  • Edge 120 Released on 2023-12-07
  • Firefox 49 Released on 2016-09-20
  • Firefox for Android 49 Released on 2016-09-20
  • Safari 16.4 Released on 2023-03-27
  • Safari on iOS 16.4 Released on 2023-03-27

MDN documentation

Usage (according to Chrome Platform Status)

~16.492% of page loads. More data at chromestatus.com.

Interop