|
|
@@ -1,104 +0,0 @@
|
|
|
-@use '../../bootstrap/init' as bs;
|
|
|
-@use '../hsl-functions' as hsl;
|
|
|
-
|
|
|
-// @mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
|
|
|
-@mixin button-variant($background, $border, $hover-background-darken-degrees: 7.5%, $hover-border-darken-degrees: 10%, $active-background-darken-degrees: 10%, $active-border-darken-degrees: 12.5%) {
|
|
|
- $hover-background: hsl.darken($background, $hover-background-darken-degrees); // DO NOT ... twice
|
|
|
- $hover-border: hsl.darken($border, $hover-border-darken-degrees); // DO NOT ... twice
|
|
|
-
|
|
|
- color: hsl.contrast($background);
|
|
|
- @include bs.gradient-bg($background);
|
|
|
- border-color: $border;
|
|
|
- // @include box-shadow($btn-box-shadow);
|
|
|
-
|
|
|
- @include bs.hover() {
|
|
|
- color: hsl.contrast($background);
|
|
|
- @include bs.gradient-bg($hover-background);
|
|
|
- border-color: $hover-border;
|
|
|
- }
|
|
|
-
|
|
|
- &:focus,
|
|
|
- &.focus {
|
|
|
- color: hsl.contrast($background);
|
|
|
- @include bs.gradient-bg($hover-background);
|
|
|
- border-color: $hover-border;
|
|
|
- // @if $enable-shadows {
|
|
|
- // @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
|
|
|
- // } @else {
|
|
|
- // // Avoid using mixin so we can pass custom focus shadow properly
|
|
|
- // box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
|
|
- // }
|
|
|
- }
|
|
|
-
|
|
|
- // // Disabled comes first so active can properly restyle
|
|
|
- &.disabled,
|
|
|
- &:disabled {
|
|
|
- color: hsl.contrast($background);
|
|
|
- background-color: $background;
|
|
|
- border-color: $border;
|
|
|
- // Remove CSS gradients if they're enabled
|
|
|
- @if bs.$enable-gradients {
|
|
|
- background-image: none;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // &:not(:disabled):not(.disabled):active,
|
|
|
- // &:not(:disabled):not(.disabled).active,
|
|
|
- // .show > &.dropdown-toggle {
|
|
|
- // color: color-yiq($active-background);
|
|
|
- // background-color: $active-background;
|
|
|
- // @if $enable-gradients {
|
|
|
- // background-image: none; // Remove the gradient for the pressed/active state
|
|
|
- // }
|
|
|
- // border-color: $active-border;
|
|
|
-
|
|
|
- // &:focus {
|
|
|
- // // @if $enable-shadows and $btn-active-box-shadow != none {
|
|
|
- // // @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
|
|
|
- // // } @else {
|
|
|
- // // // Avoid using mixin so we can pass custom focus shadow properly
|
|
|
- // // box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
|
|
- // // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-}
|
|
|
-
|
|
|
-// @mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
|
|
|
-@mixin button-outline-variant($color, $color-hover: hsl.contrast($color), $active-background: $color, $active-border: $color) {
|
|
|
- color: $color;
|
|
|
- border-color: $color;
|
|
|
-
|
|
|
- @include bs.hover() {
|
|
|
- color: $color-hover;
|
|
|
- background-color: $active-background;
|
|
|
- border-color: $active-border;
|
|
|
- }
|
|
|
-
|
|
|
- // &:focus,
|
|
|
- // &.focus {
|
|
|
- // box-shadow: 0 0 0 bs.$btn-focus-width hsl.alpha($color,50%);
|
|
|
- // }
|
|
|
-
|
|
|
- &.disabled,
|
|
|
- &:disabled {
|
|
|
- color: $color;
|
|
|
- background-color: transparent;
|
|
|
- }
|
|
|
-
|
|
|
- // &:not(:disabled):not(.disabled):active,
|
|
|
- // &:not(:disabled):not(.disabled).active,
|
|
|
- // .show > &.dropdown-toggle {
|
|
|
- // color: hsl.contrast($active-background);
|
|
|
- // background-color: $active-background;
|
|
|
- // border-color: $active-border;
|
|
|
-
|
|
|
- // &:focus {
|
|
|
- // @if $enable-shadows and $btn-active-box-shadow != none {
|
|
|
- // @include bs.box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width hsl.alpha($color,50%));
|
|
|
- // } @else {
|
|
|
- // // Avoid using mixin so we can pass custom focus shadow properly
|
|
|
- // box-shadow: 0 0 0 $btn-focus-width hsl.alpha($color,50%);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-}
|