crossAxisAlignment
Where children sit across the axis their parent stacks them on.
Path
…elements.<element>.styles.crossAxisAlignment
Elements Supported
Value
"START"(default) — Children align to the leading edge of the axis across the stack."END"— Children align to the trailing edge of the axis across the stack."CENTER"— Children align to the midpoint of the axis across the stack."STRETCH"— Children fill the axis across the stack rather than sizing to their own content."BASELINE"— Children align on the baseline of their first line of text.null— The element has no auto-layout, so there is no cross axis to align on.
Platform bindings
Figma
Disposition: approximated · Realised by: rule wrapping
Remaps START, END, CENTER and BASELINE. Loss: STRETCH is a schema value Figma’s counter-axis property cannot express, and it is skipped with a warning — a declared degradation that applies nothing and says so, which is exactly what DSPEC-43 asks for.
CSS
Disposition: bound · Realised by: rule autoLayout
Resolved jointly with
This key does not map on its own. Its rule’s ordered case table is linked above.
wrapping — Figma
autoLayout — CSS
Figma key
Reads from counterAxisAlignItems. See ADR 040 — Layout Alignment.
Decisions
- ADR-040 — Replace
primaryAxisAlignItemsandcounterAxisAlignItemswithmainAxisAlignmentandcrossAxisAlignment - ADR-090 — Container Promotion Sources Opened to Closed-Value Layout Properties
- ADR-113 — Style defaults belong to the schema
Rules
| Rule | Statement |
|---|---|
| DSPEC-44 | Every property of Styles declares a default, and its value validates against that property’s own schema |
| DSPEC-45 | A declared default is a literal, never a TokenReference, PropBinding or Conditional |
| DSPEC-47 | Jointly resolved keys are stated as an ordered case table over a declared operand set, not as prose |
Source
| Format | File |
|---|---|
| JSON Schema | packages/schema/schema/styles.schema.json |
| TypeScript | packages/schema/types/Styles.ts |
| Specification | §4.1a, §11 |