mirror of
https://github.com/jgthms/bulma.git
synced 2025-01-09 15:44:25 +00:00
Add white black light dark colors, Fix button inverted
This commit is contained in:
parent
7ecedc6ec5
commit
15e6ecde1c
@ -3,6 +3,8 @@
|
|||||||
## 0.0.25
|
## 0.0.25
|
||||||
|
|
||||||
* Added: `utilities/controls.sass` and `elements/form.sass`
|
* Added: `utilities/controls.sass` and `elements/form.sass`
|
||||||
|
* Added: new responsive classes
|
||||||
|
* Added: white/black and light/dark colors
|
||||||
* Changed: `.tabs` need `.icon` now
|
* Changed: `.tabs` need `.icon` now
|
||||||
* Changed: cdnjs link doesn't include version
|
* Changed: cdnjs link doesn't include version
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.card-header
|
.card-header
|
||||||
align-items: stretch
|
align-items: stretch
|
||||||
box-shadow: 0 1px 2px rgba(black, 0.1)
|
box-shadow: 0 1px 2px rgba($black, 0.1)
|
||||||
display: flex
|
display: flex
|
||||||
min-height: 40px
|
min-height: 40px
|
||||||
|
|
||||||
@ -43,8 +43,8 @@
|
|||||||
border-right: 1px solid $border
|
border-right: 1px solid $border
|
||||||
|
|
||||||
.card
|
.card
|
||||||
background: white
|
background: $white
|
||||||
box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
|
box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1)
|
||||||
color: $text
|
color: $text
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
position: relative
|
position: relative
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
@each $name, $pair in $colors
|
@each $name, $pair in $colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
$color-invert: nth($pair, 2)
|
$color-invert: nth($pair, 2)
|
||||||
$lightning: (100% - lightness($color)) - 4%
|
$lightning: max((100% - lightness($color)) - 4%, 0%)
|
||||||
$darkness: max(lightness($color) - 10%, lightness($color))
|
$darkness: max(lightness($color) - 10%, lightness($color))
|
||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
background: lighten($color, $lightning)
|
background: lighten($color, $lightning)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.modal-background
|
.modal-background
|
||||||
+overlay
|
+overlay
|
||||||
background: rgba(black, 0.86)
|
background: rgba($black, 0.86)
|
||||||
|
|
||||||
.modal-content
|
.modal-content
|
||||||
margin: 0 20px
|
margin: 0 20px
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
// Modifiers
|
// Modifiers
|
||||||
&.is-active
|
&.is-active
|
||||||
a
|
a
|
||||||
background: white
|
background: $white
|
||||||
border-color: $border
|
border-color: $border
|
||||||
border-bottom-color: transparent
|
border-bottom-color: transparent
|
||||||
// Modifiers
|
// Modifiers
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
.box
|
.box
|
||||||
@extend .block
|
@extend .block
|
||||||
background: white
|
background: $white
|
||||||
border-radius: 5px
|
border-radius: 5px
|
||||||
box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px rgba(black, 0.1)
|
box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1)
|
||||||
display: block
|
display: block
|
||||||
padding: 20px
|
padding: 20px
|
||||||
|
|
||||||
a.box
|
a.box
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus
|
&:focus
|
||||||
box-shadow: 0 2px 3px rgba(black, 0.1), 0 0 0 1px $link
|
box-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px $link
|
||||||
&:active
|
&:active
|
||||||
box-shadow: inset 0 1px 2px rgba(black, 0.2), 0 0 0 1px $link
|
box-shadow: inset 0 1px 2px rgba($black, 0.2), 0 0 0 1px $link
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
&:hover
|
&:hover
|
||||||
color: $control-hover
|
color: $control-hover
|
||||||
&:active
|
&:active
|
||||||
box-shadow: inset 0 1px 2px rgba(black, 0.2)
|
box-shadow: inset 0 1px 2px rgba($black, 0.2)
|
||||||
// Colors
|
// Colors
|
||||||
@each $name, $pair in $colors
|
@each $name, $pair in $colors
|
||||||
$color: nth($pair, 1)
|
$color: nth($pair, 1)
|
||||||
@ -63,14 +63,6 @@
|
|||||||
color: $color
|
color: $color
|
||||||
&:hover
|
&:hover
|
||||||
background: darken($color-invert, 5%)
|
background: darken($color-invert, 5%)
|
||||||
&.is-outlined
|
|
||||||
background-color: transparent
|
|
||||||
border-color: $color-invert
|
|
||||||
color: $color-invert
|
|
||||||
&:hover
|
|
||||||
background: rgba(black, 0.05)
|
|
||||||
border-color: $color-invert
|
|
||||||
color: $color-invert
|
|
||||||
&.is-loading
|
&.is-loading
|
||||||
&:after
|
&:after
|
||||||
border-color: transparent transparent $color-invert $color-invert !important
|
border-color: transparent transparent $color-invert $color-invert !important
|
||||||
@ -80,8 +72,9 @@
|
|||||||
color: $color
|
color: $color
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus
|
&:focus
|
||||||
border-color: darken($color, 10%)
|
background: $color
|
||||||
color: darken($color, 10%)
|
border-color: $color
|
||||||
|
color: $color-invert
|
||||||
&.is-link
|
&.is-link
|
||||||
background: transparent
|
background: transparent
|
||||||
border-color: transparent
|
border-color: transparent
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.input
|
.input
|
||||||
+form-control
|
+form-control
|
||||||
box-shadow: inset 0 1px 2px rgba(black, 0.1)
|
box-shadow: inset 0 1px 2px rgba($black, 0.1)
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
width: 100%
|
width: 100%
|
||||||
&[type="search"]
|
&[type="search"]
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
+unselectable
|
+unselectable
|
||||||
-moz-appearance: none
|
-moz-appearance: none
|
||||||
-webkit-appearance: none
|
-webkit-appearance: none
|
||||||
background: rgba(black, 0.2)
|
background: rgba($black, 0.2)
|
||||||
border: none
|
border: none
|
||||||
border-radius: 290486px
|
border-radius: 290486px
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
@ -13,7 +13,7 @@
|
|||||||
width: 24px
|
width: 24px
|
||||||
&:before,
|
&:before,
|
||||||
&:after
|
&:after
|
||||||
background: white
|
background: $white
|
||||||
content: ""
|
content: ""
|
||||||
display: block
|
display: block
|
||||||
height: 2px
|
height: 2px
|
||||||
@ -28,7 +28,7 @@
|
|||||||
&:after
|
&:after
|
||||||
transform: rotate(-45deg)
|
transform: rotate(-45deg)
|
||||||
&:hover
|
&:hover
|
||||||
background: rgba(black, 0.5)
|
background: rgba($black, 0.5)
|
||||||
// Sizes
|
// Sizes
|
||||||
&.is-small
|
&.is-small
|
||||||
height: 16px
|
height: 16px
|
||||||
@ -160,9 +160,6 @@
|
|||||||
&.is-#{$name}
|
&.is-#{$name}
|
||||||
background: $color
|
background: $color
|
||||||
color: $color-invert
|
color: $color-invert
|
||||||
&.is-dark
|
|
||||||
background: $text
|
|
||||||
color: $text-invert
|
|
||||||
// Sizes
|
// Sizes
|
||||||
&.is-small
|
&.is-small
|
||||||
font-size: $size-small
|
font-size: $size-small
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.table
|
.table
|
||||||
background: white
|
background: $white
|
||||||
color: $text-strong
|
color: $text-strong
|
||||||
margin-bottom: 20px
|
margin-bottom: 20px
|
||||||
width: 100%
|
width: 100%
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.header
|
.header
|
||||||
+clearfix
|
+clearfix
|
||||||
background: white
|
background: $white
|
||||||
display: flex
|
display: flex
|
||||||
line-height: 24px
|
line-height: 24px
|
||||||
position: relative
|
position: relative
|
||||||
@ -12,7 +12,7 @@
|
|||||||
width: 100%
|
width: 100%
|
||||||
// Modifiers
|
// Modifiers
|
||||||
&.has-shadow
|
&.has-shadow
|
||||||
box-shadow: 0 1px 2px rgba(black, 0.1)
|
box-shadow: 0 1px 2px rgba($black, 0.1)
|
||||||
// Responsiveness
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
.container
|
.container
|
||||||
@ -128,7 +128,7 @@ a.header-item
|
|||||||
.header-menu
|
.header-menu
|
||||||
// Responsiveness
|
// Responsiveness
|
||||||
+mobile
|
+mobile
|
||||||
box-shadow: 0 4px 7px rgba(black, 0.1)
|
box-shadow: 0 4px 7px rgba($black, 0.1)
|
||||||
display: none
|
display: none
|
||||||
.header-item
|
.header-item
|
||||||
border-top: 1px solid rgba($border, 0.5)
|
border-top: 1px solid rgba($border, 0.5)
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
margin-right: 20px
|
margin-right: 20px
|
||||||
|
|
||||||
.hero
|
.hero
|
||||||
background: white
|
background: $white
|
||||||
.header
|
.header
|
||||||
background: none
|
background: none
|
||||||
.container
|
.container
|
||||||
@ -89,7 +89,7 @@
|
|||||||
a
|
a
|
||||||
color: $color-invert
|
color: $color-invert
|
||||||
&:hover
|
&:hover
|
||||||
background: rgba(black, 0.1)
|
background: rgba($black, 0.1)
|
||||||
li.is-active a
|
li.is-active a
|
||||||
&,
|
&,
|
||||||
&:hover
|
&:hover
|
||||||
@ -106,7 +106,7 @@
|
|||||||
span
|
span
|
||||||
background: $color-invert
|
background: $color-invert
|
||||||
&:hover
|
&:hover
|
||||||
background: rgba(black, 0.1)
|
background: rgba($black, 0.1)
|
||||||
&.is-active
|
&.is-active
|
||||||
span
|
span
|
||||||
background: $color-invert
|
background: $color-invert
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.section
|
.section
|
||||||
background: white
|
background: $white
|
||||||
padding: 40px 20px
|
padding: 40px 20px
|
||||||
// Responsiveness
|
// Responsiveness
|
||||||
+desktop
|
+desktop
|
||||||
|
@ -29,6 +29,6 @@
|
|||||||
|
|
||||||
@function findColorInvert($color)
|
@function findColorInvert($color)
|
||||||
@if (colorLuminance($color) > 0.8)
|
@if (colorLuminance($color) > 0.8)
|
||||||
@return rgba(black, 0.5)
|
@return rgba($black, 0.5)
|
||||||
@else
|
@else
|
||||||
@return white
|
@return white
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
|
|
||||||
|
$black: #111 !default
|
||||||
$grey-darker: #222324 !default
|
$grey-darker: #222324 !default
|
||||||
$grey-dark: #69707a !default
|
$grey-dark: #69707a !default
|
||||||
$grey: #aeb1b5 !default
|
$grey: #aeb1b5 !default
|
||||||
$grey-light: #d3d6db !default
|
$grey-light: #d3d6db !default
|
||||||
$grey-lighter: #f5f7fa !default
|
$grey-lighter: #f5f7fa !default
|
||||||
|
$white: #fff !default
|
||||||
|
|
||||||
$blue: #42afe3 !default
|
$blue: #42afe3 !default
|
||||||
$green: #97cd76 !default
|
$green: #97cd76 !default
|
||||||
@ -62,7 +64,8 @@ $success: $green !default
|
|||||||
$warning: $yellow !default
|
$warning: $yellow !default
|
||||||
$danger: $red !default
|
$danger: $red !default
|
||||||
|
|
||||||
$dark: $grey-darker !default
|
$light: $grey-lighter !default
|
||||||
|
$dark: $grey-dark !default
|
||||||
|
|
||||||
$text: $grey-dark !default
|
$text: $grey-dark !default
|
||||||
|
|
||||||
@ -77,7 +80,8 @@ $success-invert: findColorInvert($success) !default
|
|||||||
$warning-invert: findColorInvert($warning) !default
|
$warning-invert: findColorInvert($warning) !default
|
||||||
$danger-invert: findColorInvert($danger) !default
|
$danger-invert: findColorInvert($danger) !default
|
||||||
|
|
||||||
$dark-invert: findColorInvert($dark) !default
|
$light-invert: $dark !default
|
||||||
|
$dark-invert: $light !default
|
||||||
|
|
||||||
// General colors
|
// General colors
|
||||||
|
|
||||||
@ -142,6 +146,6 @@ $size-huge: $size-1 !default
|
|||||||
|
|
||||||
// 4. Lists and maps
|
// 4. Lists and maps
|
||||||
|
|
||||||
$colors: (dark: ($dark, $dark-invert), primary: ($primary, $primary-invert), info: ($info, $info-invert), success: ($success, $success-invert), warning: ($warning, $warning-invert), danger: ($danger, $danger-invert)) !default
|
$colors: (white: ($white, $black), black: ($black, $white), light: ($light, $light-invert), dark: ($dark, $dark-invert), primary: ($primary, $primary-invert), info: ($info, $info-invert), success: ($success, $success-invert), warning: ($warning, $warning-invert), danger: ($danger, $danger-invert)) !default
|
||||||
|
|
||||||
$sizes: $size-1 $size-2 $size-3 $size-4 $size-5 $size-6 !default
|
$sizes: $size-1 $size-2 $size-3 $size-4 $size-5 $size-6 !default
|
||||||
|
Loading…
Reference in New Issue
Block a user