Commit d9e66ffc authored by Nicolas Lenz's avatar Nicolas Lenz

Refactor _colors.sass.

parent 7161b6dc
@import palette
// Calc color by base color name and level.
@function get-color($name, $level)
$color: map-get($palette, $name)
$mix-color: if($level < 0, black, white)
......@@ -13,6 +14,7 @@
@return $color
// Add foreground and background classes for all colors.
@each $color-name in map-keys($palette)
@for $i from -5 through 5
.bg-#{$color-name}-#{map-get($shade-names, $i)}
......@@ -20,11 +22,10 @@
.fg-#{$color-name}-#{map-get($shade-names, $i)}
color: get-color($color-name, $i)
.bg-black
background-color: black
.bg-white
background-color: white
.fg-black
color: black
.fg-white
color: white
// Add black and white.
@each $color in black, white
.bg-#{$color}
background-color: $color
.fg-#{$color}
color: $color
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment