You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't currently include horizontal text-alignment values in Spectrum Tokens.
The proposal
We're considering adding some for cases like this in the table component:
The only potential complication comes from right-to-left and left-to-right language switching. CSS supports logical properties start, center, and end instead of left, center, and right. This allows the alignment to change based on language direction without changing the text-align property.
---
"$schema": https://json-schema.org/draft/2020-12/schema"$id": https://opensource.adobe.com/spectrum-tokens/schemas/token-types/text-align.jsontitle: Text aligndescription: Sets whether text should be aligned `start`, `center`, or `end`type: objectallOf:
- "$ref": https://opensource.adobe.com/spectrum-tokens/schemas/token-types/token.jsonproperties:
"$schema":
const: https://opensource.adobe.com/spectrum-tokens/schemas/token-types/text-align.jsonvalue:
type: stringenum:
- start
- center
- enddefault: startcomponent: {}private: {}deprecated: {}deprecated_comment: {}uuid: {}
Alternatives considered
We've considered the more universal left, center, and right values, but we lose out on the logical option benefits mentioned in the proposal.
Questions
What about non-web implementations, would logical options cause issues for text-alignment?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The problem
We don't currently include horizontal text-alignment values in Spectrum Tokens.
The proposal
We're considering adding some for cases like this in the table component:
The only potential complication comes from right-to-left and left-to-right language switching. CSS supports logical properties
start
,center
, andend
instead ofleft
,center
, andright
. This allows the alignment to change based on language direction without changing the text-align property.Alternatives considered
We've considered the more universal
left
,center
, andright
values, but we lose out on the logical option benefits mentioned in the proposal.Questions
What about non-web implementations, would logical options cause issues for text-alignment?
Beta Was this translation helpful? Give feedback.
All reactions