diff options
Diffstat (limited to 'vendor/twbs/bootstrap/scss/mixins/_buttons.scss')
-rw-r--r-- | vendor/twbs/bootstrap/scss/mixins/_buttons.scss | 127 |
1 files changed, 32 insertions, 95 deletions
diff --git a/vendor/twbs/bootstrap/scss/mixins/_buttons.scss b/vendor/twbs/bootstrap/scss/mixins/_buttons.scss index b67499668..cf087fda7 100644 --- a/vendor/twbs/bootstrap/scss/mixins/_buttons.scss +++ b/vendor/twbs/bootstrap/scss/mixins/_buttons.scss @@ -18,59 +18,20 @@ $disabled-border: $border, $disabled-color: color-contrast($disabled-background) ) { - color: $color; - @include gradient-bg($background); - border-color: $border; - @include box-shadow($btn-box-shadow); - - &:hover { - color: $hover-color; - @include gradient-bg($hover-background); - border-color: $hover-border; - } - - .btn-check:focus + &, - &:focus { - color: $hover-color; - @include 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, $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, $border, 15%), .5); - } - } - - .btn-check:checked + &, - .btn-check:active + &, - &:active, - &.active, - .show > &.dropdown-toggle { - color: $active-color; - background-color: $active-background; - // Remove CSS gradients if they're enabled - background-image: if($enable-gradients, none, null); - border-color: $active-border; - - &:focus { - @if $enable-shadows { - @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $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, $border, 15%), .5); - } - } - } - - &:disabled, - &.disabled { - color: $disabled-color; - background-color: $disabled-background; - // Remove CSS gradients if they're enabled - background-image: if($enable-gradients, none, null); - border-color: $disabled-border; - } + --#{$prefix}btn-color: #{$color}; + --#{$prefix}btn-bg: #{$background}; + --#{$prefix}btn-border-color: #{$border}; + --#{$prefix}btn-hover-color: #{$hover-color}; + --#{$prefix}btn-hover-bg: #{$hover-background}; + --#{$prefix}btn-hover-border-color: #{$hover-border}; + --#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix($color, $border, 15%))}; + --#{$prefix}btn-active-color: #{$active-color}; + --#{$prefix}btn-active-bg: #{$active-background}; + --#{$prefix}btn-active-border-color: #{$active-border}; + --#{$prefix}btn-active-shadow: #{$btn-active-box-shadow}; + --#{$prefix}btn-disabled-color: #{$disabled-color}; + --#{$prefix}btn-disabled-bg: #{$disabled-background}; + --#{$prefix}btn-disabled-border-color: #{$disabled-border}; } // scss-docs-end btn-variant-mixin @@ -82,52 +43,28 @@ $active-border: $color, $active-color: color-contrast($active-background) ) { - color: $color; - border-color: $color; - - &:hover { - color: $color-hover; - background-color: $active-background; - border-color: $active-border; - } - - .btn-check:focus + &, - &:focus { - box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); - } - - .btn-check:checked + &, - .btn-check:active + &, - &:active, - &.active, - &.dropdown-toggle.show { - color: $active-color; - background-color: $active-background; - border-color: $active-border; - - &:focus { - @if $enable-shadows { - @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5)); - } @else { - // Avoid using mixin so we can pass custom focus shadow properly - box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); - } - } - } - - &:disabled, - &.disabled { - color: $color; - background-color: transparent; - } + --#{$prefix}btn-color: #{$color}; + --#{$prefix}btn-border-color: #{$color}; + --#{$prefix}btn-hover-color: #{$color-hover}; + --#{$prefix}btn-hover-bg: #{$active-background}; + --#{$prefix}btn-hover-border-color: #{$active-border}; + --#{$prefix}btn-focus-shadow-rgb: #{to-rgb($color)}; + --#{$prefix}btn-active-color: #{$active-color}; + --#{$prefix}btn-active-bg: #{$active-background}; + --#{$prefix}btn-active-border-color: #{$active-border}; + --#{$prefix}btn-active-shadow: #{$btn-active-box-shadow}; + --#{$prefix}btn-disabled-color: #{$color}; + --#{$prefix}btn-disabled-bg: transparent; + --#{$prefix}btn-disabled-border-color: #{$color}; + --#{$prefix}gradient: none; } // scss-docs-end btn-outline-variant-mixin // scss-docs-start btn-size-mixin @mixin button-size($padding-y, $padding-x, $font-size, $border-radius) { - padding: $padding-y $padding-x; - @include font-size($font-size); - // Manually declare to provide an override to the browser default - @include border-radius($border-radius, 0); + --#{$prefix}btn-padding-y: #{$padding-y}; + --#{$prefix}btn-padding-x: #{$padding-x}; + @include rfs($font-size, --#{$prefix}btn-font-size); + --#{$prefix}btn-border-radius: #{$border-radius}; } // scss-docs-end btn-size-mixin |