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
[normalize-whitespace]: removal of whitespace in at-rule and params #921
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #921 +/- ##
==========================================
+ Coverage 97.26% 97.27% +0.01%
==========================================
Files 119 119
Lines 3477 3492 +15
Branches 1047 1050 +3
==========================================
+ Hits 3382 3397 +15
Misses 87 87
Partials 8 8
Continue to review full report at Codecov.
|
@media () => @media() -> need test on IE |
ok changed the PR description,
yes invalid, I removed it from the PR description, I couldn't find any example in the spec, but postcss should throw parsing error right if this is an invalid syntax ?
I think the current regex will only convert multiple spaces to a single one. I think it is safe, it won't do any changes to the newlines, neither to tabs |
If it is invalid syntax - yes, but I am not usre we need read spec |
I am afraid about |
We can use |
the spec says,
so I suppose there can be nested at-rules, but no atules in
yea it does, though I will check it if it is better to use this or the regex. |
@evilebottnawi I think there is some issue if we go with AST. @media screen and ( max-width: 500px) {
} this is the tree
it would be unsafe to remove all the space. we can remove the whitespace inside of the function i.e inside of the parens |
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.
Can you test this compression on IE8/IE10/IE11, need to investigate
I am afraid |
I have added test for ie11. should we still support ie10, 8? |
opz, might have forgot to add |
I mean we should test it manually #921 (comment) 😄 |
I dont have ie in my machine. I think we can add a check using browserlist + caniuse-lite. It would be a breaking change then. |
@anikethsaha I think it is time to learn virtual box 😄 I'm not sure if this does not work, maybe everything is fine, just need test |
I have some bad experience with Virtual box earlier, I do have it installed and my config for that is messed up. I will try to look for some online VM to test them. |
ref #428
Some of the transforms