-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
Hi,
I think there's a problem with Less.js parsing the "filter:" property for < IE8.
I've translated some rgba() for IE via: http://kimili.com/journal/rgba-hsla-css-generator-for-internet-explorer
The output it provides is valid IE css and "filter:" works in IE7 to create a transparent background:
.test {
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#0F000000,endColorstr=#0F000000)"; /* IE8 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0F000000,endColorstr=#0F000000); /* IE6 & 7 */
background: transparent;
zoom: 1;
}
("background:" and "zoom:" are necessary for IE, but not related to this ParseError.)
The problem is, this syntax throws a "ParseError: SyntaxError" on line three.
If I add quote marks around "progid: ...", Less.js doesn't throw that ParseError, but that's not valid syntax for IE7 and the transparency isn't applied.
Clarification:
- Valid CSS Syntax = Does work in IE7 = Less.js ParseError:
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0F000000,endColorstr=#0F000000); /* IE6 & 7 */ - Invalid CSS Syntax = Doesn't work in IE7 = NO Less.js ParseError:
filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#0F000000,endColorstr=#0F000000)"; /* IE6 & 7 */
Test in IE7: http://jsfiddle.net/ar_fiddles/ArQeZ/
Interestingly enough, this mixin gets it right and avoids the ParseError: #274
I'm using Less.app 2.7 (959), which uses Less.js 1.3.0.
Thanks!
a.