-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Adds PostCSS Normalize #5810
Adds PostCSS Normalize #5810
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Hey thanks for your contribution! To clairfy, the usage of this would be opt-in by using the @import as directed in the plugin? |
@ianschmitz Yes, this is opt-in via the |
I'm not sure why one of the test suites failed. I ran them locally using WSL + Node 8.12 and I don't see them failing. |
Is this waiting on me? If it's one of those tests then I'm not sure how to go about fixing them. To me, it seems random and I feel another dummy push may succeed. Please let me know if that's not the case. |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
Anyone? |
I wouldn't like CRA to be injecting any CSS into my application.
|
@yordis How is bringing in reset.css any different? This PR simply gives a choice to choose normalize.css over reset.css. |
@mrchief I didn't say that bringing |
@yordis I understand but that seems to be a different discussion altogether. I assumed, maybe incorrectly, that that was some sort of reasoning to not merge this PR. With all due respect, to me, that discussion should happen in a different thread as I don't want others to turn this PR into a discussion about whether CRA should inject any css or not. |
@mrchief would you mind sharing where in the code CRA uses |
As far as I'm aware, there isn't a reset in CRA. I think using reset/normalise/reboot is great, and encourage it - but we want to leave such decisions in the hands of developers as much as possible. |
I had to dig in a bit but here's the issue that was the inspiration for this PR. It seems there is community interest in bringing in some kind of reset css and postcss-normalize was the most preferable. It's an opt-in behavior and by default, CRA won't bring in anything unless you opt-in to it. Sorry about my previous assumtion about reset being brought in by default - my memory was fuzzy about that. |
As CLI and scripts for helping your development, this feature is out of CRA scope. What if I am using The number of questions and complain about this decision will be endless. Again, people are not being stopped today from adding |
I created this PR based on the interest of the community (myself included). Of all the possible choices, post-css-normalize seemed to be the most favored one due to it's flexibility. (I urge you again to go back to the thread I referenced if you haven't done so).
This helps in development so I don't think that this is out of scope. It is quite painful and bit ugly to bring in your own without CRA inherently supporting it (many don't want to eject nor take over webpacking by themselves). It's all about having sane defaults. Not everyone is as experienced nor they necessarily know about all different options. This helps towards that. Besides, that argument can be applied to any number of things that CRA (or any other CLI script in this world) does, so how this is any different?
If you don't want use normalize.css, then don't opt-in. You can always use your favorite css.
Maybe. Maybe not. This is not a forceful default, nor a mandatory choice so who knows. People are complaining about hooks too, ¯_(ツ)_/¯ ! @Timer @Fabianopb @ianschmitz your thoughts? |
Which community? Maybe because English is my second language I perceived your wording to be entitled to speak for the entire community. People could complain as much as they want, that does not make them right, so what is your point? I can't remember when was the last time I used
Right, that is why this plugin shouldn't be included by default since I would have to opt-out, no opt-in. This conversation will get nowhere, you have personal and subjective opinions about it and I respect that. But please do not speak out for You are right, subjectively speaking; and I am right subjectively speaking. So better to leave this to the Core contributors to decide their best decision about this topic. |
Have you read #2273 at all? Do you not consider them to be part of the community?
There is no opting out. If you don't opt-in, you don't bring in anything (see my earlier comment which clarifies this). I guess that's where your confusion is.
100% agree! |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This pull request has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. Thank you for your contribution! |
@ianschmitz Please take a look. I added it as a separate file since:
That said, I'm open to any suggestions regarding file name, placing etc. Also, please let me know if the content itself needs tweaking. |
Please resolve merge conflicts. |
Thanks! |
This change brings in postcss-normalize as default reset css.
postcss-normalize has 3 options and their default values would suffice for most use cases. The one that users would care for most is the
browsers
options which can be overridden by.browserslistrc
orbrowserslist
setting in pacakge.json, so there is no issue leaving it as empty.The remaining 2 are better left off (default) but I'm not sure if having a way for users to override those default would violate the core ideas. I'm not sure how often they are used so it's kind of hard for me to make a call here. I'd love to hear from the authors and community about this.
Fixes #2273.