-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Enable responsive syntax for all of <Box>'s style props
#10890
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
Enable responsive syntax for all of <Box>'s style props
#10890
Conversation
<Box>'s style props
452ee6c to
b6c8d1b
Compare
e777305 to
acb1bcc
Compare
| @include responsive-props('box', 'background', 'background-color'); | ||
| @include responsive-props('box', 'border-block-end-width', 'border-block-end-width', ('xs': 0)); | ||
| @include responsive-props('box', 'border-block-start-width', 'border-block-start-width', ('xs': 0)); | ||
| @include responsive-props('box', 'border-color', 'border-color'); | ||
| @include responsive-props('box', 'border-end-end-radius', 'border-end-end-radius'); | ||
| @include responsive-props('box', 'border-end-start-radius', 'border-end-start-radius'); | ||
| @include responsive-props('box', 'border-inline-end-width', 'border-inline-end-width', ('xs': 0)); | ||
| @include responsive-props('box', 'border-inline-start-width', 'border-inline-start-width', ('xs': 0)); | ||
| @include responsive-props('box', 'border-start-end-radius', 'border-start-end-radius'); | ||
| @include responsive-props('box', 'border-start-start-radius', 'border-start-start-radius'); | ||
| @include responsive-props('box', 'border-style', 'border-style'); | ||
| @include responsive-props('box', 'color', 'color'); | ||
| @include responsive-props('box', 'inset-block-end', 'inset-block-end'); | ||
| @include responsive-props('box', 'inset-block-start', 'inset-block-start'); | ||
| @include responsive-props('box', 'inset-inline-end', 'inset-inline-end'); | ||
| @include responsive-props('box', 'inset-inline-start', 'inset-inline-start'); | ||
| @include responsive-props('box', 'max-width', 'max-width'); | ||
| @include responsive-props('box', 'min-height', 'min-height'); | ||
| @include responsive-props('box', 'min-width', 'min-width'); | ||
| @include responsive-props('box', 'outline-color', 'outline-color'); | ||
| @include responsive-props('box', 'outline-style', 'outline-style'); | ||
| @include responsive-props('box', 'outline-width', 'outline-width'); | ||
| @include responsive-props('box', 'overflow-x', 'overflow-x'); | ||
| @include responsive-props('box', 'overflow-y', 'overflow-y'); |
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.
I'm all for this update! Might be a good opportunity to revisit my comment on the original implementation. Thoughts?
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.
Oooh, yes, love it! Let's get that into a fast-follow PR 👍
There's also an opportunity to optimize it even further by not even outputting a media query if that value is just going to fallback to an earlier breakpoint's value anyway.
9ede084 to
aa81906
Compare
acb1bcc to
3cbf209
Compare
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.
Looks great overall! 💯
Noticing some regressions with text when running locally though where the color isn't being set properly. That might be what's causing the large amount of baseline changes that need to be accepted for Storybook.
aa81906 to
89610fb
Compare
3cbf209 to
e274a87
Compare
|
@laurkim Good catch! I realised it was to do with Will watch to see if Chromatic shows fewer changes now 🤞 EDIT: Yep, that worked 🎉 The "19 changes" showing at the moment are from the base branch. See more details here. |
89610fb to
d690c14
Compare
e274a87 to
551e9c5
Compare
d690c14 to
8eac426
Compare
551e9c5 to
68a3864
Compare
8eac426 to
c1edb9f
Compare
68a3864 to
731328a
Compare
|
Hi! We noticed there hasn’t been activity on this PR in a while. After 30 days, it will close automatically. If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed. |
c1edb9f to
f548035
Compare
731328a to
f3a65b2
Compare
| responsiveProp: ResponsiveProp<Input> | undefined, | ||
| fn: (value?: Input) => Output | undefined, | ||
| ): ResponsiveProp<Output> | undefined { | ||
| /* |
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.
Do we need the commented out code on lines 177-182 and 219-227?
Depends on #10489
This PR:
<Box>'s style propsuseBreakpointsinternally (see [WIP] Remove usage of useBreakpoints from <Banner> #10891)