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
Essentially instead of doing things like margin-left: 1em, you can do margin-inline-start: 1em and while it will default to a left margin on LTR content, it will automatically become a right margin on RTL.
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
Uh oh!
There was an error while loading. Please reload this page.
-
There is a pretty big problem with directional box model properties because they don't offer a solution to RTL or vertical content.
CSS has a well supported solution for this in form of flow-relative box model properties:
https://drafts.csswg.org/css-logical/#box
Essentially instead of doing things like
margin-left: 1em
, you can domargin-inline-start: 1em
and while it will default to a left margin on LTR content, it will automatically become a right margin on RTL.Here is some more helpful info:
https://web.dev/logical-property-shorthands/
Beta Was this translation helpful? Give feedback.
All reactions