-
Notifications
You must be signed in to change notification settings - Fork 174
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
Space missing after font-size: when not replacing #42
Comments
Pull request submitted. |
This is interesting. Thank you for submitting the issue and the pull request! I'm kinda surprised to see this because it isn't happening in the test example. Could it be the case with another option you are using or the version of PostCSS you are using? |
I’m happy to check that for you. I’ll review tomorrow and share the settings and version. |
Thank you for sharing the test example. I ran some configurations and have found a possible cause. When I add the normalize.css block and have it minified - the rem is formatted improperly. When I remove the normalize.css or uncompress it and run the test again - it formats fine.
So it appears that my pull request is only helpful if adding normalize.css compressed to the file to process. I've tested a few versions of normalize.css compressed with the same result. Perhaps a value is being stored without a space as it processes the normalize.css compressed and then uses that for all? |
After further checking it appears that if the first lines of the css file are compressed (as in the normalize.css) then the issue occurs. If I add anything above the normalize.css that is not compressed and run it - it works fine. So my fix for right now is to just add a few lines of css above the normalize.css block.
|
Thanks for looking into this @jdelia! I'm going to close this for now since it seems PostCSS just uses the first example it sees in a file to know whether to add a space after the semi-colon or not. If any change needs to happen, it seems like it would happen on the PostCSS app rather than this plugin. |
When the option replace: false is used - there is a space missing after the colon.
Suggestion: replace line 32 of index.js with
replace function on line 89 with this:
The text was updated successfully, but these errors were encountered: