Watch1k
2/3/2017 - 12:17 PM

css-lock

css-lock

@mixin css-lock($min-size: 12, $max-size: 20, $min-width: 320, $max-width: 1440, $property: font-size, $unit: px)
  #{$property}: calc(#{$min-size}#{$unit} + (#{$max-size} - #{$min-size}) * ((100vw - #{$min-width}#{$unit}) / (#{$max-width} - #{$min-width})))
  @media (max-width: #{$min-width}#{$unit})
    #{$property}: #{$min-size}#{$unit}
  @media (min-width: #{$max-width}#{$unit})
    #{$property}: #{$max-size}#{$unit}