This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function vunit($input, $width, $height){ | |
@if unit($width) != px or unit($height) != px { | |
@error "function vunit() dimensions should contain a px unit. +[" + $width + ", " + $height +"]"; | |
} | |
// Store $input unit | |
$unit: unit($input); | |
// Remove unit from $input and convert to ratio | |
$ratio: $input / ($input * 0 + 1) / 100; | |
// Calc and store return values |