2017-09-19 14:47:10 +00:00
|
|
|
$button-box-shadow-standard: 0 2px 0 0 rgba($grey, 0.2);
|
|
|
|
|
|
|
|
.button {
|
|
|
|
font-weight: $weight-bold;
|
|
|
|
box-shadow: $button-box-shadow-standard;
|
|
|
|
border: 1px solid transparent;
|
2017-11-15 17:13:17 +00:00
|
|
|
text-decoration: none;
|
2017-09-19 14:47:10 +00:00
|
|
|
|
2017-11-15 20:44:32 +00:00
|
|
|
&:hover,
|
|
|
|
&.is-hovered {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
&:active,
|
|
|
|
&.is-active,
|
|
|
|
&:focus,
|
|
|
|
&.is-focused {
|
|
|
|
box-shadow: $button-box-shadow-standard;
|
2017-11-15 20:44:32 +00:00
|
|
|
text-decoration: none;
|
2017-09-19 14:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-inverted.is-outlined {
|
|
|
|
box-shadow: none;
|
2017-11-15 20:44:32 +00:00
|
|
|
background: transparent;
|
2017-09-19 14:47:10 +00:00
|
|
|
}
|
|
|
|
|
2018-01-26 22:56:23 +00:00
|
|
|
&.is-inline {
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
&.is-compact {
|
|
|
|
padding: 0.25em 0.75em;
|
2019-08-08 22:41:47 +00:00
|
|
|
margin: -0.25em 0;
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
&.pull-right {
|
|
|
|
margin-right: -1em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-15 17:14:32 +00:00
|
|
|
&.is-borderless {
|
|
|
|
border: 0;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
2020-01-29 18:50:14 +00:00
|
|
|
&.is-disabled {
|
|
|
|
opacity: 0.7;
|
|
|
|
box-shadow: none;
|
|
|
|
cursor: not-allowed;
|
|
|
|
border-color: transparent;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-17 07:17:15 +00:00
|
|
|
&.is-xsmall {
|
|
|
|
padding-top: 0;
|
|
|
|
padding-bottom: 0;
|
|
|
|
font-size: $size-7;
|
|
|
|
}
|
|
|
|
|
2017-09-19 14:47:10 +00:00
|
|
|
@each $name, $pair in $colors {
|
|
|
|
$color: nth($pair, 1);
|
|
|
|
$color-invert: nth($pair, 2);
|
|
|
|
|
|
|
|
&.is-#{$name} {
|
|
|
|
border-color: darken($color, 10%);
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&.is-hovered {
|
|
|
|
background-color: lighten($color, 5%);
|
|
|
|
border-color: darken($color, 10%);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.is-active {
|
|
|
|
background-color: darken($color, 5%);
|
|
|
|
border-color: darken($color, 10%);
|
|
|
|
box-shadow: $button-box-shadow-standard;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus,
|
|
|
|
&.is-focused {
|
|
|
|
border-color: darken($color, 10%);
|
|
|
|
box-shadow: $button-box-shadow-standard;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-outlined {
|
|
|
|
border-color: $grey-lighter;
|
2019-11-19 08:12:16 +00:00
|
|
|
background-color: $white;
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
&.is-important {
|
|
|
|
border-color: $color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&.is-hovered,
|
|
|
|
&:focus,
|
|
|
|
&.is-focused {
|
2019-11-19 08:12:16 +00:00
|
|
|
background-color: $white;
|
2017-09-19 14:47:10 +00:00
|
|
|
border-color: darken($color, 10%);
|
|
|
|
color: $color;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.is-active {
|
2019-11-19 08:12:16 +00:00
|
|
|
background-color: $white;
|
2017-09-19 14:47:10 +00:00
|
|
|
border-color: darken($color, 10%);
|
|
|
|
color: darken($color, 10%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.is-inverted.is-outlined {
|
|
|
|
border-color: rgba($color-invert, 0.5);
|
|
|
|
color: rgba($color-invert, 0.9);
|
2019-11-19 08:12:16 +00:00
|
|
|
background-color: transparent;
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&.is-hovered,
|
|
|
|
&:focus,
|
|
|
|
&.is-focused {
|
|
|
|
background-color: transparent;
|
|
|
|
border-color: $color-invert;
|
|
|
|
color: $color-invert;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active,
|
|
|
|
&.is-active {
|
2017-11-15 20:44:32 +00:00
|
|
|
background-color: rgba($color-invert, 0.1);
|
2017-09-19 14:47:10 +00:00
|
|
|
border-color: $color-invert;
|
|
|
|
color: $color-invert;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
2020-01-29 18:50:14 +00:00
|
|
|
|
|
|
|
// The is-disabled styles MUST trump other modifier specificites
|
|
|
|
&.is-disabled {
|
|
|
|
background-color: $color;
|
|
|
|
border-color: darken($color, 5%);
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&:active,
|
|
|
|
&:focus,
|
|
|
|
&.is-hovered,
|
|
|
|
&.is-active,
|
|
|
|
&.is-focused {
|
|
|
|
background-color: $color;
|
|
|
|
border-color: darken($color, 5%);
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
2017-09-19 14:47:10 +00:00
|
|
|
}
|
|
|
|
}
|
2017-11-15 20:44:32 +00:00
|
|
|
|
|
|
|
// When an icon in a button should be treated like text,
|
|
|
|
// override the default Bulma behavior
|
|
|
|
.icon.is-text {
|
|
|
|
&:first-child:not(:last-child) {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
&:last-child:not(:first-child) {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
&:first-child:last-child {
|
|
|
|
margin-left: 0;
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2017-09-19 14:47:10 +00:00
|
|
|
}
|