You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the bug was first introduced in version 1.13.0. Version 1.12.1 looks like it is working well - no spaces after , but version 1.13.0 starts adding spaces.
Problem in postcss-values-parser, package doesn't respect url spec and parse this as function with arguments, no ideas how it can be fixed, because in scss/less it can be argument, need more difficult logic in parser
I'm going to see if I can fix this today. I'm thinking maybe just add a special case to avoid parsing the arguments to the url function?
It may be better even to enforce always having URL quotes, as a style decision. I understand that it's regular CSS syntax but in my opinion, it's weird syntax.
Digging into this further, the issue is postcss-values-parser is parsing the URL into separate functional groups, when really it should just leave the URL value alone.
Activity
[-]CSS adds space/line breaks in @import url[/-][+]CSS adds spaces/line breaks in @import url[/+]kraklin commentedon Sep 6, 2018
It looks like the bug was first introduced in version
1.13.0. Version1.12.1looks like it is working well - no spaces after,but version1.13.0starts adding spaces.alexander-akait commentedon Nov 14, 2018
Problem in
postcss-values-parser, package doesn't respecturlspec and parse this as function with arguments, no ideas how it can be fixed, because inscss/lessit can be argument, need more difficult logic in parsercrcarlo commentedon Feb 26, 2019
I'm facing the same problem and the only way I could work around this issue is to wrap URLs in quotes.
but still, as stated here this is regular CSS syntax and should therefore be supported
sebastianhaberey commentedon Apr 22, 2019
+1 stumbled across this today. Thanks @crcarlo for your workaround.
sgehrman commentedon May 26, 2019
Hit this today too. will add quotes.
rhernandog commentedon Jun 12, 2019
Indeed keeps happening up to know
robert-j-webb commentedon May 24, 2020
I'm going to see if I can fix this today. I'm thinking maybe just add a special case to avoid parsing the arguments to the url function?
It may be better even to enforce always having URL quotes, as a style decision. I understand that it's regular CSS syntax but in my opinion, it's weird syntax.
robert-j-webb commentedon May 24, 2020
No longer seeing this happening on master. We can close this out.
Test to confirm issue prettier#5014
robert-j-webb commentedon May 24, 2020
Ach nevermind this is still happening, I was checking incorrectly.
robert-j-webb commentedon May 24, 2020
Digging into this further, the issue is postcss-values-parser is parsing the URL into separate functional groups, when really it should just leave the URL value alone.
robert-j-webb commentedon May 24, 2020
I created an issue for this in post-css-values parser. shellscape/postcss-values-parser#117
However it may be better to fix it here. I found this issue only in loose mode, which is somewhat WAI
robert-j-webb commentedon May 24, 2020
I can't distinguish between:
url(fbglyph:cross-outline , fig-white);andurl(url.com/Prettier+Sans&size=500,400,300,1000,600);But this is quite an improvement, considering the URL mangling bug does cause prettier to break sass, sending out a PR now.
Fixes prettier#5014 by avoiding adding whitespace and line breaks to …
Fixes prettier#5014 by avoiding adding whitespace and line breaks to …
Fixes prettier#5014 by avoiding adding whitespace and line breaks to …
Fixes prettier#5014 by avoiding adding whitespace and line breaks to …