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
@@ -8,7 +8,7 @@
|
|
8
8
|
$prev-key: null;
|
9
9
|
$prev-num: null;
|
10
10
|
@each $key, $num in $map {
|
11
|
-
@if $prev-num == null {
|
11
|
+
@if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" {
|
12
12
|
// Do nothing
|
13
13
|
} @else if not comparable($prev-num, $num) {
|
14
14
|
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
@@ -21,13 +21,38 @@
|
|
21
21
|
}
|
22
22
|
|
23
23
|
// Starts at zero
|
24
|
-
//
|
25
|
-
@mixin _assert-starts-at-zero($map) {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
@
|
24
|
+
// Used to ensure the min-width of the lowest breakpoint starts at 0.
|
25
|
+
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
|
26
|
+
@if length($map) > 0 {
|
27
|
+
$values: map-values($map);
|
28
|
+
$first-value: nth($values, 1);
|
29
|
+
@if $first-value != 0 {
|
30
|
+
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
// Internal Bootstrap function to turn maps into its negative variant.
|
36
|
+
// It prefixes the keys with `n` and makes the value negative.
|
37
|
+
@function negativify-map($map) {
|
38
|
+
$result: ();
|
39
|
+
@each $key, $value in $map {
|
40
|
+
@if $key != 0 {
|
41
|
+
$result: map-merge($result, ("n" + $key: (-$value)));
|
42
|
+
}
|
43
|
+
}
|
44
|
+
@return $result;
|
45
|
+
}
|
46
|
+
|
47
|
+
// Get multiple keys from a sass map
|
48
|
+
@function map-get-multiple($map, $values) {
|
49
|
+
$result: ();
|
50
|
+
@each $key, $value in $map {
|
51
|
+
@if (index($values, $key) != null) {
|
52
|
+
$result: map-merge($result, ($key: $value));
|
53
|
+
}
|
30
54
|
}
|
55
|
+
@return $result;
|
31
56
|
}
|
32
57
|
|
33
58
|
// Replace `$search` with `$replace` in `$string`
|
@@ -48,39 +73,133 @@
|
|
48
73
|
@return $string;
|
49
74
|
}
|
50
75
|
|
76
|
+
// See https://codepen.io/kevinweber/pen/dXWoRw
|
77
|
+
//
|
78
|
+
// Requires the use of quotes around data URIs.
|
79
|
+
|
80
|
+
@function escape-svg($string) {
|
81
|
+
@if str-index($string, "data:image/svg+xml") {
|
82
|
+
@each $char, $encoded in $escaped-characters {
|
83
|
+
// Do not escape the url brackets
|
84
|
+
@if str-index($string, "url(") == 1 {
|
85
|
+
$string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
|
86
|
+
} @else {
|
87
|
+
$string: str-replace($string, $char, $encoded);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
@return $string;
|
93
|
+
}
|
94
|
+
|
51
95
|
// Color contrast
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
96
|
+
// See https://github.com/twbs/bootstrap/pull/30168
|
97
|
+
|
98
|
+
// A list of pre-calculated numbers of pow(($value / 255 + .055) / 1.055, 2.4). (from 0 to 255)
|
99
|
+
// stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
|
100
|
+
$_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
|
101
|
+
|
102
|
+
@function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
|
103
|
+
$foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
|
104
|
+
$max-ratio: 0;
|
105
|
+
$max-ratio-color: null;
|
106
|
+
|
107
|
+
@each $color in $foregrounds {
|
108
|
+
$contrast-ratio: contrast-ratio($background, $color);
|
109
|
+
@if $contrast-ratio > $min-contrast-ratio {
|
110
|
+
@return $color;
|
111
|
+
} @else if $contrast-ratio > $max-ratio {
|
112
|
+
$max-ratio: $contrast-ratio;
|
113
|
+
$max-ratio-color: $color;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
@warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
|
56
118
|
|
57
|
-
|
119
|
+
@return $max-ratio-color;
|
120
|
+
}
|
121
|
+
|
122
|
+
@function contrast-ratio($background, $foreground: $color-contrast-light) {
|
123
|
+
$l1: luminance($background);
|
124
|
+
$l2: luminance(opaque($background, $foreground));
|
125
|
+
|
126
|
+
@return if($l1 > $l2, ($l1 + .05) / ($l2 + .05), ($l2 + .05) / ($l1 + .05));
|
127
|
+
}
|
128
|
+
|
129
|
+
// Return WCAG2.0 relative luminance
|
130
|
+
// See https://www.w3.org/WAI/GL/wiki/Relative_luminance
|
131
|
+
// See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
|
132
|
+
@function luminance($color) {
|
133
|
+
$rgb: (
|
134
|
+
"r": red($color),
|
135
|
+
"g": green($color),
|
136
|
+
"b": blue($color)
|
137
|
+
);
|
58
138
|
|
59
|
-
@
|
60
|
-
|
61
|
-
|
62
|
-
@return $yiq-text-light;
|
139
|
+
@each $name, $value in $rgb {
|
140
|
+
$value: if($value / 255 < .03928, $value / 255 / 12.92, nth($_luminance-list, $value + 1));
|
141
|
+
$rgb: map-merge($rgb, ($name: $value));
|
63
142
|
}
|
143
|
+
|
144
|
+
@return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
|
64
145
|
}
|
65
146
|
|
66
|
-
//
|
67
|
-
|
68
|
-
|
147
|
+
// Return opaque color
|
148
|
+
// opaque(#fff, rgba(0, 0, 0, .5)) => #808080
|
149
|
+
@function opaque($background, $foreground) {
|
150
|
+
@return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
|
69
151
|
}
|
70
152
|
|
71
|
-
|
72
|
-
|
153
|
+
// scss-docs-start color-functions
|
154
|
+
// Tint a color: mix a color with white
|
155
|
+
@function tint-color($color, $weight) {
|
156
|
+
@return mix(white, $color, $weight);
|
73
157
|
}
|
74
158
|
|
75
|
-
|
76
|
-
|
159
|
+
// Shade a color: mix a color with black
|
160
|
+
@function shade-color($color, $weight) {
|
161
|
+
@return mix(black, $color, $weight);
|
77
162
|
}
|
78
163
|
|
79
|
-
//
|
80
|
-
@function
|
81
|
-
$color
|
82
|
-
|
83
|
-
|
164
|
+
// Shade the color if the weight is positive, else tint it
|
165
|
+
@function shift-color($color, $weight) {
|
166
|
+
@return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
|
167
|
+
}
|
168
|
+
// scss-docs-end color-functions
|
169
|
+
|
170
|
+
// Return valid calc
|
171
|
+
@function add($value1, $value2, $return-calc: true) {
|
172
|
+
@if $value1 == null {
|
173
|
+
@return $value2;
|
174
|
+
}
|
175
|
+
|
176
|
+
@if $value2 == null {
|
177
|
+
@return $value1;
|
178
|
+
}
|
179
|
+
|
180
|
+
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
181
|
+
@return $value1 + $value2;
|
182
|
+
}
|
183
|
+
|
184
|
+
@return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
|
185
|
+
}
|
186
|
+
|
187
|
+
@function subtract($value1, $value2, $return-calc: true) {
|
188
|
+
@if $value1 == null and $value2 == null {
|
189
|
+
@return null;
|
190
|
+
}
|
191
|
+
|
192
|
+
@if $value1 == null {
|
193
|
+
@return -$value2;
|
194
|
+
}
|
195
|
+
|
196
|
+
@if $value2 == null {
|
197
|
+
@return $value1;
|
198
|
+
}
|
199
|
+
|
200
|
+
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
201
|
+
@return $value1 - $value2;
|
202
|
+
}
|
84
203
|
|
85
|
-
@return
|
204
|
+
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
86
205
|
}
|
@@ -1,48 +1,18 @@
|
|
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
|
-
.container {
|
7
|
-
@include make-container();
|
8
|
-
@include make-container-max-widths();
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
// Fluid container
|
13
|
-
//
|
14
|
-
// Utilizes the mixin meant for fixed width containers, but with 100% width for
|
15
|
-
// fluid, full width layouts.
|
16
|
-
|
17
|
-
@if $enable-grid-classes {
|
18
|
-
.container-fluid {
|
19
|
-
@include make-container();
|
20
|
-
}
|
21
|
-
}
|
22
|
-
|
23
1
|
// Row
|
24
2
|
//
|
25
|
-
// Rows contain
|
3
|
+
// Rows contain your columns.
|
26
4
|
|
27
5
|
@if $enable-grid-classes {
|
28
6
|
.row {
|
29
7
|
@include make-row();
|
30
|
-
}
|
31
|
-
|
32
|
-
// Remove the negative margin from default .row, then the horizontal padding
|
33
|
-
// from all immediate children columns (to prevent runaway style inheritance).
|
34
|
-
.no-gutters {
|
35
|
-
margin-right: 0;
|
36
|
-
margin-left: 0;
|
37
8
|
|
38
|
-
>
|
39
|
-
|
40
|
-
padding-right: 0;
|
41
|
-
padding-left: 0;
|
9
|
+
> * {
|
10
|
+
@include make-col-ready();
|
42
11
|
}
|
43
12
|
}
|
44
13
|
}
|
45
14
|
|
15
|
+
|
46
16
|
// Columns
|
47
17
|
//
|
48
18
|
// Common styles for small and large grid columns
|
@@ -6,7 +6,7 @@
|
|
6
6
|
// which weren't expecting the images within themselves to be involuntarily resized.
|
7
7
|
// See also https://github.com/twbs/bootstrap/issues/18178
|
8
8
|
.img-fluid {
|
9
|
-
@include img-fluid;
|
9
|
+
@include img-fluid();
|
10
10
|
}
|
11
11
|
|
12
12
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
@include box-shadow($thumbnail-box-shadow);
|
20
20
|
|
21
21
|
// Keep them at most 100% wide
|
22
|
-
@include img-fluid;
|
22
|
+
@include img-fluid();
|
23
23
|
}
|
24
24
|
|
25
25
|
//
|
@@ -32,11 +32,11 @@
|
|
32
32
|
}
|
33
33
|
|
34
34
|
.figure-img {
|
35
|
-
margin-bottom:
|
35
|
+
margin-bottom: $spacer / 2;
|
36
36
|
line-height: 1;
|
37
37
|
}
|
38
38
|
|
39
39
|
.figure-caption {
|
40
|
-
font-size
|
40
|
+
@include font-size($figure-caption-font-size);
|
41
41
|
color: $figure-caption-color;
|
42
42
|
}
|
@@ -9,6 +9,18 @@
|
|
9
9
|
// No need to set list-style: none; since .list-group-item is block level
|
10
10
|
padding-left: 0; // reset padding because ul and ol
|
11
11
|
margin-bottom: 0;
|
12
|
+
@include border-radius($list-group-border-radius);
|
13
|
+
}
|
14
|
+
|
15
|
+
.list-group-numbered {
|
16
|
+
list-style-type: none;
|
17
|
+
counter-reset: section;
|
18
|
+
|
19
|
+
> li::before {
|
20
|
+
// Increments only this instance of the section counter
|
21
|
+
content: counters(section, ".") ". ";
|
22
|
+
counter-increment: section;
|
23
|
+
}
|
12
24
|
}
|
13
25
|
|
14
26
|
|
@@ -23,7 +35,9 @@
|
|
23
35
|
text-align: inherit; // For `<button>`s (anchors inherit)
|
24
36
|
|
25
37
|
// Hover state
|
26
|
-
|
38
|
+
&:hover,
|
39
|
+
&:focus {
|
40
|
+
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
27
41
|
color: $list-group-action-hover-color;
|
28
42
|
text-decoration: none;
|
29
43
|
background-color: $list-group-hover-bg;
|
@@ -44,28 +58,23 @@
|
|
44
58
|
position: relative;
|
45
59
|
display: block;
|
46
60
|
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
47
|
-
|
48
|
-
|
61
|
+
color: $list-group-color;
|
62
|
+
text-decoration: if($link-decoration == none, null, none);
|
49
63
|
background-color: $list-group-bg;
|
50
64
|
border: $list-group-border-width solid $list-group-border-color;
|
51
65
|
|
52
66
|
&:first-child {
|
53
|
-
@include border-top-radius(
|
67
|
+
@include border-top-radius(inherit);
|
54
68
|
}
|
55
69
|
|
56
70
|
&:last-child {
|
57
|
-
|
58
|
-
@include border-bottom-radius($list-group-border-radius);
|
59
|
-
}
|
60
|
-
|
61
|
-
@include hover-focus {
|
62
|
-
z-index: 1; // Place hover/active items above their siblings for proper border styling
|
63
|
-
text-decoration: none;
|
71
|
+
@include border-bottom-radius(inherit);
|
64
72
|
}
|
65
73
|
|
66
74
|
&.disabled,
|
67
75
|
&:disabled {
|
68
76
|
color: $list-group-disabled-color;
|
77
|
+
pointer-events: none;
|
69
78
|
background-color: $list-group-disabled-bg;
|
70
79
|
}
|
71
80
|
|
@@ -76,6 +85,56 @@
|
|
76
85
|
background-color: $list-group-active-bg;
|
77
86
|
border-color: $list-group-active-border-color;
|
78
87
|
}
|
88
|
+
|
89
|
+
& + & {
|
90
|
+
border-top-width: 0;
|
91
|
+
|
92
|
+
&.active {
|
93
|
+
margin-top: -$list-group-border-width;
|
94
|
+
border-top-width: $list-group-border-width;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
|
100
|
+
// Horizontal
|
101
|
+
//
|
102
|
+
// Change the layout of list group items from vertical (default) to horizontal.
|
103
|
+
|
104
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
105
|
+
@include media-breakpoint-up($breakpoint) {
|
106
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
107
|
+
|
108
|
+
.list-group-horizontal#{$infix} {
|
109
|
+
flex-direction: row;
|
110
|
+
|
111
|
+
> .list-group-item {
|
112
|
+
&:first-child {
|
113
|
+
@include border-bottom-start-radius($list-group-border-radius);
|
114
|
+
@include border-top-end-radius(0);
|
115
|
+
}
|
116
|
+
|
117
|
+
&:last-child {
|
118
|
+
@include border-top-end-radius($list-group-border-radius);
|
119
|
+
@include border-bottom-start-radius(0);
|
120
|
+
}
|
121
|
+
|
122
|
+
&.active {
|
123
|
+
margin-top: 0;
|
124
|
+
}
|
125
|
+
|
126
|
+
+ .list-group-item {
|
127
|
+
border-top-width: $list-group-border-width;
|
128
|
+
border-left-width: 0;
|
129
|
+
|
130
|
+
&.active {
|
131
|
+
margin-left: -$list-group-border-width;
|
132
|
+
border-left-width: $list-group-border-width;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
79
138
|
}
|
80
139
|
|
81
140
|
|
@@ -85,31 +144,31 @@
|
|
85
144
|
// useful within other components (e.g., cards).
|
86
145
|
|
87
146
|
.list-group-flush {
|
88
|
-
|
89
|
-
border-right: 0;
|
90
|
-
border-left: 0;
|
91
|
-
@include border-radius(0);
|
92
|
-
}
|
147
|
+
@include border-radius(0);
|
93
148
|
|
94
|
-
|
95
|
-
|
96
|
-
border-top: 0;
|
97
|
-
}
|
98
|
-
}
|
149
|
+
> .list-group-item {
|
150
|
+
border-width: 0 0 $list-group-border-width;
|
99
151
|
|
100
|
-
|
101
|
-
|
102
|
-
border-bottom: 0;
|
152
|
+
&:last-child {
|
153
|
+
border-bottom-width: 0;
|
103
154
|
}
|
104
155
|
}
|
105
156
|
}
|
106
157
|
|
107
158
|
|
108
|
-
//
|
159
|
+
// scss-docs-start list-group-modifiers
|
160
|
+
// List group contextual variants
|
109
161
|
//
|
110
162
|
// Add modifier classes to change text and background color on individual items.
|
111
163
|
// Organizationally, this must come after the `:hover` states.
|
112
164
|
|
113
|
-
@each $
|
114
|
-
|
165
|
+
@each $state, $value in $theme-colors {
|
166
|
+
$list-group-background: shift-color($value, $list-group-item-bg-scale);
|
167
|
+
$list-group-color: shift-color($value, $list-group-item-color-scale);
|
168
|
+
@if (contrast-ratio($list-group-background, $list-group-color) < $min-contrast-ratio) {
|
169
|
+
$list-group-color: mix($value, color-contrast($list-group-background), abs($list-group-item-color-scale));
|
170
|
+
}
|
171
|
+
|
172
|
+
@include list-group-item-variant($state, $list-group-background, $list-group-color);
|
115
173
|
}
|
174
|
+
// scss-docs-end list-group-modifiers
|
@@ -2,40 +2,41 @@
|
|
2
2
|
//
|
3
3
|
// Used in conjunction with global variables to enable certain theme features.
|
4
4
|
|
5
|
-
//
|
5
|
+
// Vendor
|
6
|
+
@import "vendor/rfs";
|
7
|
+
|
8
|
+
// Deprecate
|
9
|
+
@import "mixins/deprecate";
|
10
|
+
|
11
|
+
// Helpers
|
6
12
|
@import "mixins/breakpoints";
|
7
|
-
@import "mixins/
|
13
|
+
@import "mixins/color-scheme";
|
8
14
|
@import "mixins/image";
|
9
|
-
@import "mixins/badge";
|
10
15
|
@import "mixins/resize";
|
11
|
-
@import "mixins/
|
12
|
-
@import "mixins/size";
|
16
|
+
@import "mixins/visually-hidden";
|
13
17
|
@import "mixins/reset-text";
|
14
|
-
@import "mixins/text-emphasis";
|
15
|
-
@import "mixins/text-hide";
|
16
18
|
@import "mixins/text-truncate";
|
17
|
-
@import "mixins/visibility";
|
18
19
|
|
19
|
-
//
|
20
|
+
// Utilities
|
21
|
+
@import "mixins/utilities";
|
22
|
+
|
23
|
+
// Components
|
20
24
|
@import "mixins/alert";
|
21
25
|
@import "mixins/buttons";
|
22
26
|
@import "mixins/caret";
|
23
27
|
@import "mixins/pagination";
|
24
28
|
@import "mixins/lists";
|
25
29
|
@import "mixins/list-group";
|
26
|
-
@import "mixins/nav-divider";
|
27
30
|
@import "mixins/forms";
|
28
|
-
@import "mixins/table-
|
31
|
+
@import "mixins/table-variants";
|
29
32
|
|
30
|
-
//
|
31
|
-
@import "mixins/background-variant";
|
33
|
+
// Skins
|
32
34
|
@import "mixins/border-radius";
|
33
35
|
@import "mixins/box-shadow";
|
34
36
|
@import "mixins/gradients";
|
35
37
|
@import "mixins/transition";
|
36
38
|
|
37
|
-
//
|
39
|
+
// Layout
|
38
40
|
@import "mixins/clearfix";
|
39
|
-
@import "mixins/
|
41
|
+
@import "mixins/container";
|
40
42
|
@import "mixins/grid";
|
41
|
-
@import "mixins/float";
|