Reputation: 315
I'm having some issues escaping a backslash in LESS. Here's my code:
/* Internet Explorer 9-10 */
@media screen and (min-width: 0\0) {
}
Any suggestion would be greatly appreciated.
Many Thanks.
Upvotes: 3
Views: 465
Reputation: 4924
@min-width: ~"screen and (min-width: 0\0)";
@media @min-width {
.box {
width: 100%;
}
}
Which outputs to:
@media screen and (min-width: 0\0) {
.box {
width: 100%;
}
}
EDIT
To escape a string use '~', like so:
@media screen and (min-width: ~"0\0") {
.box {
width: 100%;
}
}
Upvotes: 2
Reputation: 128791
String Functions
e
CSS escaping, replaced with
~"value"
syntax.It expects string as a parameter and return its content as is, but without quotes. It can be used to output CSS value which is either not valid CSS syntax, or uses proprietary syntax which Less doesn't recognize.
This can be used as follows:
@media screen and (min-width: ~'0\0') { ... }
This can also be called as a function (using e(...)
, which isn't mentioned in the docs):
@media screen and (min-width: e('0\0')) { ... }
Upvotes: 2