mirror of
https://github.com/jgthms/bulma
synced 2026-03-21 20:54: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
@@ -46,6 +46,8 @@ $navbar-bottom-box-shadow-size: 0 -2px 0 0 !default
|
|||||||
|
|
||||||
$navbar-breakpoint: $desktop !default
|
$navbar-breakpoint: $desktop !default
|
||||||
|
|
||||||
|
$navbar-colors: $colors !default
|
||||||
|
|
||||||
=navbar-fixed
|
=navbar-fixed
|
||||||
left: 0
|
left: 0
|
||||||
position: fixed
|
position: fixed
|
||||||
@@ -57,7 +59,7 @@ $navbar-breakpoint: $desktop !default
|
|||||||
min-height: $navbar-height
|
min-height: $navbar-height
|
||||||
position: relative
|
position: relative
|
||||||
z-index: $navbar-z
|
z-index: $navbar-z
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $navbar-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ $button-static-color: $text-light !default
|
|||||||
$button-static-background-color: $scheme-main-ter !default
|
$button-static-background-color: $scheme-main-ter !default
|
||||||
$button-static-border-color: $border !default
|
$button-static-border-color: $border !default
|
||||||
|
|
||||||
|
$button-colors: $colors !default
|
||||||
|
|
||||||
// The button sizes use mixins so they can be used at different breakpoints
|
// The button sizes use mixins so they can be used at different breakpoints
|
||||||
=button-small
|
=button-small
|
||||||
border-radius: $radius-small
|
border-radius: $radius-small
|
||||||
@@ -115,7 +117,7 @@ $button-static-border-color: $border !default
|
|||||||
background-color: transparent
|
background-color: transparent
|
||||||
border-color: transparent
|
border-color: transparent
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $button-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ $notification-padding: 1.25rem 2.5rem 1.25rem 1.5rem !default
|
|||||||
$notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default
|
$notification-padding-ltr: 1.25rem 2.5rem 1.25rem 1.5rem !default
|
||||||
$notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
|
$notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
|
||||||
|
|
||||||
|
$notification-colors: $colors !default
|
||||||
|
|
||||||
.notification
|
.notification
|
||||||
@extend %block
|
@extend %block
|
||||||
background-color: $notification-background-color
|
background-color: $notification-background-color
|
||||||
@@ -33,7 +35,7 @@ $notification-padding-rtl: 1.25rem 1.5rem 1.25rem 2.5rem !default
|
|||||||
.content
|
.content
|
||||||
color: currentColor
|
color: currentColor
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $notification-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ $progress-border-radius: $radius-rounded !default
|
|||||||
|
|
||||||
$progress-indeterminate-duration: 1.5s !default
|
$progress-indeterminate-duration: 1.5s !default
|
||||||
|
|
||||||
|
$progress-colors: $colors !default
|
||||||
|
|
||||||
.progress
|
.progress
|
||||||
@extend %block
|
@extend %block
|
||||||
-moz-appearance: none
|
-moz-appearance: none
|
||||||
@@ -25,7 +27,7 @@ $progress-indeterminate-duration: 1.5s !default
|
|||||||
background-color: $progress-value-background-color
|
background-color: $progress-value-background-color
|
||||||
border: none
|
border: none
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $progress-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
&::-webkit-progress-value
|
&::-webkit-progress-value
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ $table-row-active-color: $primary-invert !default
|
|||||||
$table-striped-row-even-background-color: $scheme-main-bis !default
|
$table-striped-row-even-background-color: $scheme-main-bis !default
|
||||||
$table-striped-row-even-hover-background-color: $scheme-main-ter !default
|
$table-striped-row-even-hover-background-color: $scheme-main-ter !default
|
||||||
|
|
||||||
|
$table-colors: $colors !default
|
||||||
|
|
||||||
.table
|
.table
|
||||||
@extend %block
|
@extend %block
|
||||||
background-color: $table-background-color
|
background-color: $table-background-color
|
||||||
@@ -34,7 +36,7 @@ $table-striped-row-even-hover-background-color: $scheme-main-ter !default
|
|||||||
padding: $table-cell-padding
|
padding: $table-cell-padding
|
||||||
vertical-align: top
|
vertical-align: top
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $table-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ $tag-color: $text !default
|
|||||||
$tag-radius: $radius !default
|
$tag-radius: $radius !default
|
||||||
$tag-delete-margin: 1px !default
|
$tag-delete-margin: 1px !default
|
||||||
|
|
||||||
|
$tag-colors: $colors !default
|
||||||
|
|
||||||
.tags
|
.tags
|
||||||
align-items: center
|
align-items: center
|
||||||
display: flex
|
display: flex
|
||||||
@@ -71,7 +73,7 @@ $tag-delete-margin: 1px !default
|
|||||||
+ltr-property("margin", 0.25rem, false)
|
+ltr-property("margin", 0.25rem, false)
|
||||||
+ltr-property("margin", -0.375rem)
|
+ltr-property("margin", -0.375rem)
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $tag-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ $file-name-border-style: solid !default
|
|||||||
$file-name-border-width: 1px 1px 1px 0 !default
|
$file-name-border-width: 1px 1px 1px 0 !default
|
||||||
$file-name-max-width: 16em !default
|
$file-name-max-width: 16em !default
|
||||||
|
|
||||||
|
$file-colors: $form-colors !default
|
||||||
|
|
||||||
.file
|
.file
|
||||||
@extend %unselectable
|
@extend %unselectable
|
||||||
align-items: stretch
|
align-items: stretch
|
||||||
@@ -18,7 +20,7 @@ $file-name-max-width: 16em !default
|
|||||||
justify-content: flex-start
|
justify-content: flex-start
|
||||||
position: relative
|
position: relative
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $file-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ $textarea-padding: $control-padding-horizontal !default
|
|||||||
$textarea-max-height: 40em !default
|
$textarea-max-height: 40em !default
|
||||||
$textarea-min-height: 8em !default
|
$textarea-min-height: 8em !default
|
||||||
|
|
||||||
|
$textarea-colors: $form-colors !default
|
||||||
|
|
||||||
%input-textarea
|
%input-textarea
|
||||||
@extend %input
|
@extend %input
|
||||||
box-shadow: $input-shadow
|
box-shadow: $input-shadow
|
||||||
@@ -10,7 +12,7 @@ $textarea-min-height: 8em !default
|
|||||||
&[readonly]
|
&[readonly]
|
||||||
box-shadow: none
|
box-shadow: none
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $textarea-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
border-color: $color
|
border-color: $color
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
$select-colors: $form-colors !default
|
||||||
|
|
||||||
.select
|
.select
|
||||||
display: inline-block
|
display: inline-block
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
@@ -39,7 +41,7 @@
|
|||||||
&::after
|
&::after
|
||||||
border-color: $input-hover-color
|
border-color: $input-hover-color
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $select-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
&:not(:hover)::after
|
&:not(:hover)::after
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
$form-colors: $colors !default
|
||||||
|
|
||||||
$input-color: $text-strong !default
|
$input-color: $text-strong !default
|
||||||
$input-background-color: $scheme-main !default
|
$input-background-color: $scheme-main !default
|
||||||
$input-border-color: $border !default
|
$input-border-color: $border !default
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ $label-weight: $weight-bold !default
|
|||||||
|
|
||||||
$help-size: $size-small !default
|
$help-size: $size-small !default
|
||||||
|
|
||||||
|
$label-colors: $form-colors !default
|
||||||
|
|
||||||
.label
|
.label
|
||||||
color: $label-color
|
color: $label-color
|
||||||
display: block
|
display: block
|
||||||
@@ -22,7 +24,7 @@ $help-size: $size-small !default
|
|||||||
display: block
|
display: block
|
||||||
font-size: $help-size
|
font-size: $help-size
|
||||||
margin-top: 0.25rem
|
margin-top: 0.25rem
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $label-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
color: $color
|
color: $color
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ $hero-body-padding-small: 1.5rem !default
|
|||||||
$hero-body-padding-medium: 9rem 1.5rem !default
|
$hero-body-padding-medium: 9rem 1.5rem !default
|
||||||
$hero-body-padding-large: 18rem 1.5rem !default
|
$hero-body-padding-large: 18rem 1.5rem !default
|
||||||
|
|
||||||
|
$hero-colors: $colors !default
|
||||||
|
|
||||||
// Main container
|
// Main container
|
||||||
.hero
|
.hero
|
||||||
align-items: stretch
|
align-items: stretch
|
||||||
@@ -15,7 +17,7 @@ $hero-body-padding-large: 18rem 1.5rem !default
|
|||||||
ul
|
ul
|
||||||
border-bottom: none
|
border-bottom: none
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $hero-colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
|
|||||||
Reference in New Issue
Block a user