-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Unify getCss and expandResponsive #6335
Unify getCss and expandResponsive #6335
Conversation
🦋 Changeset detectedLatest commit: ccd92b4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ccd92b4:
|
This pull request introduces 2 alerts and fixes 1 when merging 25451f4 into 19e1532 - view on LGTM.com new alerts:
fixed alerts:
|
"color", | ||
"height", | ||
"paddingInlineStart", | ||
"paddingInlineEnd", | ||
"paddingTop", | ||
"paddingBottom", | ||
"@media screen and (min-width: 40em)", | ||
"@media screen and (min-width: 52em)", |
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.
The results of css()
are as follows.
There are some differences, but I think the behavior will not change.
Before
{
flexDirection: 'column',
justifyContent: null,
'@media screen and (min-width: 40em)': {
justifyContent: 'flex-start',
paddingInlineStart: 'var(--space-3)',
paddingInlineEnd: 'var(--space-3)'
},
'@media screen and (min-width: 52em)': {
justifyContent: 'flex-end',
paddingInlineStart: 'var(--space-4)',
paddingInlineEnd: 'var(--space-4)'
},
color: 'background',
height: '100%',
paddingInlineStart: 'var(--space-2)',
paddingInlineEnd: 'var(--space-2)',
paddingTop: 'var(--space-4)',
paddingBottom: 'var(--space-4)'
}
After
{
flexDirection: 'column',
color: 'background',
height: '100%',
paddingInlineStart: 'var(--space-2)',
paddingInlineEnd: 'var(--space-2)',
paddingTop: 'var(--space-4)',
paddingBottom: 'var(--space-4)',
'@media screen and (min-width: 40em)': {
justifyContent: 'flex-start',
paddingInlineStart: 'var(--space-3)',
paddingInlineEnd: 'var(--space-3)'
},
'@media screen and (min-width: 52em)': {
justifyContent: 'flex-end',
paddingInlineStart: 'var(--space-4)',
paddingInlineEnd: 'var(--space-4)'
}
}
25451f4
to
1900f17
Compare
This pull request fixes 1 alert when merging 1900f17 into 19e1532 - view on LGTM.com fixed alerts:
|
1900f17
to
046f493
Compare
046f493
to
7c38c16
Compare
This pull request fixes 1 alert when merging 7c38c16 into 19e1532 - view on LGTM.com fixed alerts:
|
7c38c16
to
e2231e0
Compare
This pull request fixes 1 alert when merging e2231e0 into 19e1532 - view on LGTM.com fixed alerts:
|
e2231e0
to
85277e2
Compare
This pull request fixes 1 alert when merging 85277e2 into 19e1532 - view on LGTM.com fixed alerts:
|
Great work here @itkrt2y. Can we include a perf track tool in this PR to visualize the perf gains? Let's use a tool like https://www.npmjs.com/package/cronometro to measure it. |
I tried to introduce cronometro in 11528a9 . (I used node/undici as a reference code) Benchmark resultBefore (main branch)
After (this PR)
|
@itkrt2y, that's exactly what I have in mind as well. Thanks for adding that. I'll review the code shortly and leave any comments. |
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 good to me. Love the extra comments you've added
📝 Description
Both
getCss
andexpandResponsive
recursively iteratestyles
.I fixed not to loop style processing twice for performance.
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information