Init CSS variables

This commit is contained in:
Jeremy Thomas
2019-09-20 11:40:21 +01:00
parent d4b86bb4d5
commit 4be21d8b75
6 changed files with 193 additions and 2 deletions

View File

@@ -65,3 +65,20 @@
@return rgba(#000, 0.7)
@else
@return #fff
@function findLightColor($color)
@if type-of($color) == 'color'
@return change-color($color, $lightness: 96%)
@return $background
@function findDarkColor($color)
@if type-of($color) == 'color'
@return change-color($color, $lightness: 29%)
@return $text-strong
@function getCssVariable($color, $name)
$hue: hue($color)
$saturation: saturation($color)
$lightness: lightness($color)
$alpha: alpha($color)
@return $hue, $saturation, $lightness