-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add postcss-pxtorem dependency #4701
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
Conversation
size-limit report
|
ae1bb24 to
8f548b5
Compare
|
👋 It looks like you're updating JavaScript packages that are known You can deduplicate them with the A duplicate React version may cause an invalid hook call warning. React context providers usually use module-scoped globals as their |
|
Here's a diff of the changes to our build file: https://www.diffchecker.com/SUs9t8LC The spaces between |
config/px-to-rem.js
Outdated
| module.exports = { | ||
| rootValue: 10, | ||
| replace: true, | ||
| propList: ['*'], | ||
| selectorBlackList: [], | ||
| }; |
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.
Nice!
c656313 to
ac13e80
Compare
alex-page
left a comment
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.
Nice clean up + functionality
|
Will this convert all eta
I guess that works, but feels a bit "magic" |
|
@aveline it definitely is magic. I hope this feels like autoprefixer. People understand that the output changes but they do not have to write the repetitive code. We also don't need to support a public function. If we can be more opinionated by whitelisting the properties I would be happy to do that. |
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.
Haven't validated the diff output on account of all the whitespace changing but code changes seem reasonable.
It miiiiight be worth splitting out the postcss updates into a separate PR so then it's easier to see "what has changed by adding pxtorem" rather than 100% of the diff being those whitespace differences from the postcss update drowning out any changes as a result of pxtorem. But if you're confident in output then whatever
|
As per Ben's suggestion here's the diff that omits the spacing change https://www.diffchecker.com/GT3piigi I've looked through it and it's mostly changes to borders, border radii, outlines, visually hidden and a few spacing tokens. I've tophatted things that had potential to look different and all seems good |
WHY are these changes introduced?
First part of #4605
Diff check between previous css build (spacing changes are expected)
This will introduce pxtorem to main. Then we can remove
rem()from our public api in v8WHAT is this pull request doing?
Adds pxtorem to our postcss config
How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
Copy-paste this code in
playground/Playground.tsx:🎩 checklist
README.mdwith documentation changes