If a developer wants to use Custom Properties with this plugin, could this plugin lookup the variables for them? Even if it’s just on :root?
Currently, this plugin relies on PostCSS Custom Properties to remove var() usage, but 1. that’s not very future-leaning, and 2. the new major release of PostCSS Custom Properties preserves var() usage by default.
:root {
--brand: #00bdbd;
--dark-brand: color(var(--brand) shade(20%));
}
becomes
:root {
--brand: #00bdbd;
--dark-brand: color(var(--brand) shade(20%));
}
Unfortunately, it seems this plugin was never tested against Custom Properties with the preserve option enabled.
postcss/postcss-custom-properties#99
postcss/postcss-custom-properties#98
If a developer wants to use Custom Properties with this plugin, could this plugin lookup the variables for them? Even if it’s just on
:root?Currently, this plugin relies on PostCSS Custom Properties to remove
var()usage, but 1. that’s not very future-leaning, and 2. the new major release of PostCSS Custom Properties preservesvar()usage by default.becomes
Unfortunately, it seems this plugin was never tested against Custom Properties with the
preserveoption enabled.postcss/postcss-custom-properties#99
postcss/postcss-custom-properties#98