it's a bug is WebStorm, please watch WEB-10540
Is it proper to put spaces around minus sign in Stylus?
题
I have not found this info anywhere and my case is - I use WebStorm as my primary IDE for web projects. When I edit a Stylus file and format it with default WebStorm format tool, it adds spaces after negative value minus sign so this:
.header
background-position 0px -115px
turns into this:
.header
background-position 0px - 115px
And as a result, when Stylus processor runs through this file, it thinks that I want to get a result of (0 - 115)px
as a subtraction, so finally in CSS file it becomes this:
.header
background-position -115px
Which is nor legit as a CSS rule neither correct for my case.
So the question is it correct at all to have a space after a minus sign at all in Stylus or even CSS?
解决方案
不隶属于 StackOverflow