Utilities
Install
npm install @unsass/utilities
Usage
@use "@unsass/utilities";
API
Sass mixins
Mixin | Description |
---|
ellipsis | Sets the ellipsis rules. |
font-smoothing | Sets the font smoothing rules. |
Ellipsis rule with utilities.ellipsis()
The following Sass...
@use "@unsass/utilities";
.foo {
@include utilities.ellipsis;
}
...will produce the following CSS...
.foo {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
Ellipsis rule with utilities.font-smoothing()
The following Sass...
@use "@unsass/utilities";
.foo {
@include utilities.font-smoothing;
}
...will produce the following CSS...
.foo {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
Sass functions
Function | Description |
---|
string-replace($string, $search, $replace) | Return value without the unit. |
strip-unit($value) | Return value with replacement option. |
Components
Component | Description | Sass @use prefix |
---|
string | Utilities functions for string. | utilities.string-* |
strip | Utilities functions for strip. | utilities.strip-* |