mirror of
https://github.com/jgthms/bulma.git
synced 2024-11-28 12:24:23 +00:00
38 lines
1.2 KiB
Sass
38 lines
1.2 KiB
Sass
@each $name, $pair in $colors
|
|
$color: nth($pair, 1)
|
|
.has-text-#{$name}
|
|
color: var(--#{$name}, #{$color}) !important
|
|
a.has-text-#{$name}
|
|
&:hover,
|
|
&:focus
|
|
color: bulmaDarken($color, 10%) !important
|
|
.has-background-#{$name}
|
|
background-color: var(--#{$name}, #{$color}) !important
|
|
@if length($pair) >= 4
|
|
$color-light: nth($pair, 3)
|
|
$color-dark: nth($pair, 4)
|
|
// Light
|
|
.has-text-#{$name}-light
|
|
color: var(--#{$name}-light, #{$color-light}) !important
|
|
a.has-text-#{$name}-light
|
|
&:hover,
|
|
&:focus
|
|
color: bulmaDarken($color-light, 10%) !important
|
|
.has-background-#{$name}-light
|
|
background-color: var(--#{$name}-light, #{$color-light}) !important
|
|
// Dark
|
|
.has-text-#{$name}-dark
|
|
color: var(--#{$name}-dark, #{$color-dark}) !important
|
|
a.has-text-#{$name}-dark
|
|
&:hover,
|
|
&:focus
|
|
color: bulmaLighten($color-dark, 10%) !important
|
|
.has-background-#{$name}-dark
|
|
background-color: var(--#{$name}-dark, #{$color-dark}) !important
|
|
|
|
@each $name, $shade in $shades
|
|
.has-text-#{$name}
|
|
color: var(--#{$name}, #{$shade}) !important
|
|
.has-background-#{$name}
|
|
background-color: var(--#{$name}, #{$shade}) !important
|