css - SCSS: Assigning two values to a variable -
i using this mixin generate media queries. mixin works inserting 2 values (a min width , optional max width):
@include respond-to(300px,500px) { .this-is-not-in-ie-either { color: green; } }
the trouble max/min width values difficult remember. rather insert key word variable.
e.g.
$mob: 0, 480px; $tab: 480px, 940px;
however, scss misunderstands min width being "0, 480px" , max-width being "undefined".
is possible have variable holds 2 values.
i know use 2 key words (e.g. $mob-min, $mob-max), rather use one.
when write this:
$mob: 0, 480px; @include respond-to($mob) { .this-is-not-in-ie-either { color: green; } }
what you're doing passing list first argument mixin:
@include respond-to($mixins-first-arg: (300px,500px)) { .this-is-not-in-ie-either { color: green; } }
what need write this:
@include respond-to($mob...) { .this-is-not-in-ie-either { color: green; } }
Comments
Post a Comment