dreipol scss util @functions and @mixins
https://www.dreipol.dev/scss-utils/
npm i @dreipol/scss-utils -S
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;
}