Loading...
[dir='rtl'] .arrow {
transform: scaleX(-1);
}.arrow:dir(rtl) {
transform: scaleX(-1);
}:dir() uses the computed direction, including inherited and 'auto' values, so the icon flips wherever text is right-to-left.
[dir='rtl'], which doesn't match text marked dir='auto' that turns out right-to-left.:dir(rtl) instead of [dir='rtl'], which misses inherited and 'auto' directions.dir attribute, since :dir() ignores the CSS direction property.:dir() is left for things like flipping arrow icons.:dir() matches by text direction, 'ltr' or 'rtl'. :lang() matches by language, and many languages share the same direction.
No. It uses the direction from the HTML dir attribute and its inheritance, so set direction in the markup.