@sass-collective/property
v4.7.0
Published
Generate CSS property with CSS custom properties option.
Downloads
506
Maintainers
Readme
Introduction
Generate CSS property with CSS Custom Properties option.
Installing
npm install @sass-collective/property
Usage
@use "@sass-collective/property";
@use "@sass-collective/property/custom-properties";
:root {
@include property.declaration(custom-properties.create(--foo, darkcyan));
// --foo: darkcyan;
}
.foo {
@include property.declaration(color, custom-properties.create(--foo, darkcyan));
// color: var(--foo, darkcyan);
@include property.declaration(color, custom-properties.create(--foo, custom-properties.create(--bar, darkcyan)));
// color: var(--foo, var(--bar, darkcyan));
}
.bar {
@include property.declaration(color, darkcyan);
// color: darkcyan;
}
API
Sass mixins
| Mixin | Description |
|----------------------------------------------|---------------------------------------------------|
| declaration($property, $value, $important)
| Declare CSS property, with optional !important
. |
Packages
| Package | Description |
|-----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|
| @sass-collective/property/custom-properties
| Declare CSS Custom Properties. |