Skip to content

Commit 8cb60bf

Browse files
Use box-shadow mixin for .btn (#30512)
Co-authored-by: Martijn Cuppens <[email protected]>
1 parent 939beea commit 8cb60bf

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

scss/mixins/_buttons.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
color: $hover-color;
3131
@include gradient-bg($hover-background);
3232
border-color: $hover-border;
33-
// Avoid using mixin so we can pass custom focus shadow properly
3433
@if $enable-shadows {
35-
box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
34+
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
3635
} @else {
36+
// Avoid using mixin so we can pass custom focus shadow properly
3737
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
3838
}
3939
}
@@ -48,10 +48,10 @@
4848
border-color: $active-border;
4949

5050
&:focus {
51-
// Avoid using mixin so we can pass custom focus shadow properly
52-
@if $enable-shadows and $btn-active-box-shadow != none {
53-
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
51+
@if $enable-shadows {
52+
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
5453
} @else {
54+
// Avoid using mixin so we can pass custom focus shadow properly
5555
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
5656
}
5757
}
@@ -96,10 +96,10 @@
9696
border-color: $active-border;
9797

9898
&:focus {
99-
// Avoid using mixin so we can pass custom focus shadow properly
100-
@if $enable-shadows and $btn-active-box-shadow != none {
101-
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
99+
@if $enable-shadows {
100+
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
102101
} @else {
102+
// Avoid using mixin so we can pass custom focus shadow properly
103103
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
104104
}
105105
}

0 commit comments

Comments
 (0)