mirror of https://github.com/twbs/bootstrap.git
18 lines
380 B
SCSS
18 lines
380 B
SCSS
//
|
|
// Functions
|
|
//
|
|
|
|
|
|
// Remove the unit of a length
|
|
// Source: https://css-tricks.com/snippets/sass/strip-unit-function/
|
|
//
|
|
// @param {Number} $number - Number to remove unit from
|
|
// @return {Number} - Unitless number
|
|
|
|
@function strip-unit($number) {
|
|
@if type-of($number) == 'number' and not unitless($number) {
|
|
@return $number / ($number * 0 + 1);
|
|
}
|
|
@return $number;
|
|
}
|