For some reason any Less I have written inside the @media-common = true media query does not load in IE9. I can't find any specific code to prevent this from rendering out in IE9.
It happens whether it's client-side Less compilation or deployed to a server in production mode with server side compilation.
I've tried clearing the usual directories, clearing caches, running the deploy static content command.
All the CSS updates and loads in IE9 minus any styling within the & when (@media-common = true) {}
mixin.
Example
For example ther following code should render the background to be green as it has important, this works as expected in every browser and device except IE9.When I load the website in IE 9 the background is blue.
//
// Common
// _____________________________________________
& when (@media-common = true) {
body {
background-color: green !important;
}
}
//
// Mobile
// _____________________________________________
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
body {
background-color: red;
}
}
//
// Tablet and above
// _____________________________________________
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
body {
background-color: blue;
}
}
Question
Why is IE9 ignoring any code inside & when (@media-common = true) {}
?
pub/static/frontend/{{vendor}}/{{theme}}/en_US/css/styles-m.css
sheet. you are saying that those styles are not in this sheet in ie9?