Skip to content

A collection of scss utility functions and mixins

License

Notifications You must be signed in to change notification settings

dreipol/scss-utils

Repository files navigation

Build Status NPM version NPM downloads MIT License

scss-utils

dreipol scss util @functions and @mixins

Documentation

https://www.dreipol.dev/scss-utils/

Usage

Installation

npm i @dreipol/scss-utils -S

Import

These utils are built as sass modules. You can import them in your sass files simply using the @use rule for example:

@use 'node_modules/@dreipol/scss-utils/mixins/has-focus' as *;

a {
    @include has-focus {
        color: red;
    }
}

Notice that you can import all the mixins or functions namespacing them for example:

// all utils
@use 'node_modules/@dreipol/scss-utils' as utils;
// or also only mixins
@use 'node_modules/@dreipol/scss-utils/mixins' as mixins;

a {
    @include utils.has-focus {
        color: red;
    }
}

.hidden {
    @include mixins.hide-visually;
}