mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-14 11:14:24 +00:00
Add light/dark color functions
This commit is contained in:
parent
46b3edf9fe
commit
5131f2ab04
@ -65,3 +65,19 @@
|
|||||||
@return rgba(#000, 0.7)
|
@return rgba(#000, 0.7)
|
||||||
@else
|
@else
|
||||||
@return #fff
|
@return #fff
|
||||||
|
|
||||||
|
@function findLightColor($color)
|
||||||
|
@if type-of($color) == 'color'
|
||||||
|
$l: 96%
|
||||||
|
@if lightness($color) > 96%
|
||||||
|
$l: lightness($color)
|
||||||
|
@return change-color($color, $lightness: $l)
|
||||||
|
@return $background
|
||||||
|
|
||||||
|
@function findDarkColor($color)
|
||||||
|
@if type-of($color) == 'color'
|
||||||
|
$l: 29%
|
||||||
|
@if lightness($color) < 29%
|
||||||
|
$l: lightness($color)
|
||||||
|
@return change-color($color, $lightness: $l)
|
||||||
|
@return $text-strong
|
||||||
|
@ -16,7 +16,7 @@ $white-bis: hsl(0, 0%, 98%) !default
|
|||||||
$white: hsl(0, 0%, 100%) !default
|
$white: hsl(0, 0%, 100%) !default
|
||||||
|
|
||||||
$orange: hsl(14, 100%, 53%) !default
|
$orange: hsl(14, 100%, 53%) !default
|
||||||
$yellow: hsl(48, 100%, 53%) !default
|
$yellow: hsl(48, 100%, 67%) !default
|
||||||
$green: hsl(141, 53%, 53%) !default
|
$green: hsl(141, 53%, 53%) !default
|
||||||
$turquoise: hsl(171, 100%, 41%) !default
|
$turquoise: hsl(171, 100%, 41%) !default
|
||||||
$cyan: hsl(204, 71%, 53%) !default
|
$cyan: hsl(204, 71%, 53%) !default
|
||||||
|
Loading…
Reference in New Issue
Block a user