// Strip the number of its pixel value (eg. '10px' becomes '10')@functionstrip-unit($value){@return$value/($value*0+1);}// eg. @include fluid-type(font-size, 320px, 1366px, 18px, 26px);@mixin fluid-type($properties,$min-vw,$max-vw,$min-value,$max-value){@each$propertyin$properties{#{$property}:$min-value;}@mediascreenand(min-width:$min-vw){@each$propertyin$properties{#{$property}:calc(#{$min-value}+#{strip-unit($max-value-$min-value)}*(100vw-#{$min-vw})/#{strip-unit($max-vw-$min-vw)});}}@mediascreenand(min-width:$max-vw){@each$propertyin$properties{#{$property}:$max-value;}}}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.