I am experimenting with LESS (not a fan of SASS syntax) and trying to figure out what is the best way to do media queries with it.
I read this blog post on how to โmakeโ media queries with LESS, but it indicates that this causes all media queries to be split and scattered throughout all the CSS received. This does not bother me (I could not worry about the results, and worked more about it). What bothered me was a comment that talked about problems when viewing from iOS devices, and the commentator found that after combining media queries the problem was resolved.
Has anyone found a good solution for using media queries with LESS?
The way I think this work will be something like ...
//Have an overall structure... .overall(){ //Have ALL your CSS that would be modified by media queries and heavily use //variables that are set inside of each media queries. } @media only screen and (min-width: 1024px){ //Define variables for this media query (widths/etc) .overall }
I understand that there may be some problems with this, but the current setup does not seem useful.
So, I think my question is, were there any good solutions / hacks to allow group media queries?
(Just, if that matters, I use it aimlessly as a mechanism to parse my .less files)
css less media-queries dotless
Jared Nov 21 2018-12-12T00: 00Z
source share