bootstrap 4.1.3 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -2
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +7 -4
  5. data/Rakefile +2 -2
  6. data/assets/javascripts/bootstrap/alert.js +226 -166
  7. data/assets/javascripts/bootstrap/base-component.js +63 -0
  8. data/assets/javascripts/bootstrap/button.js +119 -165
  9. data/assets/javascripts/bootstrap/carousel.js +634 -445
  10. data/assets/javascripts/bootstrap/collapse.js +447 -327
  11. data/assets/javascripts/bootstrap/dom/data.js +68 -0
  12. data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
  13. data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
  14. data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
  15. data/assets/javascripts/bootstrap/dropdown.js +550 -425
  16. data/assets/javascripts/bootstrap/modal.js +695 -492
  17. data/assets/javascripts/bootstrap/offcanvas.js +671 -0
  18. data/assets/javascripts/bootstrap/popover.js +167 -217
  19. data/assets/javascripts/bootstrap/scrollspy.js +319 -302
  20. data/assets/javascripts/bootstrap/tab.js +303 -221
  21. data/assets/javascripts/bootstrap/toast.js +333 -0
  22. data/assets/javascripts/bootstrap/tooltip.js +896 -577
  23. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  24. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  25. data/assets/javascripts/bootstrap-sprockets.js +15 -7
  26. data/assets/javascripts/bootstrap.js +4262 -3163
  27. data/assets/javascripts/bootstrap.min.js +4 -4
  28. data/assets/stylesheets/_bootstrap-grid.scss +54 -21
  29. data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
  30. data/assets/stylesheets/_bootstrap.scss +21 -11
  31. data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
  32. data/assets/stylesheets/bootstrap/_alert.scss +15 -9
  33. data/assets/stylesheets/bootstrap/_badge.scss +3 -21
  34. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
  35. data/assets/stylesheets/bootstrap/_button-group.scss +29 -62
  36. data/assets/stylesheets/bootstrap/_buttons.scss +33 -65
  37. data/assets/stylesheets/bootstrap/_card.scss +55 -141
  38. data/assets/stylesheets/bootstrap/_carousel.scss +94 -101
  39. data/assets/stylesheets/bootstrap/_close.scss +33 -28
  40. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  41. data/assets/stylesheets/bootstrap/_dropdown.scss +114 -40
  42. data/assets/stylesheets/bootstrap/_forms.scss +9 -333
  43. data/assets/stylesheets/bootstrap/_functions.scss +148 -29
  44. data/assets/stylesheets/bootstrap/_grid.scss +4 -34
  45. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  46. data/assets/stylesheets/bootstrap/_images.scss +4 -4
  47. data/assets/stylesheets/bootstrap/_list-group.scss +86 -27
  48. data/assets/stylesheets/bootstrap/_mixins.scss +17 -16
  49. data/assets/stylesheets/bootstrap/_modal.scss +90 -42
  50. data/assets/stylesheets/bootstrap/_nav.scss +31 -10
  51. data/assets/stylesheets/bootstrap/_navbar.scss +68 -61
  52. data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
  53. data/assets/stylesheets/bootstrap/_pagination.scss +13 -27
  54. data/assets/stylesheets/bootstrap/_popover.scss +63 -88
  55. data/assets/stylesheets/bootstrap/_progress.scss +20 -6
  56. data/assets/stylesheets/bootstrap/_reboot.scss +349 -211
  57. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  58. data/assets/stylesheets/bootstrap/_spinners.scss +69 -0
  59. data/assets/stylesheets/bootstrap/_tables.scss +79 -116
  60. data/assets/stylesheets/bootstrap/_toasts.scss +51 -0
  61. data/assets/stylesheets/bootstrap/_tooltip.scss +18 -18
  62. data/assets/stylesheets/bootstrap/_transitions.scss +2 -3
  63. data/assets/stylesheets/bootstrap/_type.scss +42 -63
  64. data/assets/stylesheets/bootstrap/_utilities.scss +594 -15
  65. data/assets/stylesheets/bootstrap/_variables.scss +952 -440
  66. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  67. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
  68. data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
  69. data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
  70. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  71. data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
  72. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  73. data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
  74. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  75. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  76. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  77. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  78. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  79. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  80. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  81. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  82. data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
  83. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +57 -14
  84. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +14 -1
  85. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +13 -9
  86. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -53
  87. data/assets/stylesheets/bootstrap/mixins/_caret.scss +14 -16
  88. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  89. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  90. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  91. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  92. data/assets/stylesheets/bootstrap/mixins/_forms.scss +87 -97
  93. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  94. data/assets/stylesheets/bootstrap/mixins/_grid.scss +106 -33
  95. data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
  96. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
  97. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +18 -9
  98. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  99. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  100. data/assets/stylesheets/bootstrap/mixins/_transition.scss +19 -6
  101. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
  102. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
  103. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  104. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +312 -0
  105. data/bootstrap.gemspec +7 -6
  106. data/lib/bootstrap/engine.rb +3 -0
  107. data/lib/bootstrap/version.rb +4 -2
  108. data/lib/bootstrap.rb +10 -7
  109. data/tasks/updater/js.rb +20 -5
  110. data/tasks/updater/network.rb +8 -2
  111. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  112. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  113. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  114. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  115. data/test/dummy_rails/app/views/pages/root.html +89 -0
  116. data/test/dummy_rails/config/application.rb +0 -3
  117. data/test/gemfiles/rails_6_0.gemfile +7 -0
  118. data/test/gemfiles/rails_6_1.gemfile +7 -0
  119. data/test/support/dummy_rails_integration.rb +3 -1
  120. data/test/test_helper.rb +18 -13
  121. metadata +64 -79
  122. data/assets/javascripts/bootstrap/util.js +0 -143
  123. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  124. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -433
  125. data/assets/stylesheets/bootstrap/_input-group.scss +0 -173
  126. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -16
  127. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  128. data/assets/stylesheets/bootstrap/_print.scss +0 -141
  129. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
  130. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -12
  131. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -11
  132. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -67
  133. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  134. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  135. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
  136. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -6
  137. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -30
  138. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -14
  139. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -13
  140. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -7
  141. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  142. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  143. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -59
  144. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -38
  145. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -52
  146. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  147. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -9
  148. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -37
  149. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  150. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  151. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -12
  152. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -51
  153. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -58
  154. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -11
  155. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  156. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,143 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
3
- typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4
- (global.Util = factory(global.jQuery));
5
- }(this, (function ($) { 'use strict';
6
-
7
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
8
-
9
- /**
10
- * --------------------------------------------------------------------------
11
- * Bootstrap (v4.1.3): util.js
12
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
13
- * --------------------------------------------------------------------------
14
- */
15
-
16
- var Util = function ($$$1) {
17
- /**
18
- * ------------------------------------------------------------------------
19
- * Private TransitionEnd Helpers
20
- * ------------------------------------------------------------------------
21
- */
22
- var TRANSITION_END = 'transitionend';
23
- var MAX_UID = 1000000;
24
- var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
25
-
26
- function toType(obj) {
27
- return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
28
- }
29
-
30
- function getSpecialTransitionEndEvent() {
31
- return {
32
- bindType: TRANSITION_END,
33
- delegateType: TRANSITION_END,
34
- handle: function handle(event) {
35
- if ($$$1(event.target).is(this)) {
36
- return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
37
- }
38
-
39
- return undefined; // eslint-disable-line no-undefined
40
- }
41
- };
42
- }
43
-
44
- function transitionEndEmulator(duration) {
45
- var _this = this;
46
-
47
- var called = false;
48
- $$$1(this).one(Util.TRANSITION_END, function () {
49
- called = true;
50
- });
51
- setTimeout(function () {
52
- if (!called) {
53
- Util.triggerTransitionEnd(_this);
54
- }
55
- }, duration);
56
- return this;
57
- }
58
-
59
- function setTransitionEndSupport() {
60
- $$$1.fn.emulateTransitionEnd = transitionEndEmulator;
61
- $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
62
- }
63
- /**
64
- * --------------------------------------------------------------------------
65
- * Public Util Api
66
- * --------------------------------------------------------------------------
67
- */
68
-
69
-
70
- var Util = {
71
- TRANSITION_END: 'bsTransitionEnd',
72
- getUID: function getUID(prefix) {
73
- do {
74
- // eslint-disable-next-line no-bitwise
75
- prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
76
- } while (document.getElementById(prefix));
77
-
78
- return prefix;
79
- },
80
- getSelectorFromElement: function getSelectorFromElement(element) {
81
- var selector = element.getAttribute('data-target');
82
-
83
- if (!selector || selector === '#') {
84
- selector = element.getAttribute('href') || '';
85
- }
86
-
87
- try {
88
- return document.querySelector(selector) ? selector : null;
89
- } catch (err) {
90
- return null;
91
- }
92
- },
93
- getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
94
- if (!element) {
95
- return 0;
96
- } // Get transition-duration of the element
97
-
98
-
99
- var transitionDuration = $$$1(element).css('transition-duration');
100
- var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found
101
-
102
- if (!floatTransitionDuration) {
103
- return 0;
104
- } // If multiple durations are defined, take the first
105
-
106
-
107
- transitionDuration = transitionDuration.split(',')[0];
108
- return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
109
- },
110
- reflow: function reflow(element) {
111
- return element.offsetHeight;
112
- },
113
- triggerTransitionEnd: function triggerTransitionEnd(element) {
114
- $$$1(element).trigger(TRANSITION_END);
115
- },
116
- // TODO: Remove in v5
117
- supportsTransitionEnd: function supportsTransitionEnd() {
118
- return Boolean(TRANSITION_END);
119
- },
120
- isElement: function isElement(obj) {
121
- return (obj[0] || obj).nodeType;
122
- },
123
- typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
124
- for (var property in configTypes) {
125
- if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
126
- var expectedTypes = configTypes[property];
127
- var value = config[property];
128
- var valueType = value && Util.isElement(value) ? 'element' : toType(value);
129
-
130
- if (!new RegExp(expectedTypes).test(valueType)) {
131
- throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
132
- }
133
- }
134
- }
135
- }
136
- };
137
- setTransitionEndSupport();
138
- return Util;
139
- }($);
140
-
141
- return Util;
142
-
143
- })));
@@ -1,48 +0,0 @@
1
- // Inline code
2
- code {
3
- font-size: $code-font-size;
4
- color: $code-color;
5
- word-break: break-word;
6
-
7
- // Streamline the style when inside anchors to avoid broken underline and more
8
- a > & {
9
- color: inherit;
10
- }
11
- }
12
-
13
- // User input typically entered via keyboard
14
- kbd {
15
- padding: $kbd-padding-y $kbd-padding-x;
16
- font-size: $kbd-font-size;
17
- color: $kbd-color;
18
- background-color: $kbd-bg;
19
- @include border-radius($border-radius-sm);
20
- @include box-shadow($kbd-box-shadow);
21
-
22
- kbd {
23
- padding: 0;
24
- font-size: 100%;
25
- font-weight: $nested-kbd-font-weight;
26
- @include box-shadow(none);
27
- }
28
- }
29
-
30
- // Blocks of code
31
- pre {
32
- display: block;
33
- font-size: $code-font-size;
34
- color: $pre-color;
35
-
36
- // Account for some code outputs that place code tags in pre tags
37
- code {
38
- font-size: inherit;
39
- color: inherit;
40
- word-break: normal;
41
- }
42
- }
43
-
44
- // Enable scrollable blocks of code
45
- .pre-scrollable {
46
- max-height: $pre-scrollable-max-height;
47
- overflow-y: scroll;
48
- }
@@ -1,433 +0,0 @@
1
- // Embedded icons from Open Iconic.
2
- // Released under MIT and copyright 2014 Waybury.
3
- // https://useiconic.com/open
4
-
5
-
6
- // Checkboxes and radios
7
- //
8
- // Base class takes care of all the key behavioral aspects.
9
-
10
- .custom-control {
11
- position: relative;
12
- display: block;
13
- min-height: ($font-size-base * $line-height-base);
14
- padding-left: $custom-control-gutter;
15
- }
16
-
17
- .custom-control-inline {
18
- display: inline-flex;
19
- margin-right: $custom-control-spacer-x;
20
- }
21
-
22
- .custom-control-input {
23
- position: absolute;
24
- z-index: -1; // Put the input behind the label so it doesn't overlay text
25
- opacity: 0;
26
-
27
- &:checked ~ .custom-control-label::before {
28
- color: $custom-control-indicator-checked-color;
29
- @include gradient-bg($custom-control-indicator-checked-bg);
30
- @include box-shadow($custom-control-indicator-checked-box-shadow);
31
- }
32
-
33
- &:focus ~ .custom-control-label::before {
34
- // the mixin is not used here to make sure there is feedback
35
- box-shadow: $custom-control-indicator-focus-box-shadow;
36
- }
37
-
38
- &:active ~ .custom-control-label::before {
39
- color: $custom-control-indicator-active-color;
40
- background-color: $custom-control-indicator-active-bg;
41
- @include box-shadow($custom-control-indicator-active-box-shadow);
42
- }
43
-
44
- &:disabled {
45
- ~ .custom-control-label {
46
- color: $custom-control-label-disabled-color;
47
-
48
- &::before {
49
- background-color: $custom-control-indicator-disabled-bg;
50
- }
51
- }
52
- }
53
- }
54
-
55
- // Custom control indicators
56
- //
57
- // Build the custom controls out of pseudo-elements.
58
-
59
- .custom-control-label {
60
- position: relative;
61
- margin-bottom: 0;
62
-
63
- // Background-color and (when enabled) gradient
64
- &::before {
65
- position: absolute;
66
- top: (($font-size-base * $line-height-base - $custom-control-indicator-size) / 2);
67
- left: -$custom-control-gutter;
68
- display: block;
69
- width: $custom-control-indicator-size;
70
- height: $custom-control-indicator-size;
71
- pointer-events: none;
72
- content: "";
73
- user-select: none;
74
- background-color: $custom-control-indicator-bg;
75
- @include box-shadow($custom-control-indicator-box-shadow);
76
- }
77
-
78
- // Foreground (icon)
79
- &::after {
80
- position: absolute;
81
- top: (($font-size-base * $line-height-base - $custom-control-indicator-size) / 2);
82
- left: -$custom-control-gutter;
83
- display: block;
84
- width: $custom-control-indicator-size;
85
- height: $custom-control-indicator-size;
86
- content: "";
87
- background-repeat: no-repeat;
88
- background-position: center center;
89
- background-size: $custom-control-indicator-bg-size;
90
- }
91
- }
92
-
93
-
94
- // Checkboxes
95
- //
96
- // Tweak just a few things for checkboxes.
97
-
98
- .custom-checkbox {
99
- .custom-control-label::before {
100
- @include border-radius($custom-checkbox-indicator-border-radius);
101
- }
102
-
103
- .custom-control-input:checked ~ .custom-control-label {
104
- &::before {
105
- @include gradient-bg($custom-control-indicator-checked-bg);
106
- }
107
- &::after {
108
- background-image: $custom-checkbox-indicator-icon-checked;
109
- }
110
- }
111
-
112
- .custom-control-input:indeterminate ~ .custom-control-label {
113
- &::before {
114
- @include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
115
- @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
116
- }
117
- &::after {
118
- background-image: $custom-checkbox-indicator-icon-indeterminate;
119
- }
120
- }
121
-
122
- .custom-control-input:disabled {
123
- &:checked ~ .custom-control-label::before {
124
- background-color: $custom-control-indicator-checked-disabled-bg;
125
- }
126
- &:indeterminate ~ .custom-control-label::before {
127
- background-color: $custom-control-indicator-checked-disabled-bg;
128
- }
129
- }
130
- }
131
-
132
- // Radios
133
- //
134
- // Tweak just a few things for radios.
135
-
136
- .custom-radio {
137
- .custom-control-label::before {
138
- border-radius: $custom-radio-indicator-border-radius;
139
- }
140
-
141
- .custom-control-input:checked ~ .custom-control-label {
142
- &::before {
143
- @include gradient-bg($custom-control-indicator-checked-bg);
144
- }
145
- &::after {
146
- background-image: $custom-radio-indicator-icon-checked;
147
- }
148
- }
149
-
150
- .custom-control-input:disabled {
151
- &:checked ~ .custom-control-label::before {
152
- background-color: $custom-control-indicator-checked-disabled-bg;
153
- }
154
- }
155
- }
156
-
157
-
158
- // Select
159
- //
160
- // Replaces the browser default select with a custom one, mostly pulled from
161
- // https://primer.github.io/.
162
- //
163
-
164
- .custom-select {
165
- display: inline-block;
166
- width: 100%;
167
- height: $custom-select-height;
168
- padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
169
- line-height: $custom-select-line-height;
170
- color: $custom-select-color;
171
- vertical-align: middle;
172
- background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
173
- background-size: $custom-select-bg-size;
174
- border: $custom-select-border-width solid $custom-select-border-color;
175
- @if $enable-rounded {
176
- border-radius: $custom-select-border-radius;
177
- } @else {
178
- border-radius: 0;
179
- }
180
- @include box-shadow($custom-select-box-shadow);
181
- appearance: none;
182
-
183
- &:focus {
184
- border-color: $custom-select-focus-border-color;
185
- outline: 0;
186
- @if $enable-shadows {
187
- box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
188
- } @else {
189
- box-shadow: $custom-select-focus-box-shadow;
190
- }
191
-
192
- &::-ms-value {
193
- // For visual consistency with other platforms/browsers,
194
- // suppress the default white text on blue background highlight given to
195
- // the selected option text when the (still closed) <select> receives focus
196
- // in IE and (under certain conditions) Edge.
197
- // See https://github.com/twbs/bootstrap/issues/19398.
198
- color: $input-color;
199
- background-color: $input-bg;
200
- }
201
- }
202
-
203
- &[multiple],
204
- &[size]:not([size="1"]) {
205
- height: auto;
206
- padding-right: $custom-select-padding-x;
207
- background-image: none;
208
- }
209
-
210
- &:disabled {
211
- color: $custom-select-disabled-color;
212
- background-color: $custom-select-disabled-bg;
213
- }
214
-
215
- // Hides the default caret in IE11
216
- &::-ms-expand {
217
- opacity: 0;
218
- }
219
- }
220
-
221
- .custom-select-sm {
222
- height: $custom-select-height-sm;
223
- padding-top: $custom-select-padding-y;
224
- padding-bottom: $custom-select-padding-y;
225
- font-size: $custom-select-font-size-sm;
226
- }
227
-
228
- .custom-select-lg {
229
- height: $custom-select-height-lg;
230
- padding-top: $custom-select-padding-y;
231
- padding-bottom: $custom-select-padding-y;
232
- font-size: $custom-select-font-size-lg;
233
- }
234
-
235
-
236
- // File
237
- //
238
- // Custom file input.
239
-
240
- .custom-file {
241
- position: relative;
242
- display: inline-block;
243
- width: 100%;
244
- height: $custom-file-height;
245
- margin-bottom: 0;
246
- }
247
-
248
- .custom-file-input {
249
- position: relative;
250
- z-index: 2;
251
- width: 100%;
252
- height: $custom-file-height;
253
- margin: 0;
254
- opacity: 0;
255
-
256
- &:focus ~ .custom-file-label {
257
- border-color: $custom-file-focus-border-color;
258
- box-shadow: $custom-file-focus-box-shadow;
259
-
260
- &::after {
261
- border-color: $custom-file-focus-border-color;
262
- }
263
- }
264
-
265
- &:disabled ~ .custom-file-label {
266
- background-color: $custom-file-disabled-bg;
267
- }
268
-
269
- @each $lang, $value in $custom-file-text {
270
- &:lang(#{$lang}) ~ .custom-file-label::after {
271
- content: $value;
272
- }
273
- }
274
- }
275
-
276
- .custom-file-label {
277
- position: absolute;
278
- top: 0;
279
- right: 0;
280
- left: 0;
281
- z-index: 1;
282
- height: $custom-file-height;
283
- padding: $custom-file-padding-y $custom-file-padding-x;
284
- line-height: $custom-file-line-height;
285
- color: $custom-file-color;
286
- background-color: $custom-file-bg;
287
- border: $custom-file-border-width solid $custom-file-border-color;
288
- @include border-radius($custom-file-border-radius);
289
- @include box-shadow($custom-file-box-shadow);
290
-
291
- &::after {
292
- position: absolute;
293
- top: 0;
294
- right: 0;
295
- bottom: 0;
296
- z-index: 3;
297
- display: block;
298
- height: $custom-file-height-inner;
299
- padding: $custom-file-padding-y $custom-file-padding-x;
300
- line-height: $custom-file-line-height;
301
- color: $custom-file-button-color;
302
- content: "Browse";
303
- @include gradient-bg($custom-file-button-bg);
304
- border-left: $custom-file-border-width solid $custom-file-border-color;
305
- @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
306
- }
307
- }
308
-
309
- // Range
310
- //
311
- // Style range inputs the same across browsers. Vendor-specific rules for pseudo
312
- // elements cannot be mixed. As such, there are no shared styles for focus or
313
- // active states on prefixed selectors.
314
-
315
- .custom-range {
316
- width: 100%;
317
- padding-left: 0; // Firefox specific
318
- background-color: transparent;
319
- appearance: none;
320
-
321
- &:focus {
322
- outline: none;
323
-
324
- // Pseudo-elements must be split across multiple rulesets to have an affect.
325
- // No box-shadow() mixin for focus accessibility.
326
- &::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
327
- &::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
328
- &::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
329
- }
330
-
331
- &::-moz-focus-outer {
332
- border: 0;
333
- }
334
-
335
- &::-webkit-slider-thumb {
336
- width: $custom-range-thumb-width;
337
- height: $custom-range-thumb-height;
338
- margin-top: (($custom-range-track-height - $custom-range-thumb-height) / 2); // Webkit specific
339
- @include gradient-bg($custom-range-thumb-bg);
340
- border: $custom-range-thumb-border;
341
- @include border-radius($custom-range-thumb-border-radius);
342
- @include box-shadow($custom-range-thumb-box-shadow);
343
- @include transition($custom-forms-transition);
344
- appearance: none;
345
-
346
- &:active {
347
- @include gradient-bg($custom-range-thumb-active-bg);
348
- }
349
- }
350
-
351
- &::-webkit-slider-runnable-track {
352
- width: $custom-range-track-width;
353
- height: $custom-range-track-height;
354
- color: transparent; // Why?
355
- cursor: $custom-range-track-cursor;
356
- background-color: $custom-range-track-bg;
357
- border-color: transparent;
358
- @include border-radius($custom-range-track-border-radius);
359
- @include box-shadow($custom-range-track-box-shadow);
360
- }
361
-
362
- &::-moz-range-thumb {
363
- width: $custom-range-thumb-width;
364
- height: $custom-range-thumb-height;
365
- @include gradient-bg($custom-range-thumb-bg);
366
- border: $custom-range-thumb-border;
367
- @include border-radius($custom-range-thumb-border-radius);
368
- @include box-shadow($custom-range-thumb-box-shadow);
369
- @include transition($custom-forms-transition);
370
- appearance: none;
371
-
372
- &:active {
373
- @include gradient-bg($custom-range-thumb-active-bg);
374
- }
375
- }
376
-
377
- &::-moz-range-track {
378
- width: $custom-range-track-width;
379
- height: $custom-range-track-height;
380
- color: transparent;
381
- cursor: $custom-range-track-cursor;
382
- background-color: $custom-range-track-bg;
383
- border-color: transparent; // Firefox specific?
384
- @include border-radius($custom-range-track-border-radius);
385
- @include box-shadow($custom-range-track-box-shadow);
386
- }
387
-
388
- &::-ms-thumb {
389
- width: $custom-range-thumb-width;
390
- height: $custom-range-thumb-height;
391
- margin-top: 0; // Edge specific
392
- margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
393
- margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
394
- @include gradient-bg($custom-range-thumb-bg);
395
- border: $custom-range-thumb-border;
396
- @include border-radius($custom-range-thumb-border-radius);
397
- @include box-shadow($custom-range-thumb-box-shadow);
398
- @include transition($custom-forms-transition);
399
- appearance: none;
400
-
401
- &:active {
402
- @include gradient-bg($custom-range-thumb-active-bg);
403
- }
404
- }
405
-
406
- &::-ms-track {
407
- width: $custom-range-track-width;
408
- height: $custom-range-track-height;
409
- color: transparent;
410
- cursor: $custom-range-track-cursor;
411
- background-color: transparent;
412
- border-color: transparent;
413
- border-width: ($custom-range-thumb-height * .5);
414
- @include box-shadow($custom-range-track-box-shadow);
415
- }
416
-
417
- &::-ms-fill-lower {
418
- background-color: $custom-range-track-bg;
419
- @include border-radius($custom-range-track-border-radius);
420
- }
421
-
422
- &::-ms-fill-upper {
423
- margin-right: 15px; // arbitrary?
424
- background-color: $custom-range-track-bg;
425
- @include border-radius($custom-range-track-border-radius);
426
- }
427
- }
428
-
429
- .custom-control-label::before,
430
- .custom-file-label,
431
- .custom-select {
432
- @include transition($custom-forms-transition);
433
- }