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.
- checksums.yaml +4 -4
- data/.travis.yml +17 -2
- data/CHANGELOG.md +2 -14
- data/README.md +7 -4
- data/Rakefile +2 -2
- data/assets/javascripts/bootstrap/alert.js +226 -166
- data/assets/javascripts/bootstrap/base-component.js +63 -0
- data/assets/javascripts/bootstrap/button.js +119 -165
- data/assets/javascripts/bootstrap/carousel.js +634 -445
- data/assets/javascripts/bootstrap/collapse.js +447 -327
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +322 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
- data/assets/javascripts/bootstrap/dropdown.js +550 -425
- data/assets/javascripts/bootstrap/modal.js +695 -492
- data/assets/javascripts/bootstrap/offcanvas.js +671 -0
- data/assets/javascripts/bootstrap/popover.js +167 -217
- data/assets/javascripts/bootstrap/scrollspy.js +319 -302
- data/assets/javascripts/bootstrap/tab.js +303 -221
- data/assets/javascripts/bootstrap/toast.js +333 -0
- data/assets/javascripts/bootstrap/tooltip.js +896 -577
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +15 -7
- data/assets/javascripts/bootstrap.js +4262 -3163
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +54 -21
- data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
- data/assets/stylesheets/_bootstrap.scss +21 -11
- data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -9
- data/assets/stylesheets/bootstrap/_badge.scss +3 -21
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
- data/assets/stylesheets/bootstrap/_button-group.scss +29 -62
- data/assets/stylesheets/bootstrap/_buttons.scss +33 -65
- data/assets/stylesheets/bootstrap/_card.scss +55 -141
- data/assets/stylesheets/bootstrap/_carousel.scss +94 -101
- data/assets/stylesheets/bootstrap/_close.scss +33 -28
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +114 -40
- data/assets/stylesheets/bootstrap/_forms.scss +9 -333
- data/assets/stylesheets/bootstrap/_functions.scss +148 -29
- data/assets/stylesheets/bootstrap/_grid.scss +4 -34
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_images.scss +4 -4
- data/assets/stylesheets/bootstrap/_list-group.scss +86 -27
- data/assets/stylesheets/bootstrap/_mixins.scss +17 -16
- data/assets/stylesheets/bootstrap/_modal.scss +90 -42
- data/assets/stylesheets/bootstrap/_nav.scss +31 -10
- data/assets/stylesheets/bootstrap/_navbar.scss +68 -61
- data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +13 -27
- data/assets/stylesheets/bootstrap/_popover.scss +63 -88
- data/assets/stylesheets/bootstrap/_progress.scss +20 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +349 -211
- data/assets/stylesheets/bootstrap/_root.scss +5 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +69 -0
- data/assets/stylesheets/bootstrap/_tables.scss +79 -116
- data/assets/stylesheets/bootstrap/_toasts.scss +51 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +18 -18
- data/assets/stylesheets/bootstrap/_transitions.scss +2 -3
- data/assets/stylesheets/bootstrap/_type.scss +42 -63
- data/assets/stylesheets/bootstrap/_utilities.scss +594 -15
- data/assets/stylesheets/bootstrap/_variables.scss +952 -440
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +57 -14
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +14 -1
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +13 -9
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -53
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +14 -16
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +87 -97
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +106 -33
- data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +18 -9
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +19 -6
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +312 -0
- data/bootstrap.gemspec +7 -6
- data/lib/bootstrap/engine.rb +3 -0
- data/lib/bootstrap/version.rb +4 -2
- data/lib/bootstrap.rb +10 -7
- data/tasks/updater/js.rb +20 -5
- data/tasks/updater/network.rb +8 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -3
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +64 -79
- data/assets/javascripts/bootstrap/util.js +0 -143
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -433
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -173
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -16
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -141
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -12
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -67
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -6
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -30
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -13
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -7
- data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -59
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -38
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -52
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -9
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -37
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -12
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -58
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -11
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
- /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,35 +1,40 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
line-height: 1;
|
6
|
-
color: $close-color;
|
7
|
-
text-shadow: $close-text-shadow;
|
8
|
-
opacity: .5;
|
1
|
+
// transparent background and border properties included for button version.
|
2
|
+
// iOS requires the button element instead of an anchor tag.
|
3
|
+
// If you want the anchor version, it requires `href="#"`.
|
4
|
+
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
9
5
|
|
10
|
-
|
6
|
+
.btn-close {
|
7
|
+
box-sizing: content-box;
|
8
|
+
width: $btn-close-width;
|
9
|
+
height: $btn-close-height;
|
10
|
+
padding: $btn-close-padding-y $btn-close-padding-x;
|
11
|
+
color: $btn-close-color;
|
12
|
+
background: transparent escape-svg($btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
|
13
|
+
border: 0; // for button elements
|
14
|
+
@include border-radius();
|
15
|
+
opacity: $btn-close-opacity;
|
11
16
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
+
// Override <a>'s hover style
|
18
|
+
&:hover {
|
19
|
+
color: $btn-close-color;
|
20
|
+
text-decoration: none;
|
21
|
+
opacity: $btn-close-hover-opacity;
|
22
|
+
}
|
17
23
|
|
18
|
-
|
19
|
-
|
24
|
+
&:focus {
|
25
|
+
outline: 0;
|
26
|
+
box-shadow: $btn-close-focus-shadow;
|
27
|
+
opacity: $btn-close-focus-opacity;
|
20
28
|
}
|
21
|
-
}
|
22
29
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
30
|
+
&:disabled,
|
31
|
+
&.disabled {
|
32
|
+
pointer-events: none;
|
33
|
+
user-select: none;
|
34
|
+
opacity: $btn-close-disabled-opacity;
|
35
|
+
}
|
36
|
+
}
|
27
37
|
|
28
|
-
|
29
|
-
|
30
|
-
padding: 0;
|
31
|
-
background-color: transparent;
|
32
|
-
border: 0;
|
33
|
-
-webkit-appearance: none;
|
38
|
+
.btn-close-white {
|
39
|
+
filter: $btn-close-white-filter;
|
34
40
|
}
|
35
|
-
// stylelint-enable
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// Container widths
|
2
|
+
//
|
3
|
+
// Set the container width, and override it for fixed navbars in media queries.
|
4
|
+
|
5
|
+
@if $enable-grid-classes {
|
6
|
+
// Single container class with breakpoint max-widths
|
7
|
+
.container,
|
8
|
+
// 100% wide container at all breakpoints
|
9
|
+
.container-fluid {
|
10
|
+
@include make-container();
|
11
|
+
}
|
12
|
+
|
13
|
+
// Responsive containers that are 100% wide until a breakpoint
|
14
|
+
@each $breakpoint, $container-max-width in $container-max-widths {
|
15
|
+
.container-#{$breakpoint} {
|
16
|
+
@extend .container-fluid;
|
17
|
+
}
|
18
|
+
|
19
|
+
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
20
|
+
%responsive-container-#{$breakpoint} {
|
21
|
+
max-width: $container-max-width;
|
22
|
+
}
|
23
|
+
|
24
|
+
// Extend each breakpoint which is smaller or equal to the current breakpoint
|
25
|
+
$extend-breakpoint: true;
|
26
|
+
|
27
|
+
@each $name, $width in $grid-breakpoints {
|
28
|
+
@if ($extend-breakpoint) {
|
29
|
+
.container#{breakpoint-infix($name, $grid-breakpoints)} {
|
30
|
+
@extend %responsive-container-#{$breakpoint};
|
31
|
+
}
|
32
|
+
|
33
|
+
// Once the current breakpoint is reached, stop extending
|
34
|
+
@if ($breakpoint == $name) {
|
35
|
+
$extend-breakpoint: false;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
@@ -1,29 +1,28 @@
|
|
1
1
|
// The dropdown wrapper (`<div>`)
|
2
2
|
.dropup,
|
3
|
-
.
|
3
|
+
.dropend,
|
4
4
|
.dropdown,
|
5
|
-
.
|
5
|
+
.dropstart {
|
6
6
|
position: relative;
|
7
7
|
}
|
8
8
|
|
9
9
|
.dropdown-toggle {
|
10
|
+
white-space: nowrap;
|
11
|
+
|
10
12
|
// Generate the caret automatically
|
11
|
-
@include caret;
|
13
|
+
@include caret();
|
12
14
|
}
|
13
15
|
|
14
16
|
// The dropdown menu
|
15
17
|
.dropdown-menu {
|
16
18
|
position: absolute;
|
17
|
-
top: 100%;
|
18
|
-
left: 0;
|
19
19
|
z-index: $zindex-dropdown;
|
20
20
|
display: none; // none by default, but block on "open" of the menu
|
21
|
-
float: left;
|
22
21
|
min-width: $dropdown-min-width;
|
23
|
-
padding: $dropdown-padding-y
|
24
|
-
margin:
|
25
|
-
font-size
|
26
|
-
color: $
|
22
|
+
padding: $dropdown-padding-y $dropdown-padding-x;
|
23
|
+
margin: 0; // Override default margin of ul
|
24
|
+
@include font-size($dropdown-font-size);
|
25
|
+
color: $dropdown-color;
|
27
26
|
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
28
27
|
list-style: none;
|
29
28
|
background-color: $dropdown-bg;
|
@@ -31,17 +30,47 @@
|
|
31
30
|
border: $dropdown-border-width solid $dropdown-border-color;
|
32
31
|
@include border-radius($dropdown-border-radius);
|
33
32
|
@include box-shadow($dropdown-box-shadow);
|
33
|
+
|
34
|
+
&[data-bs-popper] {
|
35
|
+
top: 100%;
|
36
|
+
left: 0;
|
37
|
+
margin-top: $dropdown-spacer;
|
38
|
+
}
|
34
39
|
}
|
35
40
|
|
36
|
-
|
37
|
-
|
38
|
-
|
41
|
+
// scss-docs-start responsive-breakpoints
|
42
|
+
// We deliberately hardcode the `bs-` prefix because we check
|
43
|
+
// this custom property in JS to determine Popper's positioning
|
44
|
+
|
45
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
46
|
+
@include media-breakpoint-up($breakpoint) {
|
47
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
48
|
+
|
49
|
+
.dropdown-menu#{$infix}-start {
|
50
|
+
--bs-position: start;
|
51
|
+
|
52
|
+
&[data-bs-popper] {
|
53
|
+
right: auto #{"/* rtl:ignore */"};
|
54
|
+
left: 0 #{"/* rtl:ignore */"};
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
.dropdown-menu#{$infix}-end {
|
59
|
+
--bs-position: end;
|
60
|
+
|
61
|
+
&[data-bs-popper] {
|
62
|
+
right: 0 #{"/* rtl:ignore */"};
|
63
|
+
left: auto #{"/* rtl:ignore */"};
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
39
67
|
}
|
68
|
+
// scss-docs-end responsive-breakpoints
|
40
69
|
|
41
70
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
42
71
|
// Just add .dropup after the standard .dropdown class and you're set.
|
43
72
|
.dropup {
|
44
|
-
.dropdown-menu {
|
73
|
+
.dropdown-menu[data-bs-popper] {
|
45
74
|
top: auto;
|
46
75
|
bottom: 100%;
|
47
76
|
margin-top: 0;
|
@@ -53,8 +82,8 @@
|
|
53
82
|
}
|
54
83
|
}
|
55
84
|
|
56
|
-
.
|
57
|
-
.dropdown-menu {
|
85
|
+
.dropend {
|
86
|
+
.dropdown-menu[data-bs-popper] {
|
58
87
|
top: 0;
|
59
88
|
right: auto;
|
60
89
|
left: 100%;
|
@@ -63,15 +92,15 @@
|
|
63
92
|
}
|
64
93
|
|
65
94
|
.dropdown-toggle {
|
66
|
-
@include caret(
|
95
|
+
@include caret(end);
|
67
96
|
&::after {
|
68
97
|
vertical-align: 0;
|
69
98
|
}
|
70
99
|
}
|
71
100
|
}
|
72
101
|
|
73
|
-
.
|
74
|
-
.dropdown-menu {
|
102
|
+
.dropstart {
|
103
|
+
.dropdown-menu[data-bs-popper] {
|
75
104
|
top: 0;
|
76
105
|
right: 100%;
|
77
106
|
left: auto;
|
@@ -80,29 +109,20 @@
|
|
80
109
|
}
|
81
110
|
|
82
111
|
.dropdown-toggle {
|
83
|
-
@include caret(
|
112
|
+
@include caret(start);
|
84
113
|
&::before {
|
85
114
|
vertical-align: 0;
|
86
115
|
}
|
87
116
|
}
|
88
117
|
}
|
89
118
|
|
90
|
-
// When enabled Popper.js, reset basic dropdown position
|
91
|
-
// stylelint-disable no-duplicate-selectors
|
92
|
-
.dropdown-menu {
|
93
|
-
&[x-placement^="top"],
|
94
|
-
&[x-placement^="right"],
|
95
|
-
&[x-placement^="bottom"],
|
96
|
-
&[x-placement^="left"] {
|
97
|
-
right: auto;
|
98
|
-
bottom: auto;
|
99
|
-
}
|
100
|
-
}
|
101
|
-
// stylelint-enable no-duplicate-selectors
|
102
119
|
|
103
120
|
// Dividers (basically an `<hr>`) within the dropdown
|
104
121
|
.dropdown-divider {
|
105
|
-
|
122
|
+
height: 0;
|
123
|
+
margin: $dropdown-divider-margin-y 0;
|
124
|
+
overflow: hidden;
|
125
|
+
border-top: 1px solid $dropdown-divider-bg;
|
106
126
|
}
|
107
127
|
|
108
128
|
// Links, buttons, and more within the dropdown menu
|
@@ -116,13 +136,27 @@
|
|
116
136
|
font-weight: $font-weight-normal;
|
117
137
|
color: $dropdown-link-color;
|
118
138
|
text-align: inherit; // For `<button>`s
|
139
|
+
text-decoration: if($link-decoration == none, null, none);
|
119
140
|
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
120
141
|
background-color: transparent; // For `<button>`s
|
121
142
|
border: 0; // For `<button>`s
|
122
143
|
|
123
|
-
|
144
|
+
// Prevent dropdown overflow if there's no padding
|
145
|
+
// See https://github.com/twbs/bootstrap/pull/27703
|
146
|
+
@if $dropdown-padding-y == 0 {
|
147
|
+
&:first-child {
|
148
|
+
@include border-top-radius($dropdown-inner-border-radius);
|
149
|
+
}
|
150
|
+
|
151
|
+
&:last-child {
|
152
|
+
@include border-bottom-radius($dropdown-inner-border-radius);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
&:hover,
|
157
|
+
&:focus {
|
124
158
|
color: $dropdown-link-hover-color;
|
125
|
-
text-decoration: none;
|
159
|
+
text-decoration: if($link-hover-decoration == underline, none, null);
|
126
160
|
@include gradient-bg($dropdown-link-hover-bg);
|
127
161
|
}
|
128
162
|
|
@@ -136,11 +170,10 @@
|
|
136
170
|
&.disabled,
|
137
171
|
&:disabled {
|
138
172
|
color: $dropdown-link-disabled-color;
|
173
|
+
pointer-events: none;
|
139
174
|
background-color: transparent;
|
140
175
|
// Remove CSS gradients if they're enabled
|
141
|
-
|
142
|
-
background-image: none;
|
143
|
-
}
|
176
|
+
background-image: if($enable-gradients, none, null);
|
144
177
|
}
|
145
178
|
}
|
146
179
|
|
@@ -151,9 +184,9 @@
|
|
151
184
|
// Dropdown section headers
|
152
185
|
.dropdown-header {
|
153
186
|
display: block;
|
154
|
-
padding: $dropdown-
|
187
|
+
padding: $dropdown-header-padding;
|
155
188
|
margin-bottom: 0; // for use with heading elements
|
156
|
-
font-size
|
189
|
+
@include font-size($font-size-sm);
|
157
190
|
color: $dropdown-header-color;
|
158
191
|
white-space: nowrap; // as with > li > a
|
159
192
|
}
|
@@ -164,3 +197,44 @@
|
|
164
197
|
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
165
198
|
color: $dropdown-link-color;
|
166
199
|
}
|
200
|
+
|
201
|
+
// Dark dropdowns
|
202
|
+
.dropdown-menu-dark {
|
203
|
+
color: $dropdown-dark-color;
|
204
|
+
background-color: $dropdown-dark-bg;
|
205
|
+
border-color: $dropdown-dark-border-color;
|
206
|
+
@include box-shadow($dropdown-dark-box-shadow);
|
207
|
+
|
208
|
+
.dropdown-item {
|
209
|
+
color: $dropdown-dark-link-color;
|
210
|
+
|
211
|
+
&:hover,
|
212
|
+
&:focus {
|
213
|
+
color: $dropdown-dark-link-hover-color;
|
214
|
+
@include gradient-bg($dropdown-dark-link-hover-bg);
|
215
|
+
}
|
216
|
+
|
217
|
+
&.active,
|
218
|
+
&:active {
|
219
|
+
color: $dropdown-dark-link-active-color;
|
220
|
+
@include gradient-bg($dropdown-dark-link-active-bg);
|
221
|
+
}
|
222
|
+
|
223
|
+
&.disabled,
|
224
|
+
&:disabled {
|
225
|
+
color: $dropdown-dark-link-disabled-color;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
.dropdown-divider {
|
230
|
+
border-color: $dropdown-dark-divider-bg;
|
231
|
+
}
|
232
|
+
|
233
|
+
.dropdown-item-text {
|
234
|
+
color: $dropdown-dark-link-color;
|
235
|
+
}
|
236
|
+
|
237
|
+
.dropdown-header {
|
238
|
+
color: $dropdown-dark-header-color;
|
239
|
+
}
|
240
|
+
}
|
@@ -1,333 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
height: $input-height;
|
11
|
-
padding: $input-padding-y $input-padding-x;
|
12
|
-
font-size: $font-size-base;
|
13
|
-
line-height: $input-line-height;
|
14
|
-
color: $input-color;
|
15
|
-
background-color: $input-bg;
|
16
|
-
background-clip: padding-box;
|
17
|
-
border: $input-border-width solid $input-border-color;
|
18
|
-
|
19
|
-
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
20
|
-
@if $enable-rounded {
|
21
|
-
// Manually use the if/else instead of the mixin to account for iOS override
|
22
|
-
border-radius: $input-border-radius;
|
23
|
-
} @else {
|
24
|
-
// Otherwise undo the iOS default
|
25
|
-
border-radius: 0;
|
26
|
-
}
|
27
|
-
|
28
|
-
@include box-shadow($input-box-shadow);
|
29
|
-
@include transition($input-transition);
|
30
|
-
|
31
|
-
// Unstyle the caret on `<select>`s in IE10+.
|
32
|
-
&::-ms-expand {
|
33
|
-
background-color: transparent;
|
34
|
-
border: 0;
|
35
|
-
}
|
36
|
-
|
37
|
-
// Customize the `:focus` state to imitate native WebKit styles.
|
38
|
-
@include form-control-focus();
|
39
|
-
|
40
|
-
// Placeholder
|
41
|
-
&::placeholder {
|
42
|
-
color: $input-placeholder-color;
|
43
|
-
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
44
|
-
opacity: 1;
|
45
|
-
}
|
46
|
-
|
47
|
-
// Disabled and read-only inputs
|
48
|
-
//
|
49
|
-
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
50
|
-
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
51
|
-
// don't honor that edge case; we style them as disabled anyway.
|
52
|
-
&:disabled,
|
53
|
-
&[readonly] {
|
54
|
-
background-color: $input-disabled-bg;
|
55
|
-
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
56
|
-
opacity: 1;
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
select.form-control {
|
61
|
-
&:focus::-ms-value {
|
62
|
-
// Suppress the nested default white text on blue background highlight given to
|
63
|
-
// the selected option text when the (still closed) <select> receives focus
|
64
|
-
// in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
|
65
|
-
// match the appearance of the native widget.
|
66
|
-
// See https://github.com/twbs/bootstrap/issues/19398.
|
67
|
-
color: $input-color;
|
68
|
-
background-color: $input-bg;
|
69
|
-
}
|
70
|
-
}
|
71
|
-
|
72
|
-
// Make file inputs better match text inputs by forcing them to new lines.
|
73
|
-
.form-control-file,
|
74
|
-
.form-control-range {
|
75
|
-
display: block;
|
76
|
-
width: 100%;
|
77
|
-
}
|
78
|
-
|
79
|
-
|
80
|
-
//
|
81
|
-
// Labels
|
82
|
-
//
|
83
|
-
|
84
|
-
// For use with horizontal and inline forms, when you need the label (or legend)
|
85
|
-
// text to align with the form controls.
|
86
|
-
.col-form-label {
|
87
|
-
padding-top: calc(#{$input-padding-y} + #{$input-border-width});
|
88
|
-
padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
|
89
|
-
margin-bottom: 0; // Override the `<label>/<legend>` default
|
90
|
-
font-size: inherit; // Override the `<legend>` default
|
91
|
-
line-height: $input-line-height;
|
92
|
-
}
|
93
|
-
|
94
|
-
.col-form-label-lg {
|
95
|
-
padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
96
|
-
padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
97
|
-
font-size: $font-size-lg;
|
98
|
-
line-height: $input-line-height-lg;
|
99
|
-
}
|
100
|
-
|
101
|
-
.col-form-label-sm {
|
102
|
-
padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
103
|
-
padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
104
|
-
font-size: $font-size-sm;
|
105
|
-
line-height: $input-line-height-sm;
|
106
|
-
}
|
107
|
-
|
108
|
-
|
109
|
-
// Readonly controls as plain text
|
110
|
-
//
|
111
|
-
// Apply class to a readonly input to make it appear like regular plain
|
112
|
-
// text (without any border, background color, focus indicator)
|
113
|
-
|
114
|
-
.form-control-plaintext {
|
115
|
-
display: block;
|
116
|
-
width: 100%;
|
117
|
-
padding-top: $input-padding-y;
|
118
|
-
padding-bottom: $input-padding-y;
|
119
|
-
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
|
120
|
-
line-height: $input-line-height;
|
121
|
-
color: $input-plaintext-color;
|
122
|
-
background-color: transparent;
|
123
|
-
border: solid transparent;
|
124
|
-
border-width: $input-border-width 0;
|
125
|
-
|
126
|
-
&.form-control-sm,
|
127
|
-
&.form-control-lg {
|
128
|
-
padding-right: 0;
|
129
|
-
padding-left: 0;
|
130
|
-
}
|
131
|
-
}
|
132
|
-
|
133
|
-
|
134
|
-
// Form control sizing
|
135
|
-
//
|
136
|
-
// Build on `.form-control` with modifier classes to decrease or increase the
|
137
|
-
// height and font-size of form controls.
|
138
|
-
//
|
139
|
-
// Repeated in `_input_group.scss` to avoid Sass extend issues.
|
140
|
-
|
141
|
-
.form-control-sm {
|
142
|
-
height: $input-height-sm;
|
143
|
-
padding: $input-padding-y-sm $input-padding-x-sm;
|
144
|
-
font-size: $font-size-sm;
|
145
|
-
line-height: $input-line-height-sm;
|
146
|
-
@include border-radius($input-border-radius-sm);
|
147
|
-
}
|
148
|
-
|
149
|
-
.form-control-lg {
|
150
|
-
height: $input-height-lg;
|
151
|
-
padding: $input-padding-y-lg $input-padding-x-lg;
|
152
|
-
font-size: $font-size-lg;
|
153
|
-
line-height: $input-line-height-lg;
|
154
|
-
@include border-radius($input-border-radius-lg);
|
155
|
-
}
|
156
|
-
|
157
|
-
// stylelint-disable no-duplicate-selectors
|
158
|
-
select.form-control {
|
159
|
-
&[size],
|
160
|
-
&[multiple] {
|
161
|
-
height: auto;
|
162
|
-
}
|
163
|
-
}
|
164
|
-
|
165
|
-
textarea.form-control {
|
166
|
-
height: auto;
|
167
|
-
}
|
168
|
-
// stylelint-enable no-duplicate-selectors
|
169
|
-
|
170
|
-
// Form groups
|
171
|
-
//
|
172
|
-
// Designed to help with the organization and spacing of vertical forms. For
|
173
|
-
// horizontal forms, use the predefined grid classes.
|
174
|
-
|
175
|
-
.form-group {
|
176
|
-
margin-bottom: $form-group-margin-bottom;
|
177
|
-
}
|
178
|
-
|
179
|
-
.form-text {
|
180
|
-
display: block;
|
181
|
-
margin-top: $form-text-margin-top;
|
182
|
-
}
|
183
|
-
|
184
|
-
|
185
|
-
// Form grid
|
186
|
-
//
|
187
|
-
// Special replacement for our grid system's `.row` for tighter form layouts.
|
188
|
-
|
189
|
-
.form-row {
|
190
|
-
display: flex;
|
191
|
-
flex-wrap: wrap;
|
192
|
-
margin-right: -5px;
|
193
|
-
margin-left: -5px;
|
194
|
-
|
195
|
-
> .col,
|
196
|
-
> [class*="col-"] {
|
197
|
-
padding-right: 5px;
|
198
|
-
padding-left: 5px;
|
199
|
-
}
|
200
|
-
}
|
201
|
-
|
202
|
-
|
203
|
-
// Checkboxes and radios
|
204
|
-
//
|
205
|
-
// Indent the labels to position radios/checkboxes as hanging controls.
|
206
|
-
|
207
|
-
.form-check {
|
208
|
-
position: relative;
|
209
|
-
display: block;
|
210
|
-
padding-left: $form-check-input-gutter;
|
211
|
-
}
|
212
|
-
|
213
|
-
.form-check-input {
|
214
|
-
position: absolute;
|
215
|
-
margin-top: $form-check-input-margin-y;
|
216
|
-
margin-left: -$form-check-input-gutter;
|
217
|
-
|
218
|
-
&:disabled ~ .form-check-label {
|
219
|
-
color: $text-muted;
|
220
|
-
}
|
221
|
-
}
|
222
|
-
|
223
|
-
.form-check-label {
|
224
|
-
margin-bottom: 0; // Override default `<label>` bottom margin
|
225
|
-
}
|
226
|
-
|
227
|
-
.form-check-inline {
|
228
|
-
display: inline-flex;
|
229
|
-
align-items: center;
|
230
|
-
padding-left: 0; // Override base .form-check
|
231
|
-
margin-right: $form-check-inline-margin-x;
|
232
|
-
|
233
|
-
// Undo .form-check-input defaults and add some `margin-right`.
|
234
|
-
.form-check-input {
|
235
|
-
position: static;
|
236
|
-
margin-top: 0;
|
237
|
-
margin-right: $form-check-inline-input-margin-x;
|
238
|
-
margin-left: 0;
|
239
|
-
}
|
240
|
-
}
|
241
|
-
|
242
|
-
|
243
|
-
// Form validation
|
244
|
-
//
|
245
|
-
// Provide feedback to users when form field values are valid or invalid. Works
|
246
|
-
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
247
|
-
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
248
|
-
// server side validation.
|
249
|
-
|
250
|
-
@include form-validation-state("valid", $form-feedback-valid-color);
|
251
|
-
@include form-validation-state("invalid", $form-feedback-invalid-color);
|
252
|
-
|
253
|
-
// Inline forms
|
254
|
-
//
|
255
|
-
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
|
256
|
-
// forms begin stacked on extra small (mobile) devices and then go inline when
|
257
|
-
// viewports reach <768px.
|
258
|
-
//
|
259
|
-
// Requires wrapping inputs and labels with `.form-group` for proper display of
|
260
|
-
// default HTML form controls and our custom form controls (e.g., input groups).
|
261
|
-
|
262
|
-
.form-inline {
|
263
|
-
display: flex;
|
264
|
-
flex-flow: row wrap;
|
265
|
-
align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
|
266
|
-
|
267
|
-
// Because we use flex, the initial sizing of checkboxes is collapsed and
|
268
|
-
// doesn't occupy the full-width (which is what we want for xs grid tier),
|
269
|
-
// so we force that here.
|
270
|
-
.form-check {
|
271
|
-
width: 100%;
|
272
|
-
}
|
273
|
-
|
274
|
-
// Kick in the inline
|
275
|
-
@include media-breakpoint-up(sm) {
|
276
|
-
label {
|
277
|
-
display: flex;
|
278
|
-
align-items: center;
|
279
|
-
justify-content: center;
|
280
|
-
margin-bottom: 0;
|
281
|
-
}
|
282
|
-
|
283
|
-
// Inline-block all the things for "inline"
|
284
|
-
.form-group {
|
285
|
-
display: flex;
|
286
|
-
flex: 0 0 auto;
|
287
|
-
flex-flow: row wrap;
|
288
|
-
align-items: center;
|
289
|
-
margin-bottom: 0;
|
290
|
-
}
|
291
|
-
|
292
|
-
// Allow folks to *not* use `.form-group`
|
293
|
-
.form-control {
|
294
|
-
display: inline-block;
|
295
|
-
width: auto; // Prevent labels from stacking above inputs in `.form-group`
|
296
|
-
vertical-align: middle;
|
297
|
-
}
|
298
|
-
|
299
|
-
// Make static controls behave like regular ones
|
300
|
-
.form-control-plaintext {
|
301
|
-
display: inline-block;
|
302
|
-
}
|
303
|
-
|
304
|
-
.input-group,
|
305
|
-
.custom-select {
|
306
|
-
width: auto;
|
307
|
-
}
|
308
|
-
|
309
|
-
// Remove default margin on radios/checkboxes that were used for stacking, and
|
310
|
-
// then undo the floating of radios and checkboxes to match.
|
311
|
-
.form-check {
|
312
|
-
display: flex;
|
313
|
-
align-items: center;
|
314
|
-
justify-content: center;
|
315
|
-
width: auto;
|
316
|
-
padding-left: 0;
|
317
|
-
}
|
318
|
-
.form-check-input {
|
319
|
-
position: relative;
|
320
|
-
margin-top: 0;
|
321
|
-
margin-right: $form-check-input-margin-x;
|
322
|
-
margin-left: 0;
|
323
|
-
}
|
324
|
-
|
325
|
-
.custom-control {
|
326
|
-
align-items: center;
|
327
|
-
justify-content: center;
|
328
|
-
}
|
329
|
-
.custom-control-label {
|
330
|
-
margin-bottom: 0;
|
331
|
-
}
|
332
|
-
}
|
333
|
-
}
|
1
|
+
@import "forms/labels";
|
2
|
+
@import "forms/form-text";
|
3
|
+
@import "forms/form-control";
|
4
|
+
@import "forms/form-select";
|
5
|
+
@import "forms/form-check";
|
6
|
+
@import "forms/form-range";
|
7
|
+
@import "forms/floating-labels";
|
8
|
+
@import "forms/input-group";
|
9
|
+
@import "forms/validation";
|