2020-05-10 13:47:06 +00:00
|
|
|
@each $name, $pair in $colors
|
|
|
|
$color: nth($pair, 1)
|
|
|
|
.has-text-#{$name}
|
2020-08-27 12:23:14 +00:00
|
|
|
--has-text-hover-delta: -10%
|
2020-08-27 12:01:04 +00:00
|
|
|
--has-text-hover-#{$name}-l: calc(#{var(--#{$name}-l)} + #{var(--has-text-hover-delta)})
|
|
|
|
--has-text-hover-color: hsla(var(--#{$name}-h), var(--#{$name}-s), var(--has-text-hover-#{$name}-l), var(--#{$name}-a))
|
2020-08-27 07:57:33 +00:00
|
|
|
color: var(--#{$name}, #{$color}) !important
|
2020-08-27 12:01:04 +00:00
|
|
|
.has-text-#{$name}
|
2020-05-10 13:47:06 +00:00
|
|
|
&:hover,
|
|
|
|
&:focus
|
2020-08-27 12:01:04 +00:00
|
|
|
color: var(--has-text-hover-color, #{bulmaDarken($color, 10%)}) !important
|
2020-05-10 13:47:06 +00:00
|
|
|
.has-background-#{$name}
|
2020-08-27 07:57:33 +00:00
|
|
|
background-color: var(--#{$name}, #{$color}) !important
|
2020-05-10 21:10:51 +00:00
|
|
|
@if length($pair) >= 4
|
|
|
|
$color-light: nth($pair, 3)
|
|
|
|
$color-dark: nth($pair, 4)
|
|
|
|
// Light
|
|
|
|
.has-text-#{$name}-light
|
2020-08-27 07:57:33 +00:00
|
|
|
color: var(--#{$name}-light, #{$color-light}) !important
|
2020-05-10 21:10:51 +00:00
|
|
|
a.has-text-#{$name}-light
|
|
|
|
&:hover,
|
|
|
|
&:focus
|
|
|
|
color: bulmaDarken($color-light, 10%) !important
|
|
|
|
.has-background-#{$name}-light
|
2020-08-27 07:57:33 +00:00
|
|
|
background-color: var(--#{$name}-light, #{$color-light}) !important
|
2020-05-10 21:10:51 +00:00
|
|
|
// Dark
|
|
|
|
.has-text-#{$name}-dark
|
2020-08-27 07:57:33 +00:00
|
|
|
color: var(--#{$name}-dark, #{$color-dark}) !important
|
2020-05-10 21:10:51 +00:00
|
|
|
a.has-text-#{$name}-dark
|
|
|
|
&:hover,
|
|
|
|
&:focus
|
|
|
|
color: bulmaLighten($color-dark, 10%) !important
|
|
|
|
.has-background-#{$name}-dark
|
2020-08-27 07:57:33 +00:00
|
|
|
background-color: var(--#{$name}-dark, #{$color-dark}) !important
|
2020-05-10 13:47:06 +00:00
|
|
|
|
|
|
|
@each $name, $shade in $shades
|
|
|
|
.has-text-#{$name}
|
2020-08-27 07:57:33 +00:00
|
|
|
color: var(--#{$name}, #{$shade}) !important
|
2020-05-10 13:47:06 +00:00
|
|
|
.has-background-#{$name}
|
2020-08-27 07:57:33 +00:00
|
|
|
background-color: var(--#{$name}, #{$shade}) !important
|