2020-08-28 13:54:53 +02:00
|
|
|
$button-color: var(--text-strong, #{$text-strong}) !default
|
|
|
|
|
$button-background-color: var(--scheme-main, #{$scheme-main}) !default
|
2019-05-17 14:02:12 +01:00
|
|
|
$button-family: false !default
|
2018-04-08 19:46:32 +01:00
|
|
|
|
2020-08-28 13:54:53 +02:00
|
|
|
$button-border-color: var(--border, #{$border}) !default
|
|
|
|
|
$button-border-width: var(--control-border-width, #{$control-border-width}) !default
|
2018-04-08 19:46:32 +01:00
|
|
|
|
2019-10-12 21:44:57 +01:00
|
|
|
$button-padding-vertical: calc(0.5em - #{$button-border-width}) !default
|
|
|
|
|
$button-padding-horizontal: 1em !default
|
2016-10-30 10:41:53 +00:00
|
|
|
|
2020-08-28 13:54:53 +02:00
|
|
|
$button-hover-color: var(--link-hover, #{$link-hover}) !default
|
|
|
|
|
$button-hover-border-color: var(--link-hover-border, #{$link-hover-border}) !default
|
2016-10-29 21:51:13 +01:00
|
|
|
|
2020-08-28 13:54:53 +02:00
|
|
|
$button-focus-color: var(--link-focus, #{$link-focus}) !default
|
|
|
|
|
$button-focus-border-color: var(--link-focus-border, #{$link-focus-border}) !default
|
2017-08-30 17:29:01 +01:00
|
|
|
$button-focus-box-shadow-size: 0 0 0 0.125em !default
|
2020-09-06 14:25:06 +01:00
|
|
|
$button-focus-box-shadow-color-hsla: hsla(var(--link-h), var(--link-s), var(--link-l), 0.25) !default
|
2020-09-06 10:53:18 +01:00
|
|
|
$button-focus-box-shadow-color: var(--button-focus-box-shadow-color-hsla, #{bulmaRgba($link, 0.25)}) !default
|
2016-10-29 21:51:13 +01:00
|
|
|
|
2020-08-28 13:54:53 +02:00
|
|
|
$button-active-color: var(--link-active, #{$link-active}) !default
|
|
|
|
|
$button-active-border-color: var(--link-active-border, #{$link-active-border}) !default
|
2016-10-29 21:51:13 +01:00
|
|
|
|
2020-08-28 13:54:53 +02:00
|
|
|
$button-text-color: var(--text, #{$text}) !default
|
2019-12-30 13:27:46 +01:00
|
|
|
$button-text-decoration: underline !default
|
2020-09-06 14:25:06 +01:00
|
|
|
$button-text-hover-background-color: $background !default
|
2020-08-28 13:54:53 +02:00
|
|
|
$button-text-hover-color: var(--text-strong, #{$text-strong}) !default
|
2017-07-28 21:05:15 +01:00
|
|
|
|
2020-10-31 19:28:40 +00:00
|
|
|
$button-ghost-background: none !default
|
|
|
|
|
$button-ghost-border-color: transparent !default
|
|
|
|
|
$button-ghost-color: $link !default
|
|
|
|
|
$button-ghost-decoration: none !default
|
|
|
|
|
$button-ghost-hover-color: $link !default
|
|
|
|
|
$button-ghost-hover-decoration: underline !default
|
|
|
|
|
|
2019-10-13 15:12:30 +01:00
|
|
|
$button-disabled-background-color: $scheme-main !default
|
|
|
|
|
$button-disabled-border-color: $border !default
|
2017-07-28 21:05:15 +01:00
|
|
|
$button-disabled-shadow: none !default
|
|
|
|
|
$button-disabled-opacity: 0.5 !default
|
|
|
|
|
|
2020-08-28 13:54:53 +02:00
|
|
|
$button-static-color: var(--text-light, #{$text-light}) !default
|
|
|
|
|
$button-static-background-color: var(--scheme-main-ter, #{$scheme-main-ter}) !default
|
|
|
|
|
$button-static-border-color: var(--border, #{$border}) !default
|
2017-05-28 16:07:29 +01:00
|
|
|
|
2020-08-21 11:40:07 -04:00
|
|
|
$button-colors: $colors !default
|
|
|
|
|
|
2016-10-30 10:41:53 +00:00
|
|
|
// The button sizes use mixins so they can be used at different breakpoints
|
2016-01-24 00:03:43 +00:00
|
|
|
=button-small
|
2020-08-28 13:54:53 +02:00
|
|
|
border-radius: var(--radius-small, #{$radius-small})
|
|
|
|
|
--button-font-size: var(--size-small, #{$size-small})
|
2018-10-31 19:22:21 +00:00
|
|
|
=button-normal
|
2020-08-28 13:54:53 +02:00
|
|
|
--button-font-size: var(--size-normal, #{$size-normal})
|
2016-01-24 00:03:43 +00:00
|
|
|
=button-medium
|
2020-08-28 13:54:53 +02:00
|
|
|
--button-font-size: var(--size-medium, #{$size-medium})
|
2016-01-24 00:03:43 +00:00
|
|
|
=button-large
|
2020-08-28 13:54:53 +02:00
|
|
|
--button-font-size: var(--size-large, #{$size-large})
|
2016-01-24 00:03:43 +00:00
|
|
|
|
|
|
|
|
.button
|
2020-08-28 13:54:53 +02:00
|
|
|
--button-background-color: #{$button-background-color}
|
|
|
|
|
--button-border-color: #{$button-border-color}
|
|
|
|
|
--button-border-width: #{$button-border-width}
|
|
|
|
|
--button-color: #{$button-color}
|
|
|
|
|
--button-family: #{$button-family}
|
|
|
|
|
--button-padding-vertical: #{$button-padding-vertical}
|
|
|
|
|
--button-padding-horizontal: #{$button-padding-horizontal}
|
|
|
|
|
--button-hover-border-color: #{$button-hover-border-color}
|
|
|
|
|
--button-hover-color: #{$button-hover-color}
|
|
|
|
|
--button-focus-border-color: #{$button-focus-border-color}
|
2020-09-01 20:02:57 +02:00
|
|
|
--button-focus-box-shadow-size: #{$button-focus-box-shadow-size}
|
2020-09-06 14:25:06 +01:00
|
|
|
--button-focus-box-shadow-color-hsla: #{$button-focus-box-shadow-color-hsla}
|
2020-09-01 20:02:57 +02:00
|
|
|
--button-focus-box-shadow-color: #{$button-focus-box-shadow-color}
|
2020-08-28 13:54:53 +02:00
|
|
|
--button-focus-color: #{$button-focus-color}
|
|
|
|
|
--button-active-border-color: #{$button-active-border-color}
|
|
|
|
|
--button-active-color: #{$button-active-color}
|
|
|
|
|
--button-text-color: #{$button-text-color}
|
|
|
|
|
--button-text-decoration: #{$button-text-decoration}
|
|
|
|
|
--button-text-hover-background-color: #{$button-text-hover-background-color}
|
|
|
|
|
--button-text-hover-color: #{$button-text-hover-color}
|
|
|
|
|
--button-disabled-background-color: #{$button-disabled-background-color}
|
|
|
|
|
--button-disabled-border-color: #{$button-disabled-border-color}
|
|
|
|
|
--button-disabled-shadow: #{$button-disabled-shadow}
|
|
|
|
|
--button-disabled-opacity: #{$button-disabled-opacity}
|
|
|
|
|
--button-static-background-color: #{$button-static-background-color}
|
|
|
|
|
--button-static-border-color: #{$button-static-border-color}
|
|
|
|
|
--button-static-color: #{$button-static-color}
|
2018-10-02 07:04:19 +01:00
|
|
|
@extend %control
|
2018-09-04 15:24:50 +02:00
|
|
|
@extend %unselectable
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--button-background-color)
|
|
|
|
|
border-color: var(--button-border-color)
|
|
|
|
|
border-width: var(--button-border-width)
|
|
|
|
|
color: var(--button-color)
|
2016-09-22 23:14:18 +01:00
|
|
|
cursor: pointer
|
2019-05-17 14:02:12 +01:00
|
|
|
@if $button-family
|
2020-08-28 13:54:53 +02:00
|
|
|
font-family: var(--button-family)
|
|
|
|
|
font-size: var(--button-font-size)
|
2016-03-26 17:28:43 +00:00
|
|
|
justify-content: center
|
2020-08-28 13:54:53 +02:00
|
|
|
padding-bottom: var(--button-padding-vertical)
|
|
|
|
|
padding-left: var(--button-padding-horizontal)
|
|
|
|
|
padding-right: var(--button-padding-horizontal)
|
|
|
|
|
padding-top: var(--button-padding-vertical)
|
2016-01-30 11:53:41 +00:00
|
|
|
text-align: center
|
2016-01-26 00:02:38 +00:00
|
|
|
white-space: nowrap
|
2016-01-24 00:03:43 +00:00
|
|
|
strong
|
|
|
|
|
color: inherit
|
2017-03-12 14:13:08 +00:00
|
|
|
.icon
|
|
|
|
|
&,
|
|
|
|
|
&.is-small,
|
|
|
|
|
&.is-medium,
|
|
|
|
|
&.is-large
|
|
|
|
|
height: 1.5em
|
|
|
|
|
width: 1.5em
|
|
|
|
|
&:first-child:not(:last-child)
|
2020-08-28 13:54:53 +02:00
|
|
|
+ltr-property("margin", calc(-1 / 2 * #{var(--button-padding-horizontal, #{$button-padding-horizontal})} - #{var(--button-border-width, #{$button-border-width})}), false)
|
|
|
|
|
+ltr-property("margin", calc(#{var(--button-padding-horizontal, #{$button-padding-horizontal})} / 4))
|
2017-03-12 14:13:08 +00:00
|
|
|
&:last-child:not(:first-child)
|
2020-08-28 13:54:53 +02:00
|
|
|
+ltr-property("margin", calc(#{var(--button-padding-horizontal, #{$button-padding-horizontal})} / 4), false)
|
|
|
|
|
+ltr-property("margin", calc(-1 / 2 * #{var(--button-padding-horizontal, #{$button-padding-horizontal})} - #{var(--button-border-width, #{$button-border-width})}))
|
2017-03-12 14:13:08 +00:00
|
|
|
&:first-child:last-child
|
2020-08-28 13:54:53 +02:00
|
|
|
margin-left: calc(-1 / 2 * #{var(--button-padding-horizontal, #{$button-padding-horizontal})} - #{var(--button-border-width, #{$button-border-width})})
|
|
|
|
|
margin-right: calc(-1 / 2 * #{var(--button-padding-horizontal, #{$button-padding-horizontal})} - #{var(--button-border-width, #{$button-border-width})})
|
2016-10-29 21:51:13 +01:00
|
|
|
// States
|
2016-05-30 19:41:54 +01:00
|
|
|
&:hover,
|
2016-10-29 21:51:13 +01:00
|
|
|
&.is-hovered
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: var(--button-hover-border-color)
|
|
|
|
|
color: var(--button-hover-color)
|
2016-05-30 19:41:54 +01:00
|
|
|
&:focus,
|
2016-10-29 21:51:13 +01:00
|
|
|
&.is-focused
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: var(--button-focus-border-color)
|
|
|
|
|
color: var(--button-focus-color)
|
2017-08-30 17:29:01 +01:00
|
|
|
&:not(:active)
|
2020-09-06 14:25:06 +01:00
|
|
|
box-shadow: var(--button-focus-box-shadow-size) var(--button-focus-box-shadow-color, #{$button-focus-box-shadow-color})
|
2016-10-29 21:51:13 +01:00
|
|
|
&:active,
|
2016-05-30 19:41:54 +01:00
|
|
|
&.is-active
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: var(--button-active-border-color)
|
|
|
|
|
color: var(--button-active-color)
|
2016-04-10 16:00:32 +01:00
|
|
|
// Colors
|
2017-10-07 20:52:39 +01:00
|
|
|
&.is-text
|
2016-10-29 21:51:13 +01:00
|
|
|
background-color: transparent
|
2016-10-30 10:41:53 +00:00
|
|
|
border-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--button-text-color)
|
|
|
|
|
text-decoration: var(--button-text-decoration)
|
2016-10-29 21:51:13 +01:00
|
|
|
&:hover,
|
|
|
|
|
&.is-hovered,
|
|
|
|
|
&:focus,
|
2017-08-30 17:29:01 +01:00
|
|
|
&.is-focused
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--button-text-hover-background-color)
|
|
|
|
|
color: var(--button-text-hover-color)
|
2016-10-29 21:51:13 +01:00
|
|
|
&:active,
|
|
|
|
|
&.is-active
|
2020-03-16 13:29:44 +11:00
|
|
|
background-color: bulmaDarken($button-text-hover-background-color, 5%)
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--button-text-hover-color)
|
2018-11-01 05:29:55 +11:00
|
|
|
&[disabled],
|
|
|
|
|
fieldset[disabled] &
|
2017-03-31 22:25:53 +01:00
|
|
|
background-color: transparent
|
|
|
|
|
border-color: transparent
|
|
|
|
|
box-shadow: none
|
2020-10-31 19:28:40 +00:00
|
|
|
&.is-ghost
|
|
|
|
|
background: $button-ghost-background
|
|
|
|
|
border-color: $button-ghost-border-color
|
|
|
|
|
color: $button-ghost-color
|
|
|
|
|
text-decoration: $button-ghost-decoration
|
|
|
|
|
&:hover,
|
|
|
|
|
&.is-hovered
|
|
|
|
|
color: $button-ghost-hover-color
|
|
|
|
|
text-decoration: $button-ghost-hover-decoration
|
2020-08-21 11:40:07 -04:00
|
|
|
@each $name, $pair in $button-colors
|
2016-01-24 00:03:43 +00:00
|
|
|
$color: nth($pair, 1)
|
|
|
|
|
$color-invert: nth($pair, 2)
|
|
|
|
|
&.is-#{$name}
|
2020-09-06 14:25:06 +01:00
|
|
|
--hover-background-l-delta: -2.5%
|
|
|
|
|
--hover-background-#{$name}-l: calc(#{var(--#{$name}-l)} + #{var(--hover-background-l-delta)})
|
|
|
|
|
--hover-background-color: hsla(var(--#{$name}-h), var(--#{$name}-s), var(--hover-background-#{$name}-l), var(--#{$name}-a))
|
|
|
|
|
--focus-box-shadow-color-hsla: hsla(var(--#{$name}-h), var(--#{$name}-s), var(--#{$name}-l), 0.25)
|
|
|
|
|
--focus-box-shadow-color: var(--focus-box-shadow-color-hsla, #{bulmaRgba($color, 0.25)})
|
|
|
|
|
--active-background-l-delta: -5%
|
|
|
|
|
--active-background-#{$name}-l: calc(#{var(--#{$name}-l)} + #{var(--active-background-l-delta)})
|
|
|
|
|
--active-background-color: hsla(var(--#{$name}-h), var(--#{$name}-s), var(--active-background-#{$name}-l), var(--#{$name}-a))
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--#{$name}, #{$color})
|
2016-10-30 10:41:53 +00:00
|
|
|
border-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}-invert, #{$color-invert})
|
2016-01-24 00:03:43 +00:00
|
|
|
&:hover,
|
2016-10-29 21:51:13 +01:00
|
|
|
&.is-hovered
|
2020-09-06 14:25:06 +01:00
|
|
|
background-color: var(--hover-background-color, #{bulmaDarken($color, 2.5%)})
|
2016-10-29 21:51:13 +01:00
|
|
|
border-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}-invert, #{$color-invert})
|
2016-05-30 19:41:54 +01:00
|
|
|
&:focus,
|
2016-10-29 21:51:13 +01:00
|
|
|
&.is-focused
|
|
|
|
|
border-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}-invert, #{$color-invert})
|
2017-08-30 17:29:01 +01:00
|
|
|
&:not(:active)
|
2020-09-06 14:25:06 +01:00
|
|
|
box-shadow: var(--button-focus-box-shadow-size) var(--focus-box-shadow-color)
|
2016-10-29 21:51:13 +01:00
|
|
|
&:active,
|
2016-05-30 19:41:54 +01:00
|
|
|
&.is-active
|
2020-09-06 14:25:06 +01:00
|
|
|
background-color: var(--active-background-color, #{bulmaDarken($color, 5%)})
|
2016-01-24 00:03:43 +00:00
|
|
|
border-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}-invert, #{$color-invert})
|
2018-11-01 05:29:55 +11:00
|
|
|
&[disabled],
|
|
|
|
|
fieldset[disabled] &
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--#{$name}, #{$color})
|
2017-03-31 22:25:53 +01:00
|
|
|
border-color: transparent
|
|
|
|
|
box-shadow: none
|
2016-01-24 00:03:43 +00:00
|
|
|
&.is-inverted
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--#{$name}-invert, #{$color-invert})
|
|
|
|
|
color: var(--#{$name}, #{$color})
|
2019-05-18 22:06:52 +01:00
|
|
|
&:hover,
|
|
|
|
|
&.is-hovered
|
2020-03-16 13:29:44 +11:00
|
|
|
background-color: bulmaDarken($color-invert, 5%)
|
2018-11-01 05:29:55 +11:00
|
|
|
&[disabled],
|
|
|
|
|
fieldset[disabled] &
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--#{$name}-invert, #{$color-invert})
|
2017-03-31 22:25:53 +01:00
|
|
|
border-color: transparent
|
|
|
|
|
box-shadow: none
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}, #{$color})
|
2016-04-10 16:00:32 +01:00
|
|
|
&.is-loading
|
2018-04-08 19:08:39 +01:00
|
|
|
&::after
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: transparent transparent var(--#{$name}-invert, #{$color-invert}) var(--#{$name}-invert, #{$color-invert}) !important
|
2016-04-10 16:00:32 +01:00
|
|
|
&.is-outlined
|
2016-06-29 23:59:48 +01:00
|
|
|
background-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: var(--#{$name}, #{$color})
|
|
|
|
|
color: var(--#{$name}, #{$color})
|
2016-04-10 16:00:32 +01:00
|
|
|
&:hover,
|
2019-05-18 22:06:52 +01:00
|
|
|
&.is-hovered,
|
|
|
|
|
&:focus,
|
|
|
|
|
&.is-focused
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--#{$name}, #{$color})
|
|
|
|
|
border-color: var(--#{$name}, #{$color})
|
|
|
|
|
color: var(--#{$name}-invert, #{$color-invert})
|
2017-01-17 04:45:21 +09:00
|
|
|
&.is-loading
|
2018-04-08 19:08:39 +01:00
|
|
|
&::after
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: transparent transparent var(--#{$name}, #{$color}) var(--#{$name}, #{$color}) !important
|
2019-05-18 22:06:52 +01:00
|
|
|
&:hover,
|
|
|
|
|
&.is-hovered,
|
|
|
|
|
&:focus,
|
|
|
|
|
&.is-focused
|
|
|
|
|
&::after
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: transparent transparent var(--#{$name}-invert, #{$color-invert}) var(--#{$name}-invert, #{$color-invert}) !important
|
2018-11-01 05:29:55 +11:00
|
|
|
&[disabled],
|
|
|
|
|
fieldset[disabled] &
|
2017-03-31 22:25:53 +01:00
|
|
|
background-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: var(--#{$name}, #{$color})
|
2017-03-31 22:25:53 +01:00
|
|
|
box-shadow: none
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}, #{$color})
|
2016-10-30 20:24:23 +00:00
|
|
|
&.is-inverted.is-outlined
|
|
|
|
|
background-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: var(--#{$name}-invert, #{$color-invert})
|
|
|
|
|
color: var(--#{$name}-invert, #{$color-invert})
|
2016-10-30 20:24:23 +00:00
|
|
|
&:hover,
|
2019-05-18 22:06:52 +01:00
|
|
|
&.is-hovered,
|
|
|
|
|
&:focus,
|
|
|
|
|
&.is-focused
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--#{$name}-invert, #{$color-invert})
|
|
|
|
|
color: var(--#{$name}, #{$color})
|
2019-05-18 22:06:52 +01:00
|
|
|
&.is-loading
|
|
|
|
|
&:hover,
|
|
|
|
|
&.is-hovered,
|
|
|
|
|
&:focus,
|
|
|
|
|
&.is-focused
|
|
|
|
|
&::after
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: transparent transparent var(--#{$name}, #{$color}) var(--#{$name}, #{$color}) !important
|
2018-11-01 05:29:55 +11:00
|
|
|
&[disabled],
|
|
|
|
|
fieldset[disabled] &
|
2017-03-31 22:25:53 +01:00
|
|
|
background-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
border-color: var(--#{$name}-invert, #{$color-invert})
|
2017-03-31 22:25:53 +01:00
|
|
|
box-shadow: none
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}-invert, #{$color-invert})
|
2019-10-13 15:12:30 +01:00
|
|
|
// If light and dark colors are provided
|
2019-10-13 18:51:12 +01:00
|
|
|
@if length($pair) >= 4
|
2019-10-13 15:12:30 +01:00
|
|
|
$color-light: nth($pair, 3)
|
|
|
|
|
$color-dark: nth($pair, 4)
|
|
|
|
|
&.is-light
|
2020-09-06 14:25:06 +01:00
|
|
|
--hover-background-l-delta: -2.5%
|
|
|
|
|
--hover-background-#{$name}-l: calc(#{var(--#{$name}-light-l)} + #{var(--hover-background-l-delta)})
|
|
|
|
|
--hover-background-color: hsla(var(--#{$name}-h), var(--#{$name}-s), var(--hover-background-#{$name}-l), var(--#{$name}-a))
|
|
|
|
|
--active-background-l-delta: -5%
|
|
|
|
|
--active-background-#{$name}-l: calc(#{var(--#{$name}-light-l)} + #{var(--active-background-l-delta)})
|
|
|
|
|
--active-background-color: hsla(var(--#{$name}-h), var(--#{$name}-s), var(--active-background-#{$name}-l), var(--#{$name}-a))
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--#{$name}-light, #{$color-light})
|
|
|
|
|
color: var(--#{$name}-dark, #{$color-dark})
|
2019-10-13 15:12:30 +01:00
|
|
|
&:hover,
|
|
|
|
|
&.is-hovered
|
2020-09-06 14:25:06 +01:00
|
|
|
background-color: var(--hover-background-color, #{bulmaDarken($color-light, 2.5%)})
|
2019-10-13 15:12:30 +01:00
|
|
|
border-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}-dark, #{$color-dark})
|
2019-10-13 15:12:30 +01:00
|
|
|
&:active,
|
|
|
|
|
&.is-active
|
2020-09-06 14:25:06 +01:00
|
|
|
background-color: var(--active-background-color, #{bulmaDarken($color-light, 5%)})
|
2019-10-13 15:12:30 +01:00
|
|
|
border-color: transparent
|
2020-08-28 13:54:53 +02:00
|
|
|
color: var(--#{$name}-dark, #{$color-dark})
|
2016-04-10 16:00:32 +01:00
|
|
|
// Sizes
|
2016-01-24 00:03:43 +00:00
|
|
|
&.is-small
|
|
|
|
|
+button-small
|
2018-10-31 19:22:21 +00:00
|
|
|
&.is-normal
|
|
|
|
|
+button-normal
|
2016-01-24 00:03:43 +00:00
|
|
|
&.is-medium
|
|
|
|
|
+button-medium
|
|
|
|
|
&.is-large
|
|
|
|
|
+button-large
|
2016-04-10 16:00:32 +01:00
|
|
|
// Modifiers
|
2018-11-01 05:29:55 +11:00
|
|
|
&[disabled],
|
|
|
|
|
fieldset[disabled] &
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--button-disabled-background-color)
|
|
|
|
|
border-color: var(--button-disabled-border-color)
|
|
|
|
|
box-shadow: var(--button-disabled-shadow)
|
|
|
|
|
opacity: var(--button-disabled-opacity)
|
2016-01-26 00:02:38 +00:00
|
|
|
&.is-fullwidth
|
2016-05-29 13:16:09 +01:00
|
|
|
display: flex
|
2016-01-26 00:02:38 +00:00
|
|
|
width: 100%
|
2016-01-24 00:03:43 +00:00
|
|
|
&.is-loading
|
2016-05-07 14:58:13 +03:00
|
|
|
color: transparent !important
|
2016-01-24 00:03:43 +00:00
|
|
|
pointer-events: none
|
2018-04-08 19:08:39 +01:00
|
|
|
&::after
|
2018-09-04 15:24:50 +02:00
|
|
|
@extend %loader
|
2017-03-12 17:49:24 +00:00
|
|
|
+center(1em)
|
2016-01-24 00:03:43 +00:00
|
|
|
position: absolute !important
|
2017-05-28 16:07:29 +01:00
|
|
|
&.is-static
|
2020-08-28 13:54:53 +02:00
|
|
|
background-color: var(--button-static-background-color)
|
|
|
|
|
border-color: var(--button-static-border-color)
|
|
|
|
|
color: var(--button-static-color)
|
2017-05-28 16:07:29 +01:00
|
|
|
box-shadow: none
|
|
|
|
|
pointer-events: none
|
2017-12-04 14:21:38 +01:00
|
|
|
&.is-rounded
|
2020-08-28 13:54:53 +02:00
|
|
|
border-radius: var(--radius-rounded, #{$radius-rounded})
|
|
|
|
|
padding-left: calc(#{var(--button-padding-horizontal, #{$button-padding-horizontal})} + 0.25em)
|
|
|
|
|
padding-right: calc(#{var(--button-padding-horizontal, #{$button-padding-horizontal})} + 0.25em)
|
2017-10-17 11:53:44 +01:00
|
|
|
|
|
|
|
|
.buttons
|
|
|
|
|
align-items: center
|
|
|
|
|
display: flex
|
|
|
|
|
flex-wrap: wrap
|
|
|
|
|
justify-content: flex-start
|
|
|
|
|
.button
|
|
|
|
|
margin-bottom: 0.5rem
|
2018-10-02 06:51:11 +01:00
|
|
|
&:not(:last-child):not(.is-fullwidth)
|
2020-01-22 09:14:04 +00:00
|
|
|
+ltr-property("margin", 0.5rem)
|
2017-10-17 11:53:44 +01:00
|
|
|
&:last-child
|
|
|
|
|
margin-bottom: -0.5rem
|
|
|
|
|
&:not(:last-child)
|
|
|
|
|
margin-bottom: 1rem
|
2018-10-31 19:57:58 +01:00
|
|
|
// Sizes
|
|
|
|
|
&.are-small
|
2018-10-31 19:22:21 +00:00
|
|
|
.button:not(.is-normal):not(.is-medium):not(.is-large)
|
2018-10-31 19:57:58 +01:00
|
|
|
+button-small
|
|
|
|
|
&.are-medium
|
2018-10-31 19:22:21 +00:00
|
|
|
.button:not(.is-small):not(.is-normal):not(.is-large)
|
2018-10-31 19:57:58 +01:00
|
|
|
+button-medium
|
|
|
|
|
&.are-large
|
2018-10-31 19:22:21 +00:00
|
|
|
.button:not(.is-small):not(.is-normal):not(.is-medium)
|
|
|
|
|
+button-large
|
2017-10-17 11:53:44 +01:00
|
|
|
&.has-addons
|
|
|
|
|
.button
|
|
|
|
|
&:not(:first-child)
|
|
|
|
|
border-bottom-left-radius: 0
|
|
|
|
|
border-top-left-radius: 0
|
|
|
|
|
&:not(:last-child)
|
|
|
|
|
border-bottom-right-radius: 0
|
|
|
|
|
border-top-right-radius: 0
|
2020-05-17 19:38:47 +01:00
|
|
|
+ltr-property("margin", -1px)
|
2017-10-17 11:53:44 +01:00
|
|
|
&:last-child
|
2020-05-17 19:38:47 +01:00
|
|
|
+ltr-property("margin", 0)
|
2017-10-17 11:53:44 +01:00
|
|
|
&:hover,
|
|
|
|
|
&.is-hovered
|
|
|
|
|
z-index: 2
|
|
|
|
|
&:focus,
|
|
|
|
|
&.is-focused,
|
|
|
|
|
&:active,
|
|
|
|
|
&.is-active,
|
|
|
|
|
&.is-selected
|
|
|
|
|
z-index: 3
|
|
|
|
|
&:hover
|
|
|
|
|
z-index: 4
|
2018-02-18 15:28:28 +11:00
|
|
|
&.is-expanded
|
|
|
|
|
flex-grow: 1
|
2019-05-17 13:50:39 +01:00
|
|
|
flex-shrink: 1
|
2017-10-17 11:53:44 +01:00
|
|
|
&.is-centered
|
|
|
|
|
justify-content: center
|
2019-05-17 13:50:39 +01:00
|
|
|
&:not(.has-addons)
|
2019-05-17 03:56:58 -06:00
|
|
|
.button:not(.is-fullwidth)
|
|
|
|
|
margin-left: 0.25rem
|
|
|
|
|
margin-right: 0.25rem
|
2017-10-17 11:53:44 +01:00
|
|
|
&.is-right
|
|
|
|
|
justify-content: flex-end
|
2019-05-17 13:50:39 +01:00
|
|
|
&:not(.has-addons)
|
2019-05-17 03:56:58 -06:00
|
|
|
.button:not(.is-fullwidth)
|
|
|
|
|
margin-left: 0.25rem
|
|
|
|
|
margin-right: 0.25rem
|