@include transition($badge-transition);
@at-root a#{&} {
- @include hover-focus {
+ @include hover-focus() {
text-decoration: none;
}
}
// Bring the hover, focused, and "active" buttons to the front to overlay
// the borders properly
- @include hover {
+ @include hover() {
z-index: 1;
}
&:focus,
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
@include transition($btn-transition);
- @include hover {
+ @include hover() {
color: $body-color;
text-decoration: none;
}
color: $link-color;
text-decoration: $link-decoration;
- @include hover {
+ @include hover() {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
}
.card-link {
- @include hover {
+ @include hover() {
text-decoration: none;
}
@include transition($carousel-control-transition);
// Hover/focus state
- @include hover-focus {
+ @include hover-focus() {
color: $carousel-control-color;
text-decoration: none;
outline: 0;
opacity: .5;
// Override <a>'s hover style
- @include hover {
+ @include hover() {
color: $close-color;
text-decoration: none;
}
&:not(:disabled):not(.disabled) {
- @include hover-focus {
+ @include hover-focus() {
opacity: .75;
}
}
}
}
- @include hover-focus {
+ @include hover-focus() {
color: $dropdown-link-hover-color;
text-decoration: none;
@include gradient-bg($dropdown-link-hover-bg);
text-align: inherit; // For `<button>`s (anchors inherit)
// Hover state
- @include hover-focus {
+ @include hover-focus() {
z-index: 1; // Place hover/focus items above their siblings for proper border styling
color: $list-group-action-hover-color;
text-decoration: none;
display: block;
padding: $nav-link-padding-y $nav-link-padding-x;
- @include hover-focus {
+ @include hover-focus() {
text-decoration: none;
}
border: $nav-tabs-border-width solid transparent;
@include border-top-radius($nav-tabs-border-radius);
- @include hover-focus {
+ @include hover-focus() {
border-color: $nav-tabs-link-hover-border-color;
}
line-height: inherit;
white-space: nowrap;
- @include hover-focus {
+ @include hover-focus() {
text-decoration: none;
}
}
border: $border-width solid transparent; // remove default button style
@include border-radius($navbar-toggler-border-radius);
- @include hover-focus {
+ @include hover-focus() {
text-decoration: none;
}
}
.navbar-brand {
color: $navbar-light-brand-color;
- @include hover-focus {
+ @include hover-focus() {
color: $navbar-light-brand-hover-color;
}
}
.nav-link {
color: $navbar-light-color;
- @include hover-focus {
+ @include hover-focus() {
color: $navbar-light-hover-color;
}
a {
color: $navbar-light-active-color;
- @include hover-focus {
+ @include hover-focus() {
color: $navbar-light-active-color;
}
}
.navbar-brand {
color: $navbar-dark-brand-color;
- @include hover-focus {
+ @include hover-focus() {
color: $navbar-dark-brand-hover-color;
}
}
.nav-link {
color: $navbar-dark-color;
- @include hover-focus {
+ @include hover-focus() {
color: $navbar-dark-hover-color;
}
a {
color: $navbar-dark-active-color;
- @include hover-focus {
+ @include hover-focus() {
color: $navbar-dark-active-color;
}
}
text-decoration: $link-decoration;
background-color: transparent; // Remove the gray background on active links in IE 10.
- @include hover {
+ @include hover() {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
color: inherit;
text-decoration: none;
- @include hover-focus {
+ @include hover-focus() {
color: inherit;
text-decoration: none;
}
.table-hover {
tbody tr {
- @include hover {
+ @include hover() {
color: $table-hover-color;
background-color: $table-hover-bg;
}
&.table-hover {
tbody tr {
- @include hover {
+ @include hover() {
color: $table-dark-hover-color;
background-color: $table-dark-hover-bg;
}
}
a#{$parent},
button#{$parent} {
- @include hover-focus {
+ @include hover-focus() {
background-color: darken($color, 10%) !important;
}
}
background-color: $bg;
@at-root a#{&} {
- @include hover-focus {
+ @include hover-focus() {
color: color-yiq($bg);
background-color: darken($bg, 10%);
}
border-color: $border;
@include box-shadow($btn-box-shadow);
- @include hover {
+ @include hover() {
color: color-yiq($hover-background);
@include gradient-bg($hover-background);
border-color: $hover-border;
color: $color;
border-color: $color;
- @include hover {
+ @include hover() {
color: $color-hover;
background-color: $active-background;
border-color: $active-border;
-@mixin caret-down {
+@mixin caret-down() {
border-top: $caret-width solid;
border-right: $caret-width solid transparent;
border-bottom: 0;
border-left: $caret-width solid transparent;
}
-@mixin caret-up {
+@mixin caret-up() {
border-top: 0;
border-right: $caret-width solid transparent;
border-bottom: $caret-width solid;
border-left: $caret-width solid transparent;
}
-@mixin caret-right {
+@mixin caret-right() {
border-top: $caret-width solid transparent;
border-right: 0;
border-bottom: $caret-width solid transparent;
border-left: $caret-width solid;
}
-@mixin caret-left {
+@mixin caret-left() {
border-top: $caret-width solid transparent;
border-right: $caret-width solid;
border-bottom: $caret-width solid transparent;
// stylelint-disable declaration-no-important
-@mixin float-left {
+@mixin float-left() {
float: left !important;
@include deprecate("The `float-left` mixin", "v4.3.0", "v5");
}
-@mixin float-right {
+@mixin float-right() {
float: right !important;
@include deprecate("The `float-right` mixin", "v4.3.0", "v5");
}
-@mixin float-none {
+@mixin float-none() {
float: none !important;
@include deprecate("The `float-none` mixin", "v4.3.0", "v5");
}
//
// Issue: https://github.com/twbs/bootstrap/issues/25195
-@mixin hover {
+@mixin hover() {
&:hover { @content; }
}
-@mixin hover-focus {
+@mixin hover-focus() {
&:hover,
&:focus {
@content;
}
}
-@mixin plain-hover-focus {
+@mixin plain-hover-focus() {
&,
&:hover,
&:focus {
}
}
-@mixin hover-focus-active {
+@mixin hover-focus-active() {
&:hover,
&:focus,
&:active {
//
// Keep images from scaling beyond the width of their parents.
-@mixin img-fluid {
+@mixin img-fluid() {
// Part 1: Set a maximum relative to the parent
max-width: 100%;
// Part 2: Override the height to auto, otherwise images will be stretched
background-color: $background;
&.list-group-item-action {
- @include hover-focus {
+ @include hover-focus() {
color: $color;
background-color: darken($background, 5%);
}
// Lists
// Unstyled keeps list items block level, just removes default browser padding and list-style
-@mixin list-unstyled {
+@mixin list-unstyled() {
padding-left: 0;
list-style: none;
}
-@mixin reset-text {
+@mixin reset-text() {
font-family: $font-family-base;
// We deliberately do NOT reset font-size or word-wrap.
font-style: normal;
// See: https://a11yproject.com/posts/how-to-hide-content/
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
-@mixin sr-only {
+@mixin sr-only() {
position: absolute;
width: 1px;
height: 1px;
//
// Credit: HTML5 Boilerplate
-@mixin sr-only-focusable {
+@mixin sr-only-focusable() {
&:active,
&:focus {
position: static;
$hover-background: darken($background, 5%);
.table-#{$state} {
- @include hover {
+ @include hover() {
background-color: $hover-background;
> td,
}
@if $emphasized-link-hover-darken-percentage != 0 {
a#{$parent} {
- @include hover-focus {
+ @include hover-focus() {
color: darken($color, $emphasized-link-hover-darken-percentage) !important;
}
}
.text-justify { text-align: justify !important; }
.text-wrap { white-space: normal !important; }
.text-nowrap { white-space: nowrap !important; }
-.text-truncate { @include text-truncate; }
+.text-truncate { @include text-truncate(); }
// Responsive alignment
height: 3rem;
margin-bottom: .5rem;
background-color: lighten($blue, 50%);
- @include border-radius;
+ @include border-radius();
}
.bd-example-container-sidebar {
width: 4rem;
height: 8rem;
background-color: lighten($blue, 25%);
- @include border-radius;
+ @include border-radius();
}
.bd-example-container-body {
height: 8rem;
margin-right: 4.5rem;
background-color: lighten($bd-purple, 25%);
- @include border-radius;
+ @include border-radius();
}
.bd-example-container-fluid {
background-color: $bd-purple;
outline: 0;
- @include hover {
+ @include hover() {
color: $white;
}
}