Pranay Soni
Pranay Soni

Reputation: 1066

How to apply IE Fixes for LESS CSS

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 ?

Upvotes: 0

Views: 154

Answers (2)

Ema.H
Ema.H

Reputation: 2878

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;
}

Upvotes: 0

Alex M
Alex M

Reputation: 1304

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 */ }

Upvotes: 1

Related Questions