wikijs-fork/client/scss/libs/bulma/elements/button.sass

111 lines
2.3 KiB
Sass

=button-small
border-radius: $radius-small
font-size: 11px
height: 24px
line-height: 16px
padding-left: 6px
padding-right: 6px
=button-medium
font-size: 18px
height: 40px
padding-left: 14px
padding-right: 14px
=button-large
font-size: 22px
height: 48px
padding-left: 20px
padding-right: 20px
.button
+control
@extend .unselectable
justify-content: center
padding-left: 10px
padding-right: 10px
text-align: center
white-space: nowrap
strong
color: inherit
small
display: block
font-size: $size-small
line-height: 1
margin-top: 5px
.icon,
.tag
&:first-child
margin-left: -2px
margin-right: 4px
&:last-child
margin-left: 4px
margin-right: -2px
&:hover,
&:focus,
&.is-active
color: $control-hover
&:active
box-shadow: inset 0 1px 2px rgba($black, 0.2)
// Colors
@each $name, $pair in $colors
$color: nth($pair, 1)
$color-invert: nth($pair, 2)
&.is-#{$name}
background-color: $color
border-color: transparent
color: $color-invert
&:hover,
&:focus,
&.is-active
background-color: darken($color, 10%)
border-color: transparent
color: $color-invert
&:active
border-color: transparent
&.is-inverted
background-color: $color-invert
color: $color
&:hover
background-color: darken($color-invert, 5%)
&.is-loading
&:after
border-color: transparent transparent $color-invert $color-invert !important
&.is-outlined
background-color: transparent
border-color: $color
color: $color
&:hover,
&:focus
background-color: $color
border-color: $color
color: $color-invert
&.is-link
background-color: transparent
border-color: transparent
color: $text
text-decoration: underline
&:hover,
&:focus
background-color: $border
color: $text-strong
// Sizes
&.is-small
+button-small
&.is-medium
+button-medium
&.is-large
+button-large
// Modifiers
&[disabled],
&.is-disabled
opacity: 0.5
&.is-fullwidth
display: flex
width: 100%
&.is-loading
color: transparent !important
pointer-events: none
&:after
@extend .loader
+center(16px)
position: absolute !important