mixins
6 years ago
utilities
6 years ago
vendor
6 years ago
_alert.scss
6 years ago
_badge.scss
6 years ago
_breadcrumb.scss
6 years ago
_button-group.scss
6 years ago
_buttons.scss
6 years ago
_card.scss
6 years ago
_carousel.scss
6 years ago
_close.scss
6 years ago
_code.scss
6 years ago
_custom-forms.scss
6 years ago
_dropdown.scss
6 years ago
_forms.scss
6 years ago
_functions.scss
6 years ago
_grid.scss
6 years ago
_images.scss
6 years ago
_input-group.scss
6 years ago
_jumbotron.scss
6 years ago
_list-group.scss
6 years ago
_media.scss
6 years ago
_mixins.scss
6 years ago
_modal.scss
6 years ago
_nav.scss
6 years ago
_navbar.scss
6 years ago
_pagination.scss
6 years ago
_popover.scss
6 years ago
_print.scss
6 years ago
_progress.scss
6 years ago
_reboot.scss
6 years ago
_root.scss
6 years ago
_spinners.scss
6 years ago
_tables.scss
6 years ago
_toasts.scss
6 years ago
_tooltip.scss
6 years ago
_transitions.scss
6 years ago
_type.scss
6 years ago
_utilities.scss
6 years ago
_variables.scss
6 years ago
bootstrap-grid.scss
6 years ago
bootstrap-reboot.scss
6 years ago
bootstrap.scss
6 years ago
_buttons.scss
138 lines
| 1 | // stylelint-disable selector-no-qualifying-type |
| 2 | |
| 3 | // |
| 4 | // Base styles |
| 5 | // |
| 6 | |
| 7 | .btn { |
| 8 | display: inline-block; |
| 9 | font-family: $btn-font-family; |
| 10 | font-weight: $btn-font-weight; |
| 11 | color: $body-color; |
| 12 | text-align: center; |
| 13 | vertical-align: middle; |
| 14 | user-select: none; |
| 15 | background-color: transparent; |
| 16 | border: $btn-border-width solid transparent; |
| 17 | @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius); |
| 18 | @include transition($btn-transition); |
| 19 | |
| 20 | @include hover { |
| 21 | color: $body-color; |
| 22 | text-decoration: none; |
| 23 | } |
| 24 | |
| 25 | &:focus, |
| 26 | &.focus { |
| 27 | outline: 0; |
| 28 | box-shadow: $btn-focus-box-shadow; |
| 29 | } |
| 30 | |
| 31 | // Disabled comes first so active can properly restyle |
| 32 | &.disabled, |
| 33 | &:disabled { |
| 34 | opacity: $btn-disabled-opacity; |
| 35 | @include box-shadow(none); |
| 36 | } |
| 37 | |
| 38 | &:not(:disabled):not(.disabled):active, |
| 39 | &:not(:disabled):not(.disabled).active { |
| 40 | @include box-shadow($btn-active-box-shadow); |
| 41 | |
| 42 | &:focus { |
| 43 | @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow); |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // Future-proof disabling of clicks on `<a>` elements |
| 49 | a.btn.disabled, |
| 50 | fieldset:disabled a.btn { |
| 51 | pointer-events: none; |
| 52 | } |
| 53 | |
| 54 | |
| 55 | // |
| 56 | // Alternate buttons |
| 57 | // |
| 58 | |
| 59 | @each $color, $value in $theme-colors { |
| 60 | .btn-#{$color} { |
| 61 | @include button-variant($value, $value); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | @each $color, $value in $theme-colors { |
| 66 | .btn-outline-#{$color} { |
| 67 | @include button-outline-variant($value); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | |
| 72 | // |
| 73 | // Link buttons |
| 74 | // |
| 75 | |
| 76 | // Make a button look and behave like a link |
| 77 | .btn-link { |
| 78 | font-weight: $font-weight-normal; |
| 79 | color: $link-color; |
| 80 | text-decoration: $link-decoration; |
| 81 | |
| 82 | @include hover { |
| 83 | color: $link-hover-color; |
| 84 | text-decoration: $link-hover-decoration; |
| 85 | } |
| 86 | |
| 87 | &:focus, |
| 88 | &.focus { |
| 89 | text-decoration: $link-hover-decoration; |
| 90 | box-shadow: none; |
| 91 | } |
| 92 | |
| 93 | &:disabled, |
| 94 | &.disabled { |
| 95 | color: $btn-link-disabled-color; |
| 96 | pointer-events: none; |
| 97 | } |
| 98 | |
| 99 | // No need for an active state here |
| 100 | } |
| 101 | |
| 102 | |
| 103 | // |
| 104 | // Button Sizes |
| 105 | // |
| 106 | |
| 107 | .btn-lg { |
| 108 | @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg); |
| 109 | } |
| 110 | |
| 111 | .btn-sm { |
| 112 | @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm); |
| 113 | } |
| 114 | |
| 115 | |
| 116 | // |
| 117 | // Block button |
| 118 | // |
| 119 | |
| 120 | .btn-block { |
| 121 | display: block; |
| 122 | width: 100%; |
| 123 | |
| 124 | // Vertically space out multiple block buttons |
| 125 | + .btn-block { |
| 126 | margin-top: $btn-block-spacing-y; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | // Specificity overrides |
| 131 | input[type="submit"]="submit""], |
| 132 | input[type="reset"]="reset""], |
| 133 | input[type="button"]="button""] { |
| 134 | &.btn-block { |
| 135 | width: 100%; |
| 136 | } |
| 137 | } |
| 138 |