modularscale/modularscale-sass

Implement a way to disable viewport-based typography in version 3 ($ms-fluid: false)

Opened this issue · 1 comments

This is a request for the return of an old feature, in version 2 you could use $ms-fluid: false to disable viewport-based typography. I'd like to retain multiple ratios for each breakpoint, without the resizing between.

This achieves the desired result, but it implies lots of repetition:

$small: 30rem;
$large: 90rem;

$modularscale: (
  base: 1rem,
  small: (
    ratio: 1.2
  ),
  large: (
    ratio: 2
  )
);

h1 {
  font-size: ms(3, $thread: small);
  @media all and (min-width: $large) {
    font-size: ms(3, $thread: large);
  }
}

Maybe if the $ms-fluid can't be re-implemented I can make a new ms-respond-stepped() mixin that implements the above. Should I implement it for myself? Is it some feature you'd like to implement (I can do it and do a PR too if you'd like).

Thanks @DamianPereira I think this is a good addition and glad you found this feature useful. I expected people would switch to the workaround you posted but I’ll look into bringing back $ms-fluid