4.1 #Functions.convert-unit Convert Unit
Convert a unit from one format to another. We use this in the modular-scale mixin so that we can get a fallback pixel value for our rem units.
Parameters:
-
$value
The value to swap unit on. Including the old unit. -
$unit
The new unit that you want to swap to.
Source:
assets/sass/lib/mixins/_functions.scss
, line 20
4.2 #Functions.layer Layer
Get the z-index of the specified layer. This uses the layers map to allow us to more easily manage the different z-indexes used throughout the theme.
Parameters:
-
$name
the name of the layer we want to get the z-index for.
Source:
assets/sass/lib/mixins/_functions.scss
, line 56
4.3 #Functions.strip-unit Strip Unit
Remove units from a value so we can work with the number. We use this in the convert-unit function below.
Parameters:
-
$value
The number to remove the unit from.
Source:
assets/sass/lib/mixins/_functions.scss
, line 1