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

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -