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] Add support for marginX, marginY, paddingX, and paddingY #16169

Merged
merged 6 commits into from
Jun 19, 2019

Conversation

dimitropoulos
Copy link
Member

I strongly prefer not using the "single letter" shorthand for clarity's sake. That said.. I do really like the mx, my, px, py concepts. I tried to change as little as possible to accomplish this. Thoughts?

@mui-pr-bot
Copy link

mui-pr-bot commented Jun 12, 2019

Details of bundle changes.

Comparing: 98292b4...55192bc

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core +0.04% 🔺 +0.06% 🔺 318,737 318,854 87,520 87,571
@material-ui/core/Paper 0.00% 0.00% 68,280 68,280 20,356 20,356
@material-ui/core/Paper.esm 0.00% 0.00% 61,577 61,577 19,136 19,136
@material-ui/core/Popper 0.00% 0.00% 28,945 28,945 10,405 10,405
@material-ui/core/Textarea 0.00% 0.00% 5,513 5,513 2,373 2,373
@material-ui/core/TrapFocus 0.00% 0.00% 3,755 3,755 1,580 1,580
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,012 16,012 5,794 5,794
@material-ui/core/useMediaQuery 0.00% 0.00% 2,597 2,597 1,103 1,103
@material-ui/lab 0.00% 0.00% 140,015 140,015 43,325 43,325
@material-ui/styles 0.00% 0.00% 51,703 51,703 15,342 15,342
@material-ui/system +0.76% 🔺 +1.22% 🔺 15,303 15,420 4,339 4,392
Button 0.00% 0.00% 84,278 84,278 25,631 25,631
Modal 0.00% 0.00% 20,330 20,330 6,664 6,664
Slider 0.00% 0.00% 74,703 74,703 23,219 23,219
colorManipulator 0.00% 0.00% 3,904 3,904 1,544 1,544
docs.landing 0.00% 0.00% 55,232 55,232 13,946 13,946
docs.main 0.00% 0.00% 650,902 650,902 205,053 205,053
packages/material-ui/build/umd/material-ui.production.min.js +0.04% 🔺 +0.06% 🔺 292,060 292,180 83,522 83,573

Generated by 🚫 dangerJS against 55192bc

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The switch statement you introduce needs a no-op default case. I'm not a fan of aliases though I'm not a fan of the whole API any. @oliviertassinari should make the call here.

@dimitropoulos
Copy link
Member Author

@eps1lon I agree... if you would like me to make a PR to undo the shorthand syntax (the 2 letter one) I'd be more than happy! :)

@oliviertassinari oliviertassinari changed the title [system] adds support for marginX, marginY, paddingX, and paddingY [system] Add support for marginX, marginY, paddingX, and paddingY Jun 13, 2019
@oliviertassinari oliviertassinari added the package: system Specific to @mui/system label Jun 13, 2019
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea for consistency with the mx, my, px, py props. I think that we can move forward. We need to update the tests, the documentation. Regarding the implementation, we can probably improve it.

@oliviertassinari oliviertassinari added the new feature New feature or request label Jun 15, 2019
@oliviertassinari
Copy link
Member

@dimitropoulos I have tried the following 9456f78 (12 insertions(+), 21 deletions(-)) what do you think about it?

@eps1lon eps1lon merged commit 4e9fff3 into mui:master Jun 19, 2019
@eps1lon
Copy link
Member

eps1lon commented Jun 19, 2019

@dimitropoulos It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!

@dimitropoulos dimitropoulos deleted the marginXYpaddingXY branch June 19, 2019 20:53
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 this pull request may close these issues.

5 participants