mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2024-11-26 01:28:15 -05:00
18 lines
330 B
SCSS
18 lines
330 B
SCSS
|
@charset "UTF-8";
|
||
|
|
||
|
/// Strips the unit from a number.
|
||
|
///
|
||
|
/// @param {Number (With Unit)} $value
|
||
|
///
|
||
|
/// @example scss - Usage
|
||
|
/// $dimension: strip-units(10em);
|
||
|
///
|
||
|
/// @example css - CSS Output
|
||
|
/// $dimension: 10;
|
||
|
///
|
||
|
/// @return {Number (Unitless)}
|
||
|
|
||
|
@function strip-units($value) {
|
||
|
@return ($value / ($value * 0 + 1));
|
||
|
}
|