csstools / postcss-advanced-variables

Use Sass-like variables, conditionals, and iterators in CSS
Creative Commons Zero v1.0 Universal
130 stars 33 forks source link

support variable property names #99

Closed benmusson closed 1 year ago

benmusson commented 1 year ago

Fixes #97. Allows the use of variable in declaration property names.

Example:

$name: custom-property;
$value: black;

.class {
    --$(name): $value;
    color: var(--$(name))
}

results in

.class {
    --custom-property: black;
    color: var(--custom-property)
}
jonathantneal commented 1 year ago

Wow, this looks great. Thanks, @benmusson! Let’s cut a release soon. I wish my PRs automatically ran the tests. Maybe I can ask a robot to write the actions yml file for that. 😂

benmusson commented 1 year ago

I wish my PRs automatically ran the tests

https://github.com/csstools/postcss-advanced-variables/pull/101