Expand description
Round 2 (docs/round-2-contract.md §2, direction): direction may sit on
ANY node and is inherited; everything direction-dependent reads the
NODE’s resolved direction: flex row order, logical insets and paddings,
mirrored glyphs and textAlign start/end (the implicit alignment of
text is start). Mirrors src/direction.ts; fixtures/text-direction.json
locks it. The surface carries the result into crate::style::Visual
(direction, text_align) so painters shape text with the node’s
direction as the bidi paragraph direction.
Enums§
- Physical
Align - A physical text alignment.
- Text
Direction - A text direction.
Functions§
- node_
directions - Every node’s direction: its own style
direction(resolved againstctxwhen given), else its parent’s; the root’s parent is the surface. Slots inherit from their owner. A template’s items take the direction of the node that renders them. - node_
text_ align text_align_offor a reduced node (nodeTextAlign).- physical_
text_ align start/end(and an absent or unknown value =start) as the physical side for a direction;left,right,centerandjustifystay.- text_
align_ of - A node’s text alignment: its (flattened) style
textAlign, else a Text’salignprop, elsestart, resolved against its direction.