forked from AstrolabeCAE/SiteWebAstrolabe_public
Remove stalfos lib - with regression on some UI elements
This commit is contained in:
25
src/scss/_functions.scss
Normal file
25
src/scss/_functions.scss
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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, 'size-scale', 'base');
|
||||
}
|
||||
@return map-get($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, 'colors', $color);
|
||||
}
|
||||
Reference in New Issue
Block a user