amenui
en·中 github ↗ v0.0.1
01docs 02components 03lab 04works
en·中github ↗
×

docs / guides / right to left docs / guides /

Right to left

02.4
On this page ▾
  1. What follows the direction
  2. Testing

A row lays out from the right when its direction is right to left: El::rtl(true) on the row (or any ancestor), or a locale that reads right to left. Taffy's Direction::Rtl does the layout; text runs are shaped by parley in their own direction, so mixed Latin and right-to-left text in one paragraph stays in logical order.

What follows the direction

ThingRight to left
A row's childrenFrom the right edge.
Padding and margins named start and endMirrored.
A text's alignmentStarts at the right.
Icons that point (arrows, chevrons)Mirrored by the component, not by the framework.

Testing

tests/i18n.rs checks that a right-to-left row starts at the right; a component page's RTL section shows its first example in a right-to-left row.