Make composer controls direction-safe
Lay out composer fields and actions with logical CSS so the same control order and spacing work in left-to-right and right-to-left documents.Description
Requirements
Keep challenge-shell within the viewport in both writing directions.
Allow composer-field to grow and shrink below its content width without overflow.
Use logical inline spacing rather than left-only or right-only margins for composer-action.
Mirror the challenge-item inline layout when direction is right to left.
Keep mixed-direction textarea content isolated and editable without reversing its characters.
Expose a visible focus indicator on challenge-control in both directions.
English
Document direction is ltr
Field and Send action fit on one responsive row
Keep challenge-shell within the viewport in both writing directions.
Arabic
Document direction is rtl
The row mirrors with equivalent logical spacing
Allow composer-field to grow and shrink below its content width without overflow.
Constraints
Edit CSS only and keep the supplied shared fixture class namesSupport narrow and wide viewports without horizontal page overflowPreserve visible keyboard focus and readable text in every tested mode
Hints
Hint 1
Start with the shell-readable-layout behavior and make its observable result deterministic.
Hint 2
Model flexible-composer-field independently before combining it with the remaining states.
Hint 3
Verify the boundary described by control-focus-visible without changing caller-owned input.