less - media query and not -
i have following less code:
@mobile: ~'screen , (max-width: 480px)';
then use follows:
@media @mobile { // code }
it works fine use "not" like:
@media not @mobile { // code }
but error
parseerror: unrecognised input
in "not" part.
is possible solve this?
maybe this:
define width of mobile device:
@mobilewidth: 480px;
then larger non-mobile device:
@notmobilewidth: @mobilewidth + 1px;
create less variables both mobile , notmobile:
@mobile: ~'screen , (max-width: @{mobilewidth})'; @notmobile: ~'screen , (min-width: @{notmobilewidth})';
and use in media queries:
@media @mobile { // mobile code } @media @notmobile { // not-mobile code }
Comments
Post a Comment