/// @type Number
$button-hollow-border-width: 1px !default;
-/// Border width for hollow outline buttons
-/// @type Number
-$button-clear-border-width: 1px !default;
-
/// Sizes for buttons.
/// @type Map
$button-sizes: (
/// @type Number
$button-hollow-hover-lightness: -50% !default;
-/// Color lightness on hover for clear buttons.
-/// @type Number
-$button-clear-hover-lightness: -50% !default;
-
// Internal: flip from margin-right to margin-left for defaults
@if $global-text-direction == 'rtl' {
$button-margin: 0 0 $global-margin $global-margin !default;
}
}
-/// Removes background fill on hover and focus for hollow buttons.
-@mixin button-clear {
- &,
- &:hover, &:focus {
- background-color: transparent;
- }
-}
-
-@mixin button-clear-style(
- $color: $primary-color,
- $hover-lightness: $button-clear-hover-lightness,
- $border-width: $button-clear-border-width
-) {
- $color-hover: scale-color($color, $lightness: $hover-lightness);
-
- border: $border-width solid transparent;
- color: $color;
-
- &:hover, &:focus {
- border-color: transparent;
- color: $color-hover;
- }
-}
-
/// Adds disabled styles to a button by fading the element, reseting the cursor, and disabling pointer events.
/// @param [Color] $background [$button-background] - Background color of the disabled button.
/// @param [Color] $color [$button-color] - Text color of the disabled button. Set to `auto` to have the mixin automatically generate a color based on the background color.
// Clear style
@if $button-fill != clear {
&.clear {
- @include button-clear;
- @include button-clear-style;
+ @include button-hollow;
+ @include button-hollow-style;
+
+ &, &:hover, &:focus {
+ &, &.disabled, &[disabled] {
+ border-color: transparent;
+ }
+ }
@each $name, $color in $button-palette {
&.#{$name} {
- @include button-clear-style($color);
+ @include button-hollow-style($color);
+
+ &, &:hover, &:focus {
+ &, &.disabled, &[disabled] {
+ border-color: transparent;
+ }
+ }
}
}
}