summaryrefslogtreecommitdiffstats
path: root/src/_functions.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/_functions.scss')
-rw-r--r--src/_functions.scss12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/_functions.scss b/src/_functions.scss
index 0c04f1d..d615614 100644
--- a/src/_functions.scss
+++ b/src/_functions.scss
@@ -135,6 +135,18 @@
135 @return $palette; 135 @return $palette;
136} 136}
137 137
138@function transparent-palette($color, $text, $alphas) {
139 $palette: (
140 --text: $text,
141 );
142
143 @each $key, $alpha in $alphas {
144 $palette: map.set($palette, $key, rgba($color, $alpha));
145 }
146
147 @return $palette;
148}
149
138@function px-to-em($size, $base: iro.$vars-root-size) { 150@function px-to-em($size, $base: iro.$vars-root-size) {
139 @return math.div($size, $base) * 1em; 151 @return math.div($size, $base) * 1em;
140} 152}