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
The px and mx style-prop shorthands expand to physicalpaddingLeft+paddingRight / marginLeft+marginRight, not the logicalpaddingInline / marginInline. They do not adapt to writing direction.
paddingInline / marginInlineare available as their own long-form style props, so logical insets are possible — just not through the x shorthands.
Impact
A sharp edge: px / mx look like the natural choice for horizontal insets, and are the idiom in peer libraries, yet they silently break RTL mirroring. Related to #11 (RTL not implemented).
Otherwise: keep them physical but document the distinction in apps/docs/content/reference/style-props.mdx and steer RTL-sensitive code toward paddingInline / marginInline.
Summary
The
pxandmxstyle-prop shorthands expand to physicalpaddingLeft+paddingRight/marginLeft+marginRight, not the logicalpaddingInline/marginInline. They do not adapt to writing direction.Details
packages/core/src/style-props.ts:95—px: { cssProperty: ['paddingLeft', 'paddingRight'], scale: 'space' }packages/core/src/style-props.ts:105—mx: { cssProperty: ['marginLeft', 'marginRight'], scale: 'space' }paddingInline/marginInlineare available as their own long-form style props, so logical insets are possible — just not through thexshorthands.Impact
A sharp edge:
px/mxlook like the natural choice for horizontal insets, and are the idiom in peer libraries, yet they silently break RTL mirroring. Related to #11 (RTL not implemented).Suggested fix
px/mxto the logicalpaddingInline/marginInline— consistent with the cross-platform and RTL goals. (On native, pair this with the RTL resolution work from RTL / bidirectional layout not implemented despite being a committed v1 feature #11.)apps/docs/content/reference/style-props.mdxand steer RTL-sensitive code towardpaddingInline/marginInline.