modularscale / modularscale-sass

Modular scale calculator built into your Sass
http://www.modularscale.com
MIT License
1.98k stars 132 forks source link

Combine breakpoints with threads #154

Closed koko236 closed 6 years ago

koko236 commented 6 years ago

Is it possible to combine breakpoints and threads? Ie. to have more than one thread defined for common breakpoints. Is so how should we use it?

  1. Is there a convention for defining threads with breakpoints?
  2. Is there a way to specify thread in ms-respond call?
koko236 commented 6 years ago

Ok, for those wondering about this later. You can define whole separate configs, eg. $modular-scale-A,$modular-scale-B and refer to them in ms-respond using third param, eg. ms-respond(font-size, 1, $modular-scale-A);.

scottkellum commented 6 years ago

Did you figure this out @koko236 ? Breakpoints are types of threads so in a sense they are already combined. If you wish to change the thread per breakpoint you will have to specify the Sass map you wish to use as the 3rd argument in the mixin like you stated.

koko236 commented 6 years ago

@scottkellum I think so. For each thread I made a separate config object each with the breakpoints defined and I pass appropriate one as the third parameter to the ms-respond() call. So the breakpoints are defined INSIDE each thread.