Files
SiteWebAstrolabe_public/src/scss/_functions.scss

29 lines
675 B
SCSS

@use 'tokens';
@use 'sass:map';
/**
* CUSTOM FUNCTIONS
* Replacement functions for stalfos get-size() and get-color() functions
*/
/**
* Get size from the size scale
* @param {string|number} $size - The size key from the scale
* @return {string} - The size value
*/
@function get-size($size) {
@if $size == 'base' {
@return map.get(tokens.$tokens, 'size-scale', 'base');
}
@return map.get(tokens.$tokens, 'size-scale', $size);
}
/**
* Get color from the color palette
* @param {string} $color - The color key from the palette
* @return {string} - The color value
*/
@function get-color($color) {
@return map.get(tokens.$tokens, 'colors', $color);
}