Lightweight CSS Framework for Building Apps and Websites https://crispy-css.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
481 B

/**
* functions to convert px to em and rem
*
*
* @author Björn Hase
*
*/
$base__font-size: 16px !default;
/**
* calculate pixel value to em
*
* @param {px} $fontSize
* @return {em}
*/
@function pxToEm($font-size) {
@return ($font-size / $base__font-size) * 1em;
}
/**
* calculate px value to rem
*
* @param {px} $fonz-size
* @param {px} $font-size
* @return {em}
*/
@function pxToRem($font-size) {
@return ($font-size / $base__font-size) * 1rem;
}