From 22a23118e8dd266b9b0d38f43605ac6db1935783 Mon Sep 17 00:00:00 2001 From: ray Date: Thu, 7 Jan 2021 14:57:05 +0000 Subject: [PATCH] add spacers() function --- functions.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions.js b/functions.js index 92d9d46..a33b182 100644 --- a/functions.js +++ b/functions.js @@ -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;