Skip to content
Snippets Groups Projects
_functions.scss 299 B
Newer Older
  • Learn to ignore specific revisions
  • // Strip the unit from the given value and return the value
    @function strip-unit($value) {
        @return $value / ($value * 0 + 1);
    }
    
    // Return an em unit based on the pixel value and context
    @function rem($px, $context: $base-font-size) {
        @return #{strip-unit($px / strip-unit($context))}rem;
    }