bootstrap 4.0.0.alpha6 → 4.0.0.beta
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bootstrap might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile +2 -4
- data/README.md +20 -22
- data/assets/javascripts/bootstrap.js +657 -361
- data/assets/javascripts/bootstrap.min.js +2 -3
- data/assets/javascripts/bootstrap/alert.js +8 -8
- data/assets/javascripts/bootstrap/button.js +16 -9
- data/assets/javascripts/bootstrap/carousel.js +48 -21
- data/assets/javascripts/bootstrap/collapse.js +42 -33
- data/assets/javascripts/bootstrap/dropdown.js +196 -52
- data/assets/javascripts/bootstrap/modal.js +71 -29
- data/assets/javascripts/bootstrap/popover.js +25 -13
- data/assets/javascripts/bootstrap/scrollspy.js +23 -21
- data/assets/javascripts/bootstrap/tab.js +14 -18
- data/assets/javascripts/bootstrap/tooltip.js +139 -83
- data/assets/javascripts/bootstrap/util.js +10 -8
- data/assets/stylesheets/_bootstrap-grid.scss +2 -8
- data/assets/stylesheets/_bootstrap-reboot.scss +1 -2
- data/assets/stylesheets/_bootstrap.scss +2 -15
- data/assets/stylesheets/bootstrap/_alert.scss +4 -11
- data/assets/stylesheets/bootstrap/_badge.scss +4 -33
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -1
- data/assets/stylesheets/bootstrap/_button-group.scss +11 -15
- data/assets/stylesheets/bootstrap/_buttons.scss +13 -42
- data/assets/stylesheets/bootstrap/_card.scss +27 -80
- data/assets/stylesheets/bootstrap/_carousel.scss +24 -17
- data/assets/stylesheets/bootstrap/_close.scss +0 -2
- data/assets/stylesheets/bootstrap/_custom-forms.scss +27 -36
- data/assets/stylesheets/bootstrap/_dropdown.scss +15 -48
- data/assets/stylesheets/bootstrap/_forms.scss +70 -68
- data/assets/stylesheets/bootstrap/_functions.scss +90 -0
- data/assets/stylesheets/bootstrap/_grid.scss +3 -2
- data/assets/stylesheets/bootstrap/_images.scss +1 -1
- data/assets/stylesheets/bootstrap/_input-group.scss +6 -8
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -4
- data/assets/stylesheets/bootstrap/_list-group.scss +9 -36
- data/assets/stylesheets/bootstrap/_mixins.scss +2 -18
- data/assets/stylesheets/bootstrap/_modal.scss +3 -3
- data/assets/stylesheets/bootstrap/_nav.scss +15 -16
- data/assets/stylesheets/bootstrap/_navbar.scss +70 -54
- data/assets/stylesheets/bootstrap/_pagination.scss +3 -4
- data/assets/stylesheets/bootstrap/_popover.scss +96 -72
- data/assets/stylesheets/bootstrap/_print.scss +1 -9
- data/assets/stylesheets/bootstrap/_progress.scss +4 -4
- data/assets/stylesheets/bootstrap/_reboot.scss +187 -95
- data/assets/stylesheets/bootstrap/_tables.scss +34 -19
- data/assets/stylesheets/bootstrap/_tooltip.scss +52 -35
- data/assets/stylesheets/bootstrap/_type.scss +8 -28
- data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
- data/assets/stylesheets/bootstrap/_variables.scss +286 -410
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -5
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +6 -5
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +23 -13
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -14
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +57 -55
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +9 -18
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +12 -65
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +6 -6
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -4
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -0
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +4 -3
- data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +2 -2
- data/assets/stylesheets/bootstrap/utilities/_background.scss +4 -17
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +20 -5
- data/assets/stylesheets/bootstrap/utilities/_display.scss +36 -1
- data/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +0 -0
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -4
- data/assets/stylesheets/bootstrap/utilities/_position.scss +5 -3
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +10 -12
- data/assets/stylesheets/bootstrap/utilities/_text.scss +5 -17
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -48
- data/bootstrap.gemspec +2 -0
- data/lib/bootstrap.rb +2 -0
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +7 -9
- data/tasks/updater/scss.rb +1 -4
- data/templates/project/_bootstrap-variables.scss +289 -396
- data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
- data/test/dummy_rails/config/application.rb +0 -1
- data/test/gemfiles/rails_4_2.gemfile +0 -4
- data/test/gemfiles/rails_5_0.gemfile +0 -4
- data/test/gemfiles/rails_5_1.gemfile +8 -0
- metadata +23 -8
- data/assets/stylesheets/bootstrap/_custom.scss +0 -4
- data/assets/stylesheets/bootstrap/_normalize.scss +0 -461
- data/assets/stylesheets/bootstrap/mixins/_cards.scss +0 -47
- data/assets/stylesheets/bootstrap/mixins/_transforms.scss +0 -14
@@ -23,15 +23,14 @@
|
|
23
23
|
z-index: 2;
|
24
24
|
color: $pagination-active-color;
|
25
25
|
background-color: $pagination-active-bg;
|
26
|
-
border-color: $pagination-active-border;
|
26
|
+
border-color: $pagination-active-border-color;
|
27
27
|
}
|
28
28
|
|
29
29
|
&.disabled .page-link {
|
30
30
|
color: $pagination-disabled-color;
|
31
31
|
pointer-events: none;
|
32
|
-
cursor: $cursor-disabled; // While `pointer-events: none` removes the cursor in modern browsers, we provide a disabled cursor as a fallback.
|
33
32
|
background-color: $pagination-disabled-bg;
|
34
|
-
border-color: $pagination-disabled-border;
|
33
|
+
border-color: $pagination-disabled-border-color;
|
35
34
|
}
|
36
35
|
}
|
37
36
|
|
@@ -49,7 +48,7 @@
|
|
49
48
|
color: $pagination-hover-color;
|
50
49
|
text-decoration: none;
|
51
50
|
background-color: $pagination-hover-bg;
|
52
|
-
border-color: $pagination-hover-border;
|
51
|
+
border-color: $pagination-hover-border-color;
|
53
52
|
}
|
54
53
|
}
|
55
54
|
|
@@ -18,79 +18,110 @@
|
|
18
18
|
@include border-radius($border-radius-lg);
|
19
19
|
@include box-shadow($popover-box-shadow);
|
20
20
|
|
21
|
+
// Arrows
|
22
|
+
//
|
23
|
+
// .arrow is outer, .arrow::after is inner
|
24
|
+
|
25
|
+
.arrow {
|
26
|
+
position: absolute;
|
27
|
+
display: block;
|
28
|
+
width: $popover-arrow-width;
|
29
|
+
height: $popover-arrow-height;
|
30
|
+
}
|
31
|
+
|
32
|
+
.arrow::before,
|
33
|
+
.arrow::after {
|
34
|
+
position: absolute;
|
35
|
+
display: block;
|
36
|
+
border-color: transparent;
|
37
|
+
border-style: solid;
|
38
|
+
}
|
39
|
+
|
40
|
+
.arrow::before {
|
41
|
+
content: "";
|
42
|
+
border-width: $popover-arrow-outer-width;
|
43
|
+
}
|
44
|
+
.arrow::after {
|
45
|
+
content: "";
|
46
|
+
border-width: $popover-arrow-outer-width;
|
47
|
+
}
|
21
48
|
|
22
49
|
// Popover directions
|
23
50
|
|
24
|
-
&.popover-top
|
25
|
-
|
26
|
-
margin-top: -$popover-arrow-width;
|
51
|
+
&.bs-popover-top {
|
52
|
+
margin-bottom: $popover-arrow-width;
|
27
53
|
|
28
|
-
|
29
|
-
|
30
|
-
|
54
|
+
.arrow {
|
55
|
+
bottom: 0;
|
56
|
+
}
|
57
|
+
|
58
|
+
.arrow::before,
|
59
|
+
.arrow::after {
|
31
60
|
border-bottom-width: 0;
|
32
61
|
}
|
33
62
|
|
34
|
-
|
63
|
+
.arrow::before {
|
35
64
|
bottom: -$popover-arrow-outer-width;
|
36
|
-
margin-left:
|
65
|
+
margin-left: -($popover-arrow-outer-width - 5);
|
37
66
|
border-top-color: $popover-arrow-outer-color;
|
38
67
|
}
|
39
68
|
|
40
|
-
|
69
|
+
.arrow::after {
|
41
70
|
bottom: -($popover-arrow-outer-width - 1);
|
42
|
-
margin-left:
|
71
|
+
margin-left: -($popover-arrow-outer-width - 5);
|
43
72
|
border-top-color: $popover-arrow-color;
|
44
73
|
}
|
45
74
|
}
|
46
75
|
|
47
|
-
&.popover-right
|
48
|
-
&.bs-tether-element-attached-left {
|
76
|
+
&.bs-popover-right {
|
49
77
|
margin-left: $popover-arrow-width;
|
50
78
|
|
51
|
-
|
52
|
-
|
53
|
-
|
79
|
+
.arrow {
|
80
|
+
left: 0;
|
81
|
+
}
|
82
|
+
|
83
|
+
.arrow::before,
|
84
|
+
.arrow::after {
|
85
|
+
margin-top: -($popover-arrow-outer-width - 3);
|
54
86
|
border-left-width: 0;
|
55
87
|
}
|
56
88
|
|
57
|
-
|
89
|
+
.arrow::before {
|
58
90
|
left: -$popover-arrow-outer-width;
|
59
|
-
margin-top: -$popover-arrow-outer-width;
|
60
91
|
border-right-color: $popover-arrow-outer-color;
|
61
92
|
}
|
62
93
|
|
63
|
-
|
94
|
+
.arrow::after {
|
64
95
|
left: -($popover-arrow-outer-width - 1);
|
65
|
-
margin-top: -($popover-arrow-outer-width - 1);
|
66
96
|
border-right-color: $popover-arrow-color;
|
67
97
|
}
|
68
98
|
}
|
69
99
|
|
70
|
-
&.popover-bottom
|
71
|
-
&.bs-tether-element-attached-top {
|
100
|
+
&.bs-popover-bottom {
|
72
101
|
margin-top: $popover-arrow-width;
|
73
102
|
|
74
|
-
|
75
|
-
|
76
|
-
|
103
|
+
.arrow {
|
104
|
+
top: 0;
|
105
|
+
}
|
106
|
+
|
107
|
+
.arrow::before,
|
108
|
+
.arrow::after {
|
109
|
+
margin-left: -($popover-arrow-width - 3);
|
77
110
|
border-top-width: 0;
|
78
111
|
}
|
79
112
|
|
80
|
-
|
113
|
+
.arrow::before {
|
81
114
|
top: -$popover-arrow-outer-width;
|
82
|
-
margin-left: -$popover-arrow-outer-width;
|
83
115
|
border-bottom-color: $popover-arrow-outer-color;
|
84
116
|
}
|
85
117
|
|
86
|
-
|
118
|
+
.arrow::after {
|
87
119
|
top: -($popover-arrow-outer-width - 1);
|
88
|
-
|
89
|
-
border-bottom-color: $popover-title-bg;
|
120
|
+
border-bottom-color: $popover-arrow-color;
|
90
121
|
}
|
91
122
|
|
92
|
-
// This will remove the popover-
|
93
|
-
.popover-
|
123
|
+
// This will remove the popover-header's border just below the arrow
|
124
|
+
.popover-header::before {
|
94
125
|
position: absolute;
|
95
126
|
top: 0;
|
96
127
|
left: 50%;
|
@@ -98,42 +129,58 @@
|
|
98
129
|
width: 20px;
|
99
130
|
margin-left: -10px;
|
100
131
|
content: "";
|
101
|
-
border-bottom: 1px solid $popover-
|
132
|
+
border-bottom: 1px solid $popover-header-bg;
|
102
133
|
}
|
103
134
|
}
|
104
135
|
|
105
|
-
&.popover-left
|
106
|
-
|
107
|
-
margin-left: -$popover-arrow-width;
|
136
|
+
&.bs-popover-left {
|
137
|
+
margin-right: $popover-arrow-width;
|
108
138
|
|
109
|
-
|
110
|
-
|
111
|
-
|
139
|
+
.arrow {
|
140
|
+
right: 0;
|
141
|
+
}
|
142
|
+
|
143
|
+
.arrow::before,
|
144
|
+
.arrow::after {
|
145
|
+
margin-top: -($popover-arrow-outer-width - 3);
|
112
146
|
border-right-width: 0;
|
113
147
|
}
|
114
148
|
|
115
|
-
|
149
|
+
.arrow::before {
|
116
150
|
right: -$popover-arrow-outer-width;
|
117
|
-
margin-top: -$popover-arrow-outer-width;
|
118
151
|
border-left-color: $popover-arrow-outer-color;
|
119
152
|
}
|
120
153
|
|
121
|
-
|
154
|
+
.arrow::after {
|
122
155
|
right: -($popover-arrow-outer-width - 1);
|
123
|
-
margin-top: -($popover-arrow-outer-width - 1);
|
124
156
|
border-left-color: $popover-arrow-color;
|
125
157
|
}
|
126
158
|
}
|
159
|
+
&.bs-popover-auto {
|
160
|
+
&[x-placement^="top"] {
|
161
|
+
@extend .bs-popover-top;
|
162
|
+
}
|
163
|
+
&[x-placement^="right"] {
|
164
|
+
@extend .bs-popover-right;
|
165
|
+
}
|
166
|
+
&[x-placement^="bottom"] {
|
167
|
+
@extend .bs-popover-bottom;
|
168
|
+
}
|
169
|
+
&[x-placement^="left"] {
|
170
|
+
@extend .bs-popover-left;
|
171
|
+
}
|
172
|
+
}
|
127
173
|
}
|
128
174
|
|
129
175
|
|
130
176
|
// Offset the popover to account for the popover arrow
|
131
|
-
.popover-
|
132
|
-
padding: $popover-
|
177
|
+
.popover-header {
|
178
|
+
padding: $popover-header-padding-y $popover-header-padding-x;
|
133
179
|
margin-bottom: 0; // Reset the default from Reboot
|
134
180
|
font-size: $font-size-base;
|
135
|
-
|
136
|
-
|
181
|
+
color: $popover-header-color;
|
182
|
+
background-color: $popover-header-bg;
|
183
|
+
border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
|
137
184
|
$offset-border-width: calc(#{$border-radius-lg} - #{$popover-border-width});
|
138
185
|
@include border-top-radius($offset-border-width);
|
139
186
|
|
@@ -142,30 +189,7 @@
|
|
142
189
|
}
|
143
190
|
}
|
144
191
|
|
145
|
-
.popover-
|
146
|
-
padding: $popover-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
// Arrows
|
151
|
-
//
|
152
|
-
// .popover-arrow is outer, .popover-arrow::after is inner
|
153
|
-
|
154
|
-
.popover::before,
|
155
|
-
.popover::after {
|
156
|
-
position: absolute;
|
157
|
-
display: block;
|
158
|
-
width: 0;
|
159
|
-
height: 0;
|
160
|
-
border-color: transparent;
|
161
|
-
border-style: solid;
|
162
|
-
}
|
163
|
-
|
164
|
-
.popover::before {
|
165
|
-
content: "";
|
166
|
-
border-width: $popover-arrow-outer-width;
|
167
|
-
}
|
168
|
-
.popover::after {
|
169
|
-
content: "";
|
170
|
-
border-width: $popover-arrow-width;
|
192
|
+
.popover-body {
|
193
|
+
padding: $popover-body-padding-y $popover-body-padding-x;
|
194
|
+
color: $popover-body-color;
|
171
195
|
}
|
@@ -12,15 +12,7 @@
|
|
12
12
|
@media print {
|
13
13
|
*,
|
14
14
|
*::before,
|
15
|
-
*::after
|
16
|
-
p::first-letter,
|
17
|
-
div::first-letter,
|
18
|
-
blockquote::first-letter,
|
19
|
-
li::first-letter,
|
20
|
-
p::first-line,
|
21
|
-
div::first-line,
|
22
|
-
blockquote::first-line,
|
23
|
-
li::first-line {
|
15
|
+
*::after {
|
24
16
|
// Bootstrap specific; comment out `color` and `background`
|
25
17
|
//color: #000 !important; // Black prints faster:
|
26
18
|
// http://www.sanbeiji.com/archives/953
|
@@ -1,10 +1,8 @@
|
|
1
|
-
// Progress animations
|
2
1
|
@keyframes progress-bar-stripes {
|
3
2
|
from { background-position: $progress-height 0; }
|
4
3
|
to { background-position: 0 0; }
|
5
4
|
}
|
6
5
|
|
7
|
-
// Basic progress bar
|
8
6
|
.progress {
|
9
7
|
display: flex;
|
10
8
|
overflow: hidden; // force rounded corners by cropping it
|
@@ -13,20 +11,22 @@
|
|
13
11
|
text-align: center;
|
14
12
|
background-color: $progress-bg;
|
15
13
|
@include border-radius($progress-border-radius);
|
14
|
+
@include box-shadow($progress-box-shadow);
|
16
15
|
}
|
16
|
+
|
17
17
|
.progress-bar {
|
18
18
|
height: $progress-height;
|
19
|
+
line-height: $progress-height;
|
19
20
|
color: $progress-bar-color;
|
20
21
|
background-color: $progress-bar-bg;
|
22
|
+
@include transition($progress-bar-transition);
|
21
23
|
}
|
22
24
|
|
23
|
-
// Striped
|
24
25
|
.progress-bar-striped {
|
25
26
|
@include gradient-striped();
|
26
27
|
background-size: $progress-height $progress-height;
|
27
28
|
}
|
28
29
|
|
29
|
-
// Animated
|
30
30
|
.progress-bar-animated {
|
31
31
|
animation: progress-bar-stripes $progress-bar-animation-timing;
|
32
32
|
}
|
@@ -1,86 +1,62 @@
|
|
1
|
-
// scss-lint:disable QualifyingElement, DuplicateProperty
|
1
|
+
// scss-lint:disable QualifyingElement, DuplicateProperty, VendorPrefix
|
2
2
|
|
3
3
|
// Reboot
|
4
4
|
//
|
5
|
-
//
|
6
|
-
//
|
5
|
+
// Normalization of HTML elements, manually forked from Normalize.css to remove
|
6
|
+
// styles targeting irrelevant browsers while applying new styles.
|
7
|
+
//
|
8
|
+
// Normalize is licensed MIT. https://github.com/necolas/normalize.css
|
7
9
|
|
8
10
|
|
9
|
-
//
|
10
|
-
//
|
11
|
-
// Change from `box-sizing: content-box` to `border-box` so that when you add
|
12
|
-
// `padding` or `border`s to an element, the overall declared `width` does not
|
13
|
-
// change. For example, `width: 100px;` will always be `100px` despite the
|
14
|
-
// `border: 10px solid red;` and `padding: 20px;`.
|
15
|
-
//
|
16
|
-
// Heads up! This reset may cause conflicts with some third-party widgets. For
|
17
|
-
// recommendations on resolving such conflicts, see
|
18
|
-
// https://getbootstrap.com/getting-started/#third-box-sizing.
|
11
|
+
// Document
|
19
12
|
//
|
20
|
-
//
|
13
|
+
// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
|
14
|
+
// 2. Change the default font family in all browsers.
|
15
|
+
// 3. Correct the line height in all browsers.
|
16
|
+
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
|
17
|
+
// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
|
18
|
+
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
|
19
|
+
// 6. Change the default tap highlight to be completely transparent in iOS.
|
21
20
|
|
22
21
|
html {
|
23
|
-
box-sizing: border-box;
|
22
|
+
box-sizing: border-box; // 1
|
23
|
+
font-family: sans-serif; // 2
|
24
|
+
line-height: 1.15; // 3
|
25
|
+
-webkit-text-size-adjust: 100%; // 4
|
26
|
+
-ms-text-size-adjust: 100%; // 4
|
27
|
+
-ms-overflow-style: scrollbar; // 5
|
28
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0); // 6
|
24
29
|
}
|
25
30
|
|
26
31
|
*,
|
27
32
|
*::before,
|
28
33
|
*::after {
|
29
|
-
box-sizing: inherit;
|
34
|
+
box-sizing: inherit; // 1
|
30
35
|
}
|
31
36
|
|
32
|
-
|
33
|
-
// Make viewport responsive
|
34
|
-
//
|
35
|
-
// @viewport is needed because IE 10+ doesn't honor <meta name="viewport"> in
|
36
|
-
// some cases. See https://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/.
|
37
|
-
// Eventually @viewport will replace <meta name="viewport">.
|
38
|
-
//
|
39
|
-
// However, `device-width` is broken on IE 10 on Windows (Phone) 8,
|
40
|
-
// (see https://timkadlec.com/2013/01/windows-phone-8-and-device-width/ and https://github.com/twbs/bootstrap/issues/10497)
|
41
|
-
// and the fix for that involves a snippet of JavaScript to sniff the user agent
|
42
|
-
// and apply some conditional CSS.
|
43
|
-
//
|
44
|
-
// See https://getbootstrap.com/getting-started/#support-ie10-width for the relevant hack.
|
45
|
-
//
|
46
|
-
// Wrap `@viewport` with `@at-root` for when folks do a nested import (e.g.,
|
47
|
-
// `.class-name { @import "bootstrap"; }`).
|
37
|
+
// IE10+ doesn't honor `<meta name="viewport">` in some cases.
|
48
38
|
@at-root {
|
49
39
|
@-ms-viewport { width: device-width; }
|
50
40
|
}
|
51
41
|
|
42
|
+
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
|
43
|
+
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
44
|
+
display: block;
|
45
|
+
}
|
52
46
|
|
47
|
+
// Body
|
53
48
|
//
|
54
|
-
//
|
55
|
-
//
|
56
|
-
|
57
|
-
html {
|
58
|
-
// We assume no initial pixel `font-size` for accessibility reasons. This
|
59
|
-
// allows web visitors to customize their browser default font-size, making
|
60
|
-
// your project more inclusive and accessible to everyone.
|
61
|
-
|
62
|
-
// As a side-effect of setting the @viewport above,
|
63
|
-
// IE11 & Edge make the scrollbar overlap the content and automatically hide itself when not in use.
|
64
|
-
// Unfortunately, the auto-showing of the scrollbar is sometimes too sensitive,
|
65
|
-
// thus making it hard to click on stuff near the right edge of the page.
|
66
|
-
// So we add this style to force IE11 & Edge to use a "normal", non-overlapping, non-auto-hiding scrollbar.
|
67
|
-
// See https://github.com/twbs/bootstrap/issues/18543
|
68
|
-
// and https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7165383/
|
69
|
-
-ms-overflow-style: scrollbar;
|
70
|
-
|
71
|
-
// Changes the default tap highlight to be completely transparent in iOS.
|
72
|
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
73
|
-
}
|
49
|
+
// 1. Remove the margin in all browsers.
|
50
|
+
// 2. As a best practice, apply a default `background-color`.
|
74
51
|
|
75
52
|
body {
|
53
|
+
margin: 0; // 1
|
76
54
|
font-family: $font-family-base;
|
77
55
|
font-size: $font-size-base;
|
78
56
|
font-weight: $font-weight-base;
|
79
57
|
line-height: $line-height-base;
|
80
|
-
// Go easy on the eyes and use something other than `#000` for text
|
81
58
|
color: $body-color;
|
82
|
-
|
83
|
-
background-color: $body-bg;
|
59
|
+
background-color: $body-bg; // 2
|
84
60
|
}
|
85
61
|
|
86
62
|
// Suppress the focus outline on elements that cannot be accessed via keyboard.
|
@@ -93,6 +69,18 @@ body {
|
|
93
69
|
}
|
94
70
|
|
95
71
|
|
72
|
+
// Content grouping
|
73
|
+
//
|
74
|
+
// 1. Add the correct box sizing in Firefox.
|
75
|
+
// 2. Show the overflow in Edge and IE.
|
76
|
+
|
77
|
+
hr {
|
78
|
+
box-sizing: content-box; // 1
|
79
|
+
height: 0; // 1
|
80
|
+
overflow: visible; // 2
|
81
|
+
}
|
82
|
+
|
83
|
+
|
96
84
|
//
|
97
85
|
// Typography
|
98
86
|
//
|
@@ -116,10 +104,18 @@ p {
|
|
116
104
|
}
|
117
105
|
|
118
106
|
// Abbreviations
|
107
|
+
//
|
108
|
+
// 1. Remove the bottom border in Firefox 39-.
|
109
|
+
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
110
|
+
// 3. Add explicit cursor to indicate changed behavior.
|
111
|
+
// 4. Duplicate behavior to the data-* attribute for our tooltip plugin
|
112
|
+
|
119
113
|
abbr[title],
|
120
|
-
|
121
|
-
|
122
|
-
|
114
|
+
abbr[data-original-title] { // 4
|
115
|
+
text-decoration: underline; // 2
|
116
|
+
text-decoration: underline dotted; // 2
|
117
|
+
cursor: help; // 3
|
118
|
+
border-bottom: 0; // 1
|
123
119
|
}
|
124
120
|
|
125
121
|
address {
|
@@ -155,6 +151,35 @@ blockquote {
|
|
155
151
|
margin: 0 0 1rem;
|
156
152
|
}
|
157
153
|
|
154
|
+
dfn {
|
155
|
+
font-style: italic; // Add the correct font style in Android 4.3-
|
156
|
+
}
|
157
|
+
|
158
|
+
b,
|
159
|
+
strong {
|
160
|
+
font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
|
161
|
+
}
|
162
|
+
|
163
|
+
small {
|
164
|
+
font-size: 80%; // Add the correct font size in all browsers
|
165
|
+
}
|
166
|
+
|
167
|
+
//
|
168
|
+
// Prevent `sub` and `sup` elements from affecting the line height in
|
169
|
+
// all browsers.
|
170
|
+
//
|
171
|
+
|
172
|
+
sub,
|
173
|
+
sup {
|
174
|
+
position: relative;
|
175
|
+
font-size: 75%;
|
176
|
+
line-height: 0;
|
177
|
+
vertical-align: baseline;
|
178
|
+
}
|
179
|
+
|
180
|
+
sub { bottom: -.25em; }
|
181
|
+
sup { top: -.5em; }
|
182
|
+
|
158
183
|
|
159
184
|
//
|
160
185
|
// Links
|
@@ -163,8 +188,10 @@ blockquote {
|
|
163
188
|
a {
|
164
189
|
color: $link-color;
|
165
190
|
text-decoration: $link-decoration;
|
191
|
+
background-color: transparent; // Remove the gray background on active links in IE 10.
|
192
|
+
-webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
|
166
193
|
|
167
|
-
@include hover
|
194
|
+
@include hover {
|
168
195
|
color: $link-hover-color;
|
169
196
|
text-decoration: $link-hover-decoration;
|
170
197
|
}
|
@@ -195,12 +222,20 @@ a:not([href]):not([tabindex]) {
|
|
195
222
|
// Code
|
196
223
|
//
|
197
224
|
|
225
|
+
pre,
|
226
|
+
code,
|
227
|
+
kbd,
|
228
|
+
samp {
|
229
|
+
font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
|
230
|
+
font-size: 1em; // Correct the odd `em` font sizing in all browsers.
|
231
|
+
}
|
232
|
+
|
198
233
|
pre {
|
199
234
|
// Remove browser default top margin
|
200
235
|
margin-top: 0;
|
201
236
|
// Reset browser default of `1em` to use `rem`s
|
202
237
|
margin-bottom: 1rem;
|
203
|
-
//
|
238
|
+
// Don't allow content to break outside
|
204
239
|
overflow: auto;
|
205
240
|
}
|
206
241
|
|
@@ -210,33 +245,22 @@ pre {
|
|
210
245
|
//
|
211
246
|
|
212
247
|
figure {
|
213
|
-
//
|
214
|
-
// We reset that to create a better flow in-page.
|
248
|
+
// Apply a consistent margin strategy (matches our type styles).
|
215
249
|
margin: 0 0 1rem;
|
216
250
|
}
|
217
251
|
|
218
252
|
|
219
253
|
//
|
220
|
-
// Images
|
254
|
+
// Images and content
|
221
255
|
//
|
222
256
|
|
223
257
|
img {
|
224
|
-
// By default, `<img>`s are `inline-block`. This assumes that, and vertically
|
225
|
-
// centers them. This won't apply should you reset them to `block` level.
|
226
258
|
vertical-align: middle;
|
227
|
-
//
|
228
|
-
// For the rationale behind this, see the comments on the `.img-fluid` class.
|
259
|
+
border-style: none; // Remove the border on images inside links in IE 10-.
|
229
260
|
}
|
230
261
|
|
231
|
-
|
232
|
-
//
|
233
|
-
//
|
234
|
-
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
|
235
|
-
// for traditionally non-focusable elements with role="button"
|
236
|
-
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
237
|
-
|
238
|
-
[role="button"] {
|
239
|
-
cursor: pointer;
|
262
|
+
svg:not(:root) {
|
263
|
+
overflow: hidden; // Hide the overflow in IE
|
240
264
|
}
|
241
265
|
|
242
266
|
|
@@ -268,10 +292,7 @@ textarea {
|
|
268
292
|
//
|
269
293
|
|
270
294
|
table {
|
271
|
-
|
272
|
-
border-collapse: collapse;
|
273
|
-
// Reset for nesting within parents with `background-color`.
|
274
|
-
background-color: $table-bg;
|
295
|
+
border-collapse: collapse; // Prevent double borders
|
275
296
|
}
|
276
297
|
|
277
298
|
caption {
|
@@ -283,7 +304,7 @@ caption {
|
|
283
304
|
}
|
284
305
|
|
285
306
|
th {
|
286
|
-
//
|
307
|
+
// Matches default `<td>` alignment
|
287
308
|
text-align: left;
|
288
309
|
}
|
289
310
|
|
@@ -310,20 +331,47 @@ button:focus {
|
|
310
331
|
input,
|
311
332
|
button,
|
312
333
|
select,
|
334
|
+
optgroup,
|
313
335
|
textarea {
|
314
|
-
|
315
|
-
|
336
|
+
margin: 0; // Remove the margin in Firefox and Safari
|
337
|
+
font-family: inherit;
|
338
|
+
font-size: inherit;
|
316
339
|
line-height: inherit;
|
317
340
|
}
|
318
341
|
|
342
|
+
button,
|
343
|
+
input {
|
344
|
+
overflow: visible; // Show the overflow in Edge
|
345
|
+
}
|
346
|
+
|
347
|
+
button,
|
348
|
+
select {
|
349
|
+
text-transform: none; // Remove the inheritance of text transform in Firefox
|
350
|
+
}
|
351
|
+
|
352
|
+
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
353
|
+
// controls in Android 4.
|
354
|
+
// 2. Correct the inability to style clickable types in iOS and Safari.
|
355
|
+
button,
|
356
|
+
html [type="button"], // 1
|
357
|
+
[type="reset"],
|
358
|
+
[type="submit"] {
|
359
|
+
-webkit-appearance: button; // 2
|
360
|
+
}
|
361
|
+
|
362
|
+
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
363
|
+
button::-moz-focus-inner,
|
364
|
+
[type="button"]::-moz-focus-inner,
|
365
|
+
[type="reset"]::-moz-focus-inner,
|
366
|
+
[type="submit"]::-moz-focus-inner {
|
367
|
+
padding: 0;
|
368
|
+
border-style: none;
|
369
|
+
}
|
370
|
+
|
319
371
|
input[type="radio"],
|
320
372
|
input[type="checkbox"] {
|
321
|
-
//
|
322
|
-
//
|
323
|
-
// Note: Neither radios nor checkboxes can be readonly.
|
324
|
-
&:disabled {
|
325
|
-
cursor: $cursor-disabled;
|
326
|
-
}
|
373
|
+
box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
|
374
|
+
padding: 0; // 2. Remove the padding in IE 10-
|
327
375
|
}
|
328
376
|
|
329
377
|
|
@@ -340,6 +388,7 @@ input[type="month"] {
|
|
340
388
|
}
|
341
389
|
|
342
390
|
textarea {
|
391
|
+
overflow: auto; // Remove the default vertical scrollbar in IE.
|
343
392
|
// Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
344
393
|
resize: vertical;
|
345
394
|
}
|
@@ -357,33 +406,76 @@ fieldset {
|
|
357
406
|
border: 0;
|
358
407
|
}
|
359
408
|
|
409
|
+
// 1. Correct the text wrapping in Edge and IE.
|
410
|
+
// 2. Correct the color inheritance from `fieldset` elements in IE.
|
360
411
|
legend {
|
361
|
-
// Reset the entire legend element to match the `fieldset`
|
362
412
|
display: block;
|
363
413
|
width: 100%;
|
414
|
+
max-width: 100%; // 1
|
364
415
|
padding: 0;
|
365
416
|
margin-bottom: .5rem;
|
366
417
|
font-size: 1.5rem;
|
367
418
|
line-height: inherit;
|
419
|
+
color: inherit; // 2
|
420
|
+
white-space: normal; // 1
|
421
|
+
}
|
422
|
+
|
423
|
+
progress {
|
424
|
+
vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
425
|
+
}
|
426
|
+
|
427
|
+
// Correct the cursor style of increment and decrement buttons in Chrome.
|
428
|
+
[type="number"]::-webkit-inner-spin-button,
|
429
|
+
[type="number"]::-webkit-outer-spin-button {
|
430
|
+
height: auto;
|
368
431
|
}
|
369
432
|
|
370
|
-
|
433
|
+
[type="search"] {
|
371
434
|
// This overrides the extra rounded corners on search inputs in iOS so that our
|
372
435
|
// `.form-control` class can properly style them. Note that this cannot simply
|
373
436
|
// be added to `.form-control` as it's not specific enough. For details, see
|
374
437
|
// https://github.com/twbs/bootstrap/issues/11586.
|
438
|
+
outline-offset: -2px; // 2. Correct the outline style in Safari.
|
439
|
+
-webkit-appearance: none;
|
440
|
+
}
|
441
|
+
|
442
|
+
//
|
443
|
+
// Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
444
|
+
//
|
445
|
+
|
446
|
+
[type="search"]::-webkit-search-cancel-button,
|
447
|
+
[type="search"]::-webkit-search-decoration {
|
375
448
|
-webkit-appearance: none;
|
376
449
|
}
|
377
450
|
|
378
|
-
//
|
451
|
+
//
|
452
|
+
// 1. Correct the inability to style clickable types in iOS and Safari.
|
453
|
+
// 2. Change font properties to `inherit` in Safari.
|
454
|
+
//
|
455
|
+
|
456
|
+
::-webkit-file-upload-button {
|
457
|
+
font: inherit; // 2
|
458
|
+
-webkit-appearance: button; // 1
|
459
|
+
}
|
460
|
+
|
461
|
+
//
|
462
|
+
// Correct element displays
|
463
|
+
//
|
464
|
+
|
379
465
|
output {
|
380
466
|
display: inline-block;
|
381
|
-
|
382
|
-
|
383
|
-
|
467
|
+
}
|
468
|
+
|
469
|
+
summary {
|
470
|
+
display: list-item; // Add the correct display in all browsers
|
471
|
+
}
|
472
|
+
|
473
|
+
template {
|
474
|
+
display: none; // Add the correct display in IE
|
384
475
|
}
|
385
476
|
|
386
477
|
// Always hide an element with the `hidden` HTML attribute (from PureCSS).
|
478
|
+
// Needed for proper display in IE 10-.
|
387
479
|
[hidden] {
|
388
480
|
display: none !important;
|
389
481
|
}
|