How to hide a CSS media query from print? "not" logical operator does not work
Media queries grammar is pretty limited to say the least.
But with CSS3 (not CSS2.1) it seems that you can nest @media
rules.
@media not print {
@media (min-width:732px) {
...
}
}
This basically executes as (not print) and (min-width:732px)
.
See https://stackoverflow.com/a/11747166/3291457 for more info.
How about something like this?
body { min-width:732px; }
@media print {
body { min-width:initial; }
}
The min-width will be set to 732 for everything, except print, which will get some other value that you specify. Depending on your situation, you can set a different width, or try something like "thiswontwork" (which sometimes causes the value to be set to the initial value) or "inherit" or something like that.