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

[system] Change the borderRadius prop to use the theme.shape.borderRadius as a multiplication value #23188

Closed
1 task done
mnajdova opened this issue Oct 21, 2020 · 0 comments · Fixed by #23700
Closed
1 task done
Assignees
Labels
new feature New feature or request package: system Specific to @mui/system

Comments

@mnajdova
Copy link
Member

mnajdova commented Oct 21, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Currently the borderRadius property on the Box component matches the theme.shape values. So for defining a borderRadius, usually we have the following code:

<Box borderRadius="borderRadius" />

The proposal (taken from #23053 (comment)) is to consider the theme.shape.borderRadius as a value used for multiplying the values inside the borderRadius.

Examples 🌈

Here are a few examples of how the new conversion could be used

theme = createMuiTheme({ shape: { borderRadius: 2}});
// ...
<Box borderRadius={1} /> // borderRadius: 2
<Box borderRadius={3} /> // borderRadius: 6
<Box borderRadius={10} /> // borderRadius: 20

Motivation 🔦

With this, we will have a more flexible approach for defining the borderRadius values and it would work consistently with the spacing values already available in the system.

@mnajdova mnajdova added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 21, 2020
@mnajdova mnajdova self-assigned this Oct 21, 2020
@oliviertassinari oliviertassinari added breaking change new feature New feature or request package: system Specific to @mui/system and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer breaking change labels Oct 21, 2020
@mnajdova mnajdova mentioned this issue Oct 21, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants