css - how to define variable in less -
i trying set variables media query breakpoints in less:
my definition looks this:
@sm-screen: "(min-width: @{screen-sm-min}) , (max-width: @{screen-sm-max})";
so when try use following:
@media @sm-screen { .something { display: none; } }
it works ouputs double quotes compiled css ends looking like:
@media "(min-width: 768px) , (max-width: 991px)" { .something { display:none; } }
how define compiled css doesn't have double quotes wrapped round it? tried getting rid of them variable definition less won't compile following error:
parseerror: expected ')' in c:\xampp\htdocs\fund-manager\resources\assets\less\variables.less on line 11, column 14:
i had escape string ~ character so:
@sm-screen: ~"(min-width: @{screen-sm-min}) , (max-width: @{screen-sm-max})";
Comments
Post a Comment