I'm trying to create a mixin guard, as seen on http://lesscss.org/features/ , where they do mixin(@a) when (@media = mobile) { ... }
However, when I do mixin() when (@media = mobile) { ... }
or mixin(@a) when (@media = mobile) { ... }
, less is saying it's expecting a )
at @media
's @
sign and that it's expecting an "expression" at the closing )
. Conversely, if I do mixin(@a) when (@a = 5) { ... }
, less is happy.
Why is this, and how can I get @media to work in my mixin's guard?