Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert padding/margin props to CSS logical properties #842

Open
chanceaclark opened this issue May 24, 2022 · 0 comments
Open

Convert padding/margin props to CSS logical properties #842

chanceaclark opened this issue May 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@chanceaclark
Copy link
Contributor

chanceaclark commented May 24, 2022

Is your feature request related to a problem? Please describe.
We want to be able to support many kinds of user experiences across the world. Currently, our padding/margin properties are geared towards ltr screens. In order for our experiences to work globally, we should use CSS logical properties instead of normal CSS properties. Since we don't support IE11 anymore we can now utilities this CSS functionality.

Describe the solution, feature, or improvement you'd like
I propose to rename our current properties to a new logical property format. For example,

// Old:
<Box paddingLeft="..." />
<Box marginVertical="..." />

// New:
<Box paddingInlineStart="..." />
<Box marginBlock="..." />

This would definitely be a breaking change, but we should tackle this before we get out of "beta".

Additional context
Alongside this, I plan to ship along an eslint rule in bigcommerce/eslint-config to enforce using CSS logical properties both within JSX components and extended styled components.

@chanceaclark chanceaclark added the enhancement New feature or request label May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant