bootstrap 4.4.1 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +13 -2
- data/README.md +7 -4
- 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 -8
- data/assets/javascripts/bootstrap.js +3244 -2770
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +130 -124
- data/assets/javascripts/bootstrap/base-component.js +168 -0
- data/assets/javascripts/bootstrap/button.js +85 -179
- data/assets/javascripts/bootstrap/carousel.js +430 -405
- data/assets/javascripts/bootstrap/collapse.js +325 -264
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +315 -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 +464 -400
- data/assets/javascripts/bootstrap/modal.js +604 -464
- data/assets/javascripts/bootstrap/offcanvas.js +671 -0
- data/assets/javascripts/bootstrap/popover.js +119 -192
- data/assets/javascripts/bootstrap/scrollspy.js +250 -238
- data/assets/javascripts/bootstrap/tab.js +189 -151
- data/assets/javascripts/bootstrap/toast.js +215 -192
- data/assets/javascripts/bootstrap/tooltip.js +604 -544
- data/assets/stylesheets/_bootstrap-grid.scss +54 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
- data/assets/stylesheets/_bootstrap.scss +19 -11
- data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -9
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -18
- data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
- data/assets/stylesheets/bootstrap/_buttons.scss +27 -55
- data/assets/stylesheets/bootstrap/_card.scss +43 -106
- data/assets/stylesheets/bootstrap/_carousel.scss +65 -33
- data/assets/stylesheets/bootstrap/_close.scss +30 -31
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +87 -38
- data/assets/stylesheets/bootstrap/_forms.scss +9 -338
- data/assets/stylesheets/bootstrap/_functions.scss +99 -28
- data/assets/stylesheets/bootstrap/_grid.scss +3 -50
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +38 -22
- data/assets/stylesheets/bootstrap/_mixins.scss +8 -13
- data/assets/stylesheets/bootstrap/_modal.scss +45 -65
- data/assets/stylesheets/bootstrap/_nav.scss +28 -9
- data/assets/stylesheets/bootstrap/_navbar.scss +51 -69
- data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +11 -20
- data/assets/stylesheets/bootstrap/_popover.scss +15 -27
- data/assets/stylesheets/bootstrap/_progress.scss +6 -4
- data/assets/stylesheets/bootstrap/_reboot.scss +339 -200
- data/assets/stylesheets/bootstrap/_root.scss +5 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +21 -7
- data/assets/stylesheets/bootstrap/_tables.scss +80 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +21 -14
- data/assets/stylesheets/bootstrap/_tooltip.scss +17 -17
- data/assets/stylesheets/bootstrap/_transitions.scss +2 -1
- data/assets/stylesheets/bootstrap/_type.scss +38 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +594 -17
- data/assets/stylesheets/bootstrap/_variables.scss +810 -489
- 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/{utilities → helpers}/_clearfix.scss +0 -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 +37 -22
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +75 -52
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
- 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/_forms.scss +42 -75
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +90 -34
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
- 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 +18 -8
- 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 +234 -126
- data/bootstrap.gemspec +1 -3
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +20 -5
- data/tasks/updater/network.rb +8 -2
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- 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
- metadata +48 -73
- data/assets/javascripts/bootstrap/util.js +0 -188
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -521
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -191
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- 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 -22
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -71
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
- 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 -75
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
- 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 -20
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
@@ -23,11 +23,36 @@
|
|
23
23
|
// Starts at zero
|
24
24
|
// Used to ensure the min-width of the lowest breakpoint starts at 0.
|
25
25
|
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
@
|
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
|
+
}
|
30
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
|
+
}
|
54
|
+
}
|
55
|
+
@return $result;
|
31
56
|
}
|
32
57
|
|
33
58
|
// Replace `$search` with `$replace` in `$string`
|
@@ -49,10 +74,18 @@
|
|
49
74
|
}
|
50
75
|
|
51
76
|
// See https://codepen.io/kevinweber/pen/dXWoRw
|
77
|
+
//
|
78
|
+
// Requires the use of quotes around data URIs.
|
79
|
+
|
52
80
|
@function escape-svg($string) {
|
53
81
|
@if str-index($string, "data:image/svg+xml") {
|
54
82
|
@each $char, $encoded in $escaped-characters {
|
55
|
-
|
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
|
+
}
|
56
89
|
}
|
57
90
|
}
|
58
91
|
|
@@ -60,41 +93,79 @@
|
|
60
93
|
}
|
61
94
|
|
62
95
|
// Color contrast
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
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
|
+
}
|
67
116
|
|
68
|
-
|
117
|
+
@warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
|
69
118
|
|
70
|
-
@
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
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));
|
75
127
|
}
|
76
128
|
|
77
|
-
//
|
78
|
-
|
79
|
-
|
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
|
+
);
|
138
|
+
|
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));
|
142
|
+
}
|
143
|
+
|
144
|
+
@return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
|
80
145
|
}
|
81
146
|
|
82
|
-
|
83
|
-
|
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);
|
84
151
|
}
|
85
152
|
|
86
|
-
|
87
|
-
|
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);
|
88
157
|
}
|
89
158
|
|
90
|
-
//
|
91
|
-
@function
|
92
|
-
$color
|
93
|
-
|
94
|
-
$level: abs($level);
|
159
|
+
// Shade a color: mix a color with black
|
160
|
+
@function shade-color($color, $weight) {
|
161
|
+
@return mix(black, $color, $weight);
|
162
|
+
}
|
95
163
|
|
96
|
-
|
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));
|
97
167
|
}
|
168
|
+
// scss-docs-end color-functions
|
98
169
|
|
99
170
|
// Return valid calc
|
100
171
|
@function add($value1, $value2, $return-calc: true) {
|
@@ -1,42 +1,3 @@
|
|
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
|
-
@include make-container();
|
9
|
-
@include make-container-max-widths();
|
10
|
-
}
|
11
|
-
|
12
|
-
// 100% wide container at all breakpoints
|
13
|
-
.container-fluid {
|
14
|
-
@include make-container();
|
15
|
-
}
|
16
|
-
|
17
|
-
// Responsive containers that are 100% wide until a breakpoint
|
18
|
-
@each $breakpoint, $container-max-width in $container-max-widths {
|
19
|
-
.container-#{$breakpoint} {
|
20
|
-
@extend .container-fluid;
|
21
|
-
}
|
22
|
-
|
23
|
-
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
|
24
|
-
%responsive-container-#{$breakpoint} {
|
25
|
-
max-width: $container-max-width;
|
26
|
-
}
|
27
|
-
|
28
|
-
@each $name, $width in $grid-breakpoints {
|
29
|
-
@if ($container-max-width > $width or $breakpoint == $name) {
|
30
|
-
.container#{breakpoint-infix($name, $grid-breakpoints)} {
|
31
|
-
@extend %responsive-container-#{$breakpoint};
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
|
40
1
|
// Row
|
41
2
|
//
|
42
3
|
// Rows contain your columns.
|
@@ -44,22 +5,14 @@
|
|
44
5
|
@if $enable-grid-classes {
|
45
6
|
.row {
|
46
7
|
@include make-row();
|
47
|
-
}
|
48
8
|
|
49
|
-
|
50
|
-
|
51
|
-
.no-gutters {
|
52
|
-
margin-right: 0;
|
53
|
-
margin-left: 0;
|
54
|
-
|
55
|
-
> .col,
|
56
|
-
> [class*="col-"] {
|
57
|
-
padding-right: 0;
|
58
|
-
padding-left: 0;
|
9
|
+
> * {
|
10
|
+
@include make-col-ready();
|
59
11
|
}
|
60
12
|
}
|
61
13
|
}
|
62
14
|
|
15
|
+
|
63
16
|
// Columns
|
64
17
|
//
|
65
18
|
// Common styles for small and large grid columns
|
@@ -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,8 @@
|
|
23
35
|
text-align: inherit; // For `<button>`s (anchors inherit)
|
24
36
|
|
25
37
|
// Hover state
|
26
|
-
|
38
|
+
&:hover,
|
39
|
+
&:focus {
|
27
40
|
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
28
41
|
color: $list-group-action-hover-color;
|
29
42
|
text-decoration: none;
|
@@ -46,15 +59,16 @@
|
|
46
59
|
display: block;
|
47
60
|
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
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
|
-
@include border-bottom-radius(
|
71
|
+
@include border-bottom-radius(inherit);
|
58
72
|
}
|
59
73
|
|
60
74
|
&.disabled,
|
@@ -94,22 +108,22 @@
|
|
94
108
|
.list-group-horizontal#{$infix} {
|
95
109
|
flex-direction: row;
|
96
110
|
|
97
|
-
.list-group-item {
|
111
|
+
> .list-group-item {
|
98
112
|
&:first-child {
|
99
|
-
@include border-bottom-
|
100
|
-
@include border-top-
|
113
|
+
@include border-bottom-start-radius($list-group-border-radius);
|
114
|
+
@include border-top-end-radius(0);
|
101
115
|
}
|
102
116
|
|
103
117
|
&:last-child {
|
104
|
-
@include border-top-
|
105
|
-
@include border-bottom-
|
118
|
+
@include border-top-end-radius($list-group-border-radius);
|
119
|
+
@include border-bottom-start-radius(0);
|
106
120
|
}
|
107
121
|
|
108
122
|
&.active {
|
109
123
|
margin-top: 0;
|
110
124
|
}
|
111
125
|
|
112
|
-
|
126
|
+
+ .list-group-item {
|
113
127
|
border-top-width: $list-group-border-width;
|
114
128
|
border-left-width: 0;
|
115
129
|
|
@@ -130,29 +144,31 @@
|
|
130
144
|
// useful within other components (e.g., cards).
|
131
145
|
|
132
146
|
.list-group-flush {
|
133
|
-
|
134
|
-
border-right-width: 0;
|
135
|
-
border-left-width: 0;
|
136
|
-
@include border-radius(0);
|
147
|
+
@include border-radius(0);
|
137
148
|
|
138
|
-
|
139
|
-
|
140
|
-
}
|
141
|
-
}
|
149
|
+
> .list-group-item {
|
150
|
+
border-width: 0 0 $list-group-border-width;
|
142
151
|
|
143
|
-
|
144
|
-
.list-group-item:last-child {
|
152
|
+
&:last-child {
|
145
153
|
border-bottom-width: 0;
|
146
154
|
}
|
147
155
|
}
|
148
156
|
}
|
149
157
|
|
150
158
|
|
151
|
-
//
|
159
|
+
// scss-docs-start list-group-modifiers
|
160
|
+
// List group contextual variants
|
152
161
|
//
|
153
162
|
// Add modifier classes to change text and background color on individual items.
|
154
163
|
// Organizationally, this must come after the `:hover` states.
|
155
164
|
|
156
|
-
@each $
|
157
|
-
|
165
|
+
@each $state, $value in $theme-colors {
|
166
|
+
$list-group-variant-bg: shift-color($value, $list-group-item-bg-scale);
|
167
|
+
$list-group-variant-color: shift-color($value, $list-group-item-color-scale);
|
168
|
+
@if (contrast-ratio($list-group-variant-bg, $list-group-variant-color) < $min-contrast-ratio) {
|
169
|
+
$list-group-variant-color: mix($value, color-contrast($list-group-variant-bg), abs($list-group-item-color-scale));
|
170
|
+
}
|
171
|
+
|
172
|
+
@include list-group-item-variant($state, $list-group-variant-bg, $list-group-variant-color);
|
158
173
|
}
|
174
|
+
// scss-docs-end list-group-modifiers
|
@@ -8,19 +8,17 @@
|
|
8
8
|
// Deprecate
|
9
9
|
@import "mixins/deprecate";
|
10
10
|
|
11
|
-
//
|
11
|
+
// Helpers
|
12
12
|
@import "mixins/breakpoints";
|
13
|
-
@import "mixins/
|
13
|
+
@import "mixins/color-scheme";
|
14
14
|
@import "mixins/image";
|
15
|
-
@import "mixins/badge";
|
16
15
|
@import "mixins/resize";
|
17
|
-
@import "mixins/
|
18
|
-
@import "mixins/size";
|
16
|
+
@import "mixins/visually-hidden";
|
19
17
|
@import "mixins/reset-text";
|
20
|
-
@import "mixins/text-emphasis";
|
21
|
-
@import "mixins/text-hide";
|
22
18
|
@import "mixins/text-truncate";
|
23
|
-
|
19
|
+
|
20
|
+
// Utilities
|
21
|
+
@import "mixins/utilities";
|
24
22
|
|
25
23
|
// Components
|
26
24
|
@import "mixins/alert";
|
@@ -29,12 +27,10 @@
|
|
29
27
|
@import "mixins/pagination";
|
30
28
|
@import "mixins/lists";
|
31
29
|
@import "mixins/list-group";
|
32
|
-
@import "mixins/nav-divider";
|
33
30
|
@import "mixins/forms";
|
34
|
-
@import "mixins/table-
|
31
|
+
@import "mixins/table-variants";
|
35
32
|
|
36
33
|
// Skins
|
37
|
-
@import "mixins/background-variant";
|
38
34
|
@import "mixins/border-radius";
|
39
35
|
@import "mixins/box-shadow";
|
40
36
|
@import "mixins/gradients";
|
@@ -42,6 +38,5 @@
|
|
42
38
|
|
43
39
|
// Layout
|
44
40
|
@import "mixins/clearfix";
|
45
|
-
@import "mixins/
|
41
|
+
@import "mixins/container";
|
46
42
|
@import "mixins/grid";
|
47
|
-
@import "mixins/float";
|
@@ -4,16 +4,6 @@
|
|
4
4
|
// .modal-content - actual modal w/ bg and corners and stuff
|
5
5
|
|
6
6
|
|
7
|
-
.modal-open {
|
8
|
-
// Kill the scroll on the body
|
9
|
-
overflow: hidden;
|
10
|
-
|
11
|
-
.modal {
|
12
|
-
overflow-x: hidden;
|
13
|
-
overflow-y: auto;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
7
|
// Container that the modal scrolls within
|
18
8
|
.modal {
|
19
9
|
position: fixed;
|
@@ -23,7 +13,8 @@
|
|
23
13
|
display: none;
|
24
14
|
width: 100%;
|
25
15
|
height: 100%;
|
26
|
-
overflow: hidden;
|
16
|
+
overflow-x: hidden;
|
17
|
+
overflow-y: auto;
|
27
18
|
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
28
19
|
// https://github.com/twbs/bootstrap/pull/10951.
|
29
20
|
outline: 0;
|
@@ -56,19 +47,13 @@
|
|
56
47
|
}
|
57
48
|
|
58
49
|
.modal-dialog-scrollable {
|
59
|
-
|
60
|
-
max-height: subtract(100%, $modal-dialog-margin * 2);
|
50
|
+
height: subtract(100%, $modal-dialog-margin * 2);
|
61
51
|
|
62
52
|
.modal-content {
|
63
|
-
max-height:
|
53
|
+
max-height: 100%;
|
64
54
|
overflow: hidden;
|
65
55
|
}
|
66
56
|
|
67
|
-
.modal-header,
|
68
|
-
.modal-footer {
|
69
|
-
flex-shrink: 0;
|
70
|
-
}
|
71
|
-
|
72
57
|
.modal-body {
|
73
58
|
overflow-y: auto;
|
74
59
|
}
|
@@ -78,28 +63,6 @@
|
|
78
63
|
display: flex;
|
79
64
|
align-items: center;
|
80
65
|
min-height: subtract(100%, $modal-dialog-margin * 2);
|
81
|
-
|
82
|
-
// Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
|
83
|
-
&::before {
|
84
|
-
display: block; // IE10
|
85
|
-
height: subtract(100vh, $modal-dialog-margin * 2);
|
86
|
-
content: "";
|
87
|
-
}
|
88
|
-
|
89
|
-
// Ensure `.modal-body` shows scrollbar (IE10/11)
|
90
|
-
&.modal-dialog-scrollable {
|
91
|
-
flex-direction: column;
|
92
|
-
justify-content: center;
|
93
|
-
height: 100%;
|
94
|
-
|
95
|
-
.modal-content {
|
96
|
-
max-height: none;
|
97
|
-
}
|
98
|
-
|
99
|
-
&::before {
|
100
|
-
content: none;
|
101
|
-
}
|
102
|
-
}
|
103
66
|
}
|
104
67
|
|
105
68
|
// Actual modal
|
@@ -139,16 +102,16 @@
|
|
139
102
|
// Top section of the modal w/ title and dismiss
|
140
103
|
.modal-header {
|
141
104
|
display: flex;
|
142
|
-
|
105
|
+
flex-shrink: 0;
|
106
|
+
align-items: center;
|
143
107
|
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
144
108
|
padding: $modal-header-padding;
|
145
109
|
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
146
110
|
@include border-top-radius($modal-content-inner-border-radius);
|
147
111
|
|
148
|
-
.close {
|
149
|
-
padding: $modal-header-padding;
|
150
|
-
|
151
|
-
margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) auto;
|
112
|
+
.btn-close {
|
113
|
+
padding: ($modal-header-padding-y / 2) ($modal-header-padding-x / 2);
|
114
|
+
margin: ($modal-header-padding-y / -2) ($modal-header-padding-x / -2) ($modal-header-padding-y / -2) auto;
|
152
115
|
}
|
153
116
|
}
|
154
117
|
|
@@ -172,6 +135,7 @@
|
|
172
135
|
.modal-footer {
|
173
136
|
display: flex;
|
174
137
|
flex-wrap: wrap;
|
138
|
+
flex-shrink: 0;
|
175
139
|
align-items: center; // vertically center
|
176
140
|
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
177
141
|
padding: $modal-inner-padding - $modal-footer-margin-between / 2;
|
@@ -181,21 +145,11 @@
|
|
181
145
|
// Place margin between footer elements
|
182
146
|
// This solution is far from ideal because of the universal selector usage,
|
183
147
|
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
|
184
|
-
// stylelint-disable-next-line selector-max-universal
|
185
148
|
> * {
|
186
149
|
margin: $modal-footer-margin-between / 2;
|
187
150
|
}
|
188
151
|
}
|
189
152
|
|
190
|
-
// Measure scrollbar width for padding body during modal show/hide
|
191
|
-
.modal-scrollbar-measure {
|
192
|
-
position: absolute;
|
193
|
-
top: -9999px;
|
194
|
-
width: 50px;
|
195
|
-
height: 50px;
|
196
|
-
overflow: scroll;
|
197
|
-
}
|
198
|
-
|
199
153
|
// Scale up the modal
|
200
154
|
@include media-breakpoint-up(sm) {
|
201
155
|
// Automatically set modal's width for larger viewports
|
@@ -205,19 +159,11 @@
|
|
205
159
|
}
|
206
160
|
|
207
161
|
.modal-dialog-scrollable {
|
208
|
-
|
209
|
-
|
210
|
-
.modal-content {
|
211
|
-
max-height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
|
212
|
-
}
|
162
|
+
height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
213
163
|
}
|
214
164
|
|
215
165
|
.modal-dialog-centered {
|
216
166
|
min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
|
217
|
-
|
218
|
-
&::before {
|
219
|
-
height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
|
220
|
-
}
|
221
167
|
}
|
222
168
|
|
223
169
|
.modal-content {
|
@@ -237,3 +183,37 @@
|
|
237
183
|
@include media-breakpoint-up(xl) {
|
238
184
|
.modal-xl { max-width: $modal-xl; }
|
239
185
|
}
|
186
|
+
|
187
|
+
// scss-docs-start modal-fullscreen-loop
|
188
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
189
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
190
|
+
$postfix: if($infix != "", $infix + "-down", "");
|
191
|
+
|
192
|
+
@include media-breakpoint-down($breakpoint) {
|
193
|
+
.modal-fullscreen#{$postfix} {
|
194
|
+
width: 100vw;
|
195
|
+
max-width: none;
|
196
|
+
height: 100%;
|
197
|
+
margin: 0;
|
198
|
+
|
199
|
+
.modal-content {
|
200
|
+
height: 100%;
|
201
|
+
border: 0;
|
202
|
+
@include border-radius(0);
|
203
|
+
}
|
204
|
+
|
205
|
+
.modal-header {
|
206
|
+
@include border-radius(0);
|
207
|
+
}
|
208
|
+
|
209
|
+
.modal-body {
|
210
|
+
overflow-y: auto;
|
211
|
+
}
|
212
|
+
|
213
|
+
.modal-footer {
|
214
|
+
@include border-radius(0);
|
215
|
+
}
|
216
|
+
}
|
217
|
+
}
|
218
|
+
}
|
219
|
+
// scss-docs-end modal-fullscreen-loop
|