postcss-advanced-variables-mod
Version:
Use Sass-like variables, conditionals, and iterators in CSS
9 lines (7 loc) • 295 B
JavaScript
// tooling
import getReplacedString from './get-replaced-string';
// transform rule nodes
export default function transformRule(rule, opts) {
// update the rule selector with its variables replaced by their corresponding values
rule.selector = getReplacedString(rule.selector, rule, opts);
}