Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/stylesheets/bootstrap/_buttons.scss')
-rw-r--r--assets/stylesheets/bootstrap/_buttons.scss31
1 files changed, 23 insertions, 8 deletions
diff --git a/assets/stylesheets/bootstrap/_buttons.scss b/assets/stylesheets/bootstrap/_buttons.scss
index 044b8d6..c2d0773 100644
--- a/assets/stylesheets/bootstrap/_buttons.scss
+++ b/assets/stylesheets/bootstrap/_buttons.scss
@@ -15,6 +15,7 @@
--#{$prefix}btn-border-width: #{$btn-border-width};
--#{$prefix}btn-border-color: transparent;
--#{$prefix}btn-border-radius: #{$btn-border-radius};
+ --#{$prefix}btn-hover-border-color: transparent;
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
--#{$prefix}btn-disabled-opacity: #{$btn-disabled-opacity};
--#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);
@@ -39,15 +40,15 @@
@include box-shadow(var(--#{$prefix}btn-box-shadow));
@include transition($btn-transition);
- &:hover {
+ :not(.btn-check) + &:hover,
+ &:first-child:hover {
color: var(--#{$prefix}btn-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
background-color: var(--#{$prefix}btn-hover-bg);
border-color: var(--#{$prefix}btn-hover-border-color);
}
- .btn-check:focus + &,
- &:focus {
+ &:focus-visible {
color: var(--#{$prefix}btn-hover-color);
@include gradient-bg(var(--#{$prefix}btn-hover-bg));
border-color: var(--#{$prefix}btn-hover-border-color);
@@ -60,9 +61,20 @@
}
}
+ .btn-check:focus-visible + & {
+ border-color: var(--#{$prefix}btn-hover-border-color);
+ outline: 0;
+ // Avoid using mixin so we can pass custom focus shadow properly
+ @if $enable-shadows {
+ box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
+ } @else {
+ box-shadow: var(--#{$prefix}btn-focus-box-shadow);
+ }
+ }
+
.btn-check:checked + &,
- .btn-check:active + &,
- &:active,
+ :not(.btn-check) + &:active,
+ &:first-child:active,
&.active,
&.show {
color: var(--#{$prefix}btn-active-color);
@@ -72,7 +84,7 @@
border-color: var(--#{$prefix}btn-active-border-color);
@include box-shadow(var(--#{$prefix}btn-active-shadow));
- &:focus {
+ &:focus-visible {
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: var(--#{$prefix}btn-active-shadow), var(--#{$prefix}btn-focus-box-shadow);
@@ -155,13 +167,16 @@
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix(color-contrast($primary), $primary, 15%))};
text-decoration: $link-decoration;
+ @if $enable-gradients {
+ background-image: none;
+ }
&:hover,
- &:focus {
+ &:focus-visible {
text-decoration: $link-hover-decoration;
}
- &:focus {
+ &:focus-visible {
color: var(--#{$prefix}btn-color);
}