I have a situation that would easily be solved if I could write a CSS media query containing a logical OR. Since I can't, I'm looking for the most efficient alternative.
GOALS: 1) Create a minimalist, but responsive, page 2) use HTML & CSS only 3) keep all CSS within the section instead of external files 4) minimize repeated code
@media (orientation: landscape) {...}
@media (orientation: portrait) {...}
@media (width: *tiny screen*) {...}
@media (width: *small screen*) {...}
@media (width: *medium screen*) {...}
@media (width: *large screen*) {...}
The above works well so far, in that any situation should trigger one set of orientation-based rules and one set of size-based rules. The sticking point is that I want "tiny" screens to use the portrait rules even if they are landscape.
@media (orientation: portrait) OR (width: *tiny*) {...}
@media (orientation: landscape) {...}
@media width: *small screen* {...}
@media width: *medium screen* {...}
@media width: *large screen* {...}
Without being able to OR the two conditions in one query, any solution I've come up with requires either repeating the entire set of portrait rules under the "tiny" style OR using external style sheets which I'm trying to avoid.
Anyone have a better idea?