Collection of useful sass mixins, functions etc.
Using yarn
:
$ yarn add https://github.com/mandalornl/sass-libs.git
Or using npm
:
$ npm install --save https://github.com/mandalornl/sass-libs.git
Just import the scss
file(s) you wan't to use. ~
refers to the node_modules
map. Note: Don't append ~
with a /
.
@import '~sass-libs/src/functions/param';
@import '~sass-libs/src/functions/rem-calc';
@import '~sass-libs/src/functions/strip-unit';
@import '~sass-libs/src/mixins/fluidify';
Get param
from collection
. Uses default
when not found.
$param: param($name, $collection, $default: false);
Strip unit
from value.
$unit-less: strip-unit($input);
Convert one or more pixel
values to rem
using a base reference e.g. 14px.
$rem-calc-base: 14px !default;
$rem: rem-calc($values);
Dependencies:
- strip-unit
Fluidifies a property, useful for responsive design.
@include fluidify($property, $params: ());
Dependencies:
- param
- strip-unit
Add an icon.
@include icomoon($fontCode);
Creates an animated loader, with default 1 sec
delay.
@include loading($params: ());
Dependencies:
- param