mirror of
https://github.com/jgthms/bulma
synced 2026-03-20 12:24:28 -07:00
Add light color helpers
This commit is contained in:
@@ -2,4 +2,3 @@
|
||||
|
||||
@import "minireset.sass"
|
||||
@import "generic.sass"
|
||||
@import "helpers.sass"
|
||||
|
||||
@@ -8,6 +8,27 @@
|
||||
color: bulmaDarken($color, 10%) !important
|
||||
.has-background-#{$name}
|
||||
background-color: $color !important
|
||||
@if length($pair) >= 4
|
||||
$color-light: nth($pair, 3)
|
||||
$color-dark: nth($pair, 4)
|
||||
// Light
|
||||
.has-text-#{$name}-light
|
||||
color: $color-light !important
|
||||
a.has-text-#{$name}-light
|
||||
&:hover,
|
||||
&:focus
|
||||
color: bulmaDarken($color-light, 10%) !important
|
||||
.has-background-#{$name}-light
|
||||
background-color: $color-light !important
|
||||
// Dark
|
||||
.has-text-#{$name}-dark
|
||||
color: $color-dark !important
|
||||
a.has-text-#{$name}-dark
|
||||
&:hover,
|
||||
&:focus
|
||||
color: bulmaLighten($color-dark, 10%) !important
|
||||
.has-background-#{$name}-dark
|
||||
background-color: $color-dark !important
|
||||
|
||||
@each $name, $shade in $shades
|
||||
.has-text-#{$name}
|
||||
|
||||
@@ -108,3 +108,8 @@
|
||||
@if type-of($color) != 'color'
|
||||
@return $color
|
||||
@return darken($color, $amount)
|
||||
|
||||
@function bulmaLighten($color, $amount)
|
||||
@if type-of($color) != 'color'
|
||||
@return $color
|
||||
@return lighten($color, $amount)
|
||||
|
||||
Reference in New Issue
Block a user