Skip to content

Commit fc841b0

Browse files
MartijnCuppensmdo
authored andcommitted
#27135: themed link focus state & selector improvement (#27136)
1 parent 9d3930b commit fc841b0

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

scss/_badge.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
white-space: nowrap;
1414
vertical-align: baseline;
1515
@include border-radius($badge-border-radius);
16+
@include transition($badge-transition);
1617

1718
@at-root a#{&} {
1819
@include hover-focus {

scss/_variables.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,9 @@ $badge-padding-y: .25em !default;
892892
$badge-padding-x: .4em !default;
893893
$badge-border-radius: $border-radius !default;
894894

895+
$badge-transition: $btn-transition !default;
896+
$badge-focus-width: $input-btn-focus-width !default;
897+
895898
$badge-pill-padding-x: .6em !default;
896899
// Use a higher than normal value to ensure completely rounded edges when
897900
// customizing padding or font-size on labels.

scss/mixins/_badge.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@
77
color: color-yiq($bg);
88
background-color: darken($bg, 10%);
99
}
10+
11+
&:focus,
12+
&.focus {
13+
outline: 0;
14+
box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
15+
}
1016
}
1117
}

0 commit comments

Comments
 (0)