0

how to use ie 9 hack in less css?

ie 9 hack \0/

compiler error

Following characters are exceptions and not encoded: ,, /, ?, @, &, +, ', ~, ! and $.

how to encode this characters ?

Pranay Soni
  • 1,056
  • 10
  • 18

2 Answers2

1

You cannot... either use Modernizr like @Blender suggested or in your markup append ie9 class using:

<!--[if IE 9]><script>document.documentElement.className += " ie9";</script><![endif]-->

and use ie9 specific rules in LESS:

.ie9 & { /* IE9 rules */ }
Alex M
  • 1,304
  • 1
  • 14
  • 23
0

You can apply some hacks css with this following answer : Writing browser specific hack in Less (for <IE9)

@hack: ~"/*\**/";
#veinte { 
    color@{hack}: blue\9; 
}

Compiled CSS:

#veinte {
    color/*\**/: blue\9;
}
Community
  • 1
  • 1
Ema.H
  • 2,862
  • 3
  • 28
  • 41