add spacers() function

This commit is contained in:
Ray Elliott 2021-01-07 14:57:05 +00:00
parent 1133e71b16
commit 22a23118e8
1 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,9 @@ const postcssFunctions = {
const lightness = `var(${name}__l)`;
return `hsla(${hue}, ${saturation}, ${lightness}, ${alpha})`;
},
spacers(number = 1) {
return `calc(var(--spacer-height, 1.5rem) * ${number})`;
},
};
module.exports = postcssFunctions;