In the CSS for the application I'm working on, I need to include some style specifically for IE8. The style code is written in several LESS files, and then compiled either using CodeKit or from the LESS application on Mac OS X into one CSS file, which we use for the real application.
This is the CSS code that I want to use in my LESS file:
@media \0screen {
.thumbnail div img {
width: 58px;
}
}
However, LESS does not accept \0screenas valid code, and both CodeKit and the LESS application return an error when trying to compile our LESS files with this code.
I know that we could use conditional comments and an alternative CSS file for IE8, but since the corrections required at the moment are only a few lines, I would very much prefer to use the request @mediaand save the compiled CSS into one file.
The LESS website has a short chapter on escaping code with ~"", but it seems to only apply to values.
The request code and CSS works fine for IE8 if I put it directly in a compiled CSS file, but obviously I don't want to add compiled CSS after each compilation.
Is there any other way to avoid this request in LESS?
source
share