Skip to content

@clayui/css Allow passing in CSS Custom Properties to clay-css mixin #4252

Closed
@pat270

Description

This has been in the back of my mind, but I haven't implemented since we had no use for them. With the issues coming up with Dialect, I think it would be a good time to add this feature. This would look like:

$btn-primary: (
    --btn-primary-background-color: blue,
    focus: (
        --btn-primary-focus-background-color: darkblue,
    ),
);

.btn-primary {
    @include clay-css($btn-primary);
}

It would output:

.btn-primary {
    --btn-primary-background-color: blue;
}

.btn-primary:focus {
    --btn-primary-focus-background-color: darkblue;
}

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions