cssinternet-explorerinternet-explorer-9stylus

Stylus keep "\9" CSS IE9 hack


I'm trying to write an IE9 rule only (width: 40px\9;) in Stylus, but it seems that Stylus keeps removing the \9 part and turns it into a whitespace character instead. I've tried various combinations of \ and /, but to no avail.

For example

width 40px\\9;

compiles to

width: 40px \ 9;

Does anyone know how to make stylus keep the \ as a literal "\" and not turn it into a whitespace?


Solution

  • You need to use unquote:

    width unquote('40px\9')
    

    yields

    width: 40px\9;