CSS Selector Pseudo class :dir()

The :dir CSS pseudo-class matches elements based on the directionality of the text contained in it. Pseudo-class :dir() is not equivalent of using the [dir=…] attribute selector. The latter matches a value of the dir and doesn't match when no attribute is set, even if in that case the element inherits the value of its parent. On the other hand, :dir() will match the value calculated by the UA, being inherited or the auto value.



Editor's draft

Status in Chromium


Proposed (launch bug)

Consensus & Standardization

  • Shipped
  • Mixed public signals
  • No public signals
  • No signals


Last updated on 2017-09-17