mirror of
https://github.com/jgthms/bulma
synced 2026-03-21 04:34:30 -07:00
Allow each component to have its own colors and default to the global set
This commit is contained in:
committed by
Jeremy Thomas
parent
7a3efb04aa
commit
da369e134c
@@ -11,6 +11,8 @@ $file-name-border-style: solid !default
|
||||
$file-name-border-width: 1px 1px 1px 0 !default
|
||||
$file-name-max-width: 16em !default
|
||||
|
||||
$file-colors: $form-colors !default
|
||||
|
||||
.file
|
||||
@extend %unselectable
|
||||
align-items: stretch
|
||||
@@ -18,7 +20,7 @@ $file-name-max-width: 16em !default
|
||||
justify-content: flex-start
|
||||
position: relative
|
||||
// Colors
|
||||
@each $name, $pair in $colors
|
||||
@each $name, $pair in $file-colors
|
||||
$color: nth($pair, 1)
|
||||
$color-invert: nth($pair, 2)
|
||||
&.is-#{$name}
|
||||
|
||||
@@ -2,6 +2,8 @@ $textarea-padding: $control-padding-horizontal !default
|
||||
$textarea-max-height: 40em !default
|
||||
$textarea-min-height: 8em !default
|
||||
|
||||
$textarea-colors: $form-colors !default
|
||||
|
||||
%input-textarea
|
||||
@extend %input
|
||||
box-shadow: $input-shadow
|
||||
@@ -10,7 +12,7 @@ $textarea-min-height: 8em !default
|
||||
&[readonly]
|
||||
box-shadow: none
|
||||
// Colors
|
||||
@each $name, $pair in $colors
|
||||
@each $name, $pair in $textarea-colors
|
||||
$color: nth($pair, 1)
|
||||
&.is-#{$name}
|
||||
border-color: $color
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$select-colors: $form-colors !default
|
||||
|
||||
.select
|
||||
display: inline-block
|
||||
max-width: 100%
|
||||
@@ -39,7 +41,7 @@
|
||||
&::after
|
||||
border-color: $input-hover-color
|
||||
// Colors
|
||||
@each $name, $pair in $colors
|
||||
@each $name, $pair in $select-colors
|
||||
$color: nth($pair, 1)
|
||||
&.is-#{$name}
|
||||
&:not(:hover)::after
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$form-colors: $colors !default
|
||||
|
||||
$input-color: $text-strong !default
|
||||
$input-background-color: $scheme-main !default
|
||||
$input-border-color: $border !default
|
||||
|
||||
@@ -3,6 +3,8 @@ $label-weight: $weight-bold !default
|
||||
|
||||
$help-size: $size-small !default
|
||||
|
||||
$label-colors: $form-colors !default
|
||||
|
||||
.label
|
||||
color: $label-color
|
||||
display: block
|
||||
@@ -22,7 +24,7 @@ $help-size: $size-small !default
|
||||
display: block
|
||||
font-size: $help-size
|
||||
margin-top: 0.25rem
|
||||
@each $name, $pair in $colors
|
||||
@each $name, $pair in $label-colors
|
||||
$color: nth($pair, 1)
|
||||
&.is-#{$name}
|
||||
color: $color
|
||||
|
||||
Reference in New Issue
Block a user