feat: move color variables to global data
This commit is contained in:
parent
f9926b3bac
commit
23c9baad10
7 changed files with 57 additions and 107 deletions
13
src/_includes/css/colorVariables.njk
Normal file
13
src/_includes/css/colorVariables.njk
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% set allColors = colors | entries %}
|
||||
|
||||
html {
|
||||
{% for color in allColors %}
|
||||
{% set colorName = color | first %}
|
||||
{% set colorRanges = color | last | entries %}
|
||||
{% for colorValue in colorRanges %}
|
||||
{% set value = colorValue | first %}
|
||||
{% set hex = colorValue | last %}
|
||||
--color-{{ colorName }}-{{ value }}: {{ hex }};
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue