Timestretch Timestretch -5 years ago 199
Sass (Sass) Question

Stop SASS from compiling out trailing spaces in CSS

I am trying to target IE 8 & 9 via a browser specific CSS hack as demonstrated here. However, I am using SASS, (in particular, the WebCompiler Visual Studio extension), and it compiles out the trailing spaces before the semicolon.

.class{ display: none \ ;}


.class { display: none \;}

and breaks the hack. Is there any way to work around this?

Answer Source

If you need a space you can concatenate an empty string.


.class{ display: none \ +'';}


.class {
  display: none \ ;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download