const postcssFunctions = { // takes the custom property defined by a color defining mixin, along // with an alpha value and returns the derived css hsla() function. alpha(name, alpha) { const hue = `var(${name}__h)`; const saturation = `var(${name}__s)`; const lightness = `var(${name}__l)`; return `hsla(${hue}, ${saturation}, ${lightness}, ${alpha})`; }, spacer(number = 1) { return `calc(var(--spacer-height, 1.5rem) * ${number})`; }, }; module.exports = postcssFunctions;