-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
Added top, left, right and bottom border color CSS properties to system #27580
Conversation
Details of bundle changes (experimental) @material-ui/system: parsed: +0.87% , gzip: +0.30% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, let’s also add tests that will ensure this new scenario would break again. Also, please revert the changes in the translated md files. Only the changes in borders.md are enough
Sounds good. Where do you recommend I add these tests? I think it'd need to involve some mock rendering. The existing borders.test.js only tests the borderRadius conversion. |
We’ve added the other border tests in https://github.com/mui-org/material-ui/blob/next/packages/material-ui-system/src/Box/Box.test.js I propose we add these there too. |
@mnajdova I've added tests and they've passed, but test_browser-1 is failing on ci/circleci. I just checked some other recent PRs and the same test is failing for those as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍
Related issue
The problem:
@material-ui/system
, values aren't properly applied if theborderColor
prop appears before theborder<Position>
prop.Example:
Existing workarounds:
Changes in the PR:
borderTopColor
,borderRightColor
,borderBottomColor
, andborderLeftColor
CSS properties to@material-ui/system
borders.With this PR, the previous workaround is no longer necessary. Instead, users can specify the exact
border<Position>Color
property, like so: