Bug - Format this file strips spaces in background declaration

I wanted to report a bug when using the Format this file button on a css file in my project.

I used CSS background shorthand syntax for an image in my CSS file. When I pressed the “Format this file” button, it stripped the spaces. I have to manually add them back in so my beautiful image can be seen. :slight_smile:

In a font declaration in the same file, the spaces were still there after pressing “Format this file”. I would expect the spaces in the background shorthand syntax to not be affected also.

I attached a screenshot of what it looked like after I formatted the file. Thanks for making such a great product and taking a look at this little bug :bug:!


You should probably report this bug to Prettier, the software Glitch uses for this.


Hi @RiversideRocks, thanks for answering. It is now an open GitHub issue. :slight_smile:

:wave: Prettier’s maintainer here.

As I wrote in the issue, it’s not clear what version of Prettier Glitch uses. I’ve tested the code from the report with different versions and haven’t been able to reproduce the problem. Is this a custom fork?

Anyway, I’d recommend to the Glitch team to update Prettier to get all the latest goodness. :slight_smile:


I can’t say for certain what type of prettier they use. I just know that they use the default settings.
I can give the staff a ping! @glitch_support