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.

Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/Gemfile +2 -4
  4. data/README.md +20 -22
  5. data/assets/javascripts/bootstrap.js +657 -361
  6. data/assets/javascripts/bootstrap.min.js +2 -3
  7. data/assets/javascripts/bootstrap/alert.js +8 -8
  8. data/assets/javascripts/bootstrap/button.js +16 -9
  9. data/assets/javascripts/bootstrap/carousel.js +48 -21
  10. data/assets/javascripts/bootstrap/collapse.js +42 -33
  11. data/assets/javascripts/bootstrap/dropdown.js +196 -52
  12. data/assets/javascripts/bootstrap/modal.js +71 -29
  13. data/assets/javascripts/bootstrap/popover.js +25 -13
  14. data/assets/javascripts/bootstrap/scrollspy.js +23 -21
  15. data/assets/javascripts/bootstrap/tab.js +14 -18
  16. data/assets/javascripts/bootstrap/tooltip.js +139 -83
  17. data/assets/javascripts/bootstrap/util.js +10 -8
  18. data/assets/stylesheets/_bootstrap-grid.scss +2 -8
  19. data/assets/stylesheets/_bootstrap-reboot.scss +1 -2
  20. data/assets/stylesheets/_bootstrap.scss +2 -15
  21. data/assets/stylesheets/bootstrap/_alert.scss +4 -11
  22. data/assets/stylesheets/bootstrap/_badge.scss +4 -33
  23. data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -1
  24. data/assets/stylesheets/bootstrap/_button-group.scss +11 -15
  25. data/assets/stylesheets/bootstrap/_buttons.scss +13 -42
  26. data/assets/stylesheets/bootstrap/_card.scss +27 -80
  27. data/assets/stylesheets/bootstrap/_carousel.scss +24 -17
  28. data/assets/stylesheets/bootstrap/_close.scss +0 -2
  29. data/assets/stylesheets/bootstrap/_custom-forms.scss +27 -36
  30. data/assets/stylesheets/bootstrap/_dropdown.scss +15 -48
  31. data/assets/stylesheets/bootstrap/_forms.scss +70 -68
  32. data/assets/stylesheets/bootstrap/_functions.scss +90 -0
  33. data/assets/stylesheets/bootstrap/_grid.scss +3 -2
  34. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  35. data/assets/stylesheets/bootstrap/_input-group.scss +6 -8
  36. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -4
  37. data/assets/stylesheets/bootstrap/_list-group.scss +9 -36
  38. data/assets/stylesheets/bootstrap/_mixins.scss +2 -18
  39. data/assets/stylesheets/bootstrap/_modal.scss +3 -3
  40. data/assets/stylesheets/bootstrap/_nav.scss +15 -16
  41. data/assets/stylesheets/bootstrap/_navbar.scss +70 -54
  42. data/assets/stylesheets/bootstrap/_pagination.scss +3 -4
  43. data/assets/stylesheets/bootstrap/_popover.scss +96 -72
  44. data/assets/stylesheets/bootstrap/_print.scss +1 -9
  45. data/assets/stylesheets/bootstrap/_progress.scss +4 -4
  46. data/assets/stylesheets/bootstrap/_reboot.scss +187 -95
  47. data/assets/stylesheets/bootstrap/_tables.scss +34 -19
  48. data/assets/stylesheets/bootstrap/_tooltip.scss +52 -35
  49. data/assets/stylesheets/bootstrap/_type.scss +8 -28
  50. data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
  51. data/assets/stylesheets/bootstrap/_variables.scss +286 -410
  52. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -5
  53. data/assets/stylesheets/bootstrap/mixins/_badge.scss +6 -5
  54. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +3 -3
  55. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
  56. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +23 -13
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -14
  58. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
  59. data/assets/stylesheets/bootstrap/mixins/_forms.scss +57 -55
  60. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  61. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +9 -18
  62. data/assets/stylesheets/bootstrap/mixins/_grid.scss +12 -65
  63. data/assets/stylesheets/bootstrap/mixins/_hover.scss +6 -6
  64. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -4
  65. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
  66. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -0
  67. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +4 -3
  68. data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  69. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -2
  70. data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +1 -1
  71. data/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
  72. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +2 -2
  73. data/assets/stylesheets/bootstrap/utilities/_background.scss +4 -17
  74. data/assets/stylesheets/bootstrap/utilities/_borders.scss +20 -5
  75. data/assets/stylesheets/bootstrap/utilities/_display.scss +36 -1
  76. data/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +0 -0
  77. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -4
  78. data/assets/stylesheets/bootstrap/utilities/_position.scss +5 -3
  79. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +10 -12
  80. data/assets/stylesheets/bootstrap/utilities/_text.scss +5 -17
  81. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -48
  82. data/bootstrap.gemspec +2 -0
  83. data/lib/bootstrap.rb +2 -0
  84. data/lib/bootstrap/version.rb +2 -2
  85. data/tasks/updater/js.rb +7 -9
  86. data/tasks/updater/scss.rb +1 -4
  87. data/templates/project/_bootstrap-variables.scss +289 -396
  88. data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
  89. data/test/dummy_rails/config/application.rb +0 -1
  90. data/test/gemfiles/rails_4_2.gemfile +0 -4
  91. data/test/gemfiles/rails_5_0.gemfile +0 -4
  92. data/test/gemfiles/rails_5_1.gemfile +8 -0
  93. metadata +23 -8
  94. data/assets/stylesheets/bootstrap/_custom.scss +0 -4
  95. data/assets/stylesheets/bootstrap/_normalize.scss +0 -461
  96. data/assets/stylesheets/bootstrap/mixins/_cards.scss +0 -47
  97. data/assets/stylesheets/bootstrap/mixins/_transforms.scss +0 -14
@@ -12,19 +12,17 @@
12
12
  .carousel-item {
13
13
  position: relative;
14
14
  display: none;
15
+ align-items: center;
15
16
  width: 100%;
16
-
17
- @include if-supports-3d-transforms() {
18
- @include transition($carousel-transition);
19
- backface-visibility: hidden;
20
- perspective: 1000px;
21
- }
17
+ @include transition($carousel-transition);
18
+ backface-visibility: hidden;
19
+ perspective: 1000px;
22
20
  }
23
21
 
24
22
  .carousel-item.active,
25
23
  .carousel-item-next,
26
24
  .carousel-item-prev {
27
- display: flex;
25
+ display: block;
28
26
  }
29
27
 
30
28
  .carousel-item-next,
@@ -34,19 +32,29 @@
34
32
  }
35
33
 
36
34
  // CSS3 transforms when supported by the browser
37
- @include if-supports-3d-transforms() {
38
- .carousel-item-next.carousel-item-left,
39
- .carousel-item-prev.carousel-item-right {
35
+ .carousel-item-next.carousel-item-left,
36
+ .carousel-item-prev.carousel-item-right {
37
+ transform: translateX(0);
38
+
39
+ @supports (transform-style: preserve-3d) {
40
40
  transform: translate3d(0, 0, 0);
41
41
  }
42
+ }
42
43
 
43
- .carousel-item-next,
44
- .active.carousel-item-right {
44
+ .carousel-item-next,
45
+ .active.carousel-item-right {
46
+ transform: translateX(100%);
47
+
48
+ @supports (transform-style: preserve-3d) {
45
49
  transform: translate3d(100%, 0, 0);
46
50
  }
51
+ }
52
+
53
+ .carousel-item-prev,
54
+ .active.carousel-item-left {
55
+ transform: translateX(-100%);
47
56
 
48
- .carousel-item-prev,
49
- .active.carousel-item-left {
57
+ @supports (transform-style: preserve-3d) {
50
58
  transform: translate3d(-100%, 0, 0);
51
59
  }
52
60
  }
@@ -125,13 +133,12 @@
125
133
 
126
134
  li {
127
135
  position: relative;
128
- flex: 1 0 auto;
129
- max-width: $carousel-indicator-width;
136
+ flex: 0 1 auto;
137
+ width: $carousel-indicator-width;
130
138
  height: $carousel-indicator-height;
131
139
  margin-right: $carousel-indicator-spacer;
132
140
  margin-left: $carousel-indicator-spacer;
133
141
  text-indent: -999px;
134
- cursor: pointer;
135
142
  background-color: rgba($carousel-indicator-active-bg, .5);
136
143
 
137
144
  // Use pseudo classes to increase the hit area by 10px on top and bottom.
@@ -10,7 +10,6 @@
10
10
  @include hover-focus {
11
11
  color: $close-color;
12
12
  text-decoration: none;
13
- cursor: pointer;
14
13
  opacity: .75;
15
14
  }
16
15
  }
@@ -23,7 +22,6 @@
23
22
  // scss-lint:disable QualifyingElement
24
23
  button.close {
25
24
  padding: 0;
26
- cursor: pointer;
27
25
  background: transparent;
28
26
  border: 0;
29
27
  -webkit-appearance: none;
@@ -1,4 +1,4 @@
1
- // scss-lint:disable PropertyCount
1
+ // scss-lint:disable PropertyCount, VendorPrefix
2
2
 
3
3
  // Embedded icons from Open Iconic.
4
4
  // Released under MIT and copyright 2014 Waybury.
@@ -15,7 +15,6 @@
15
15
  min-height: (1rem * $line-height-base);
16
16
  padding-left: $custom-control-gutter;
17
17
  margin-right: $custom-control-spacer-x;
18
- cursor: pointer;
19
18
  }
20
19
 
21
20
  .custom-control-input {
@@ -24,31 +23,29 @@
24
23
  opacity: 0;
25
24
 
26
25
  &:checked ~ .custom-control-indicator {
27
- color: $custom-control-checked-indicator-color;
28
- background-color: $custom-control-checked-indicator-bg;
29
- @include box-shadow($custom-control-checked-indicator-box-shadow);
26
+ color: $custom-control-indicator-checked-color;
27
+ background-color: $custom-control-indicator-checked-bg;
28
+ @include box-shadow($custom-control-indicator-checked-box-shadow);
30
29
  }
31
30
 
32
31
  &:focus ~ .custom-control-indicator {
33
32
  // the mixin is not used here to make sure there is feedback
34
- box-shadow: $custom-control-focus-indicator-box-shadow;
33
+ box-shadow: $custom-control-indicator-focus-box-shadow;
35
34
  }
36
35
 
37
36
  &:active ~ .custom-control-indicator {
38
- color: $custom-control-active-indicator-color;
39
- background-color: $custom-control-active-indicator-bg;
40
- @include box-shadow($custom-control-active-indicator-box-shadow);
37
+ color: $custom-control-indicator-active-color;
38
+ background-color: $custom-control-indicator-active-bg;
39
+ @include box-shadow($custom-control-indicator-active-box-shadow);
41
40
  }
42
41
 
43
42
  &:disabled {
44
43
  ~ .custom-control-indicator {
45
- cursor: $custom-control-disabled-cursor;
46
- background-color: $custom-control-disabled-indicator-bg;
44
+ background-color: $custom-control-indicator-disabled-bg;
47
45
  }
48
46
 
49
47
  ~ .custom-control-description {
50
- color: $custom-control-disabled-description-color;
51
- cursor: $custom-control-disabled-cursor;
48
+ color: $custom-control-description-disabled-color;
52
49
  }
53
50
  }
54
51
  }
@@ -79,17 +76,17 @@
79
76
 
80
77
  .custom-checkbox {
81
78
  .custom-control-indicator {
82
- @include border-radius($custom-checkbox-radius);
79
+ @include border-radius($custom-checkbox-indicator-border-radius);
83
80
  }
84
81
 
85
82
  .custom-control-input:checked ~ .custom-control-indicator {
86
- background-image: $custom-checkbox-checked-icon;
83
+ background-image: $custom-checkbox-indicator-icon-checked;
87
84
  }
88
85
 
89
86
  .custom-control-input:indeterminate ~ .custom-control-indicator {
90
- background-color: $custom-checkbox-indeterminate-bg;
91
- background-image: $custom-checkbox-indeterminate-icon;
92
- @include box-shadow($custom-checkbox-indeterminate-box-shadow);
87
+ background-color: $custom-checkbox-indicator-indeterminate-bg;
88
+ background-image: $custom-checkbox-indicator-icon-indeterminate;
89
+ @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
93
90
  }
94
91
  }
95
92
 
@@ -99,11 +96,11 @@
99
96
 
100
97
  .custom-radio {
101
98
  .custom-control-indicator {
102
- border-radius: $custom-radio-radius;
99
+ border-radius: $custom-radio-indicator-border-radius;
103
100
  }
104
101
 
105
102
  .custom-control-input:checked ~ .custom-control-indicator {
106
- background-image: $custom-radio-checked-icon;
103
+ background-image: $custom-radio-indicator-icon-checked;
107
104
  }
108
105
  }
109
106
 
@@ -136,8 +133,7 @@
136
133
  .custom-select {
137
134
  display: inline-block;
138
135
  max-width: 100%;
139
- $select-border-width: ($border-width * 2);
140
- height: calc(#{$input-height} + #{$select-border-width});
136
+ height: $input-height;
141
137
  padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
142
138
  line-height: $custom-select-line-height;
143
139
  color: $custom-select-color;
@@ -145,10 +141,12 @@
145
141
  background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
146
142
  background-size: $custom-select-bg-size;
147
143
  border: $custom-select-border-width solid $custom-select-border-color;
148
- @include border-radius($custom-select-border-radius);
149
- // Use vendor prefixes as `appearance` isn't part of the CSS spec.
150
- -moz-appearance: none;
151
- -webkit-appearance: none;
144
+ @if $enable-rounded {
145
+ border-radius: $custom-select-border-radius;
146
+ } @else {
147
+ border-radius: 0;
148
+ }
149
+ appearance: none;
152
150
 
153
151
  &:focus {
154
152
  border-color: $custom-select-focus-border-color;
@@ -168,7 +166,6 @@
168
166
 
169
167
  &:disabled {
170
168
  color: $custom-select-disabled-color;
171
- cursor: $cursor-disabled;
172
169
  background-color: $custom-select-disabled-bg;
173
170
  }
174
171
 
@@ -179,14 +176,10 @@
179
176
  }
180
177
 
181
178
  .custom-select-sm {
179
+ height: $custom-select-height-sm;
182
180
  padding-top: $custom-select-padding-y;
183
181
  padding-bottom: $custom-select-padding-y;
184
- font-size: $custom-select-sm-font-size;
185
-
186
- // &:not([multiple]) {
187
- // height: 26px;
188
- // min-height: 26px;
189
- // }
182
+ font-size: $custom-select-font-size-sm;
190
183
  }
191
184
 
192
185
 
@@ -200,7 +193,6 @@
200
193
  max-width: 100%;
201
194
  height: $custom-file-height;
202
195
  margin-bottom: 0;
203
- cursor: pointer;
204
196
  }
205
197
 
206
198
  .custom-file-input {
@@ -208,7 +200,6 @@
208
200
  max-width: 100%;
209
201
  height: $custom-file-height;
210
202
  margin: 0;
211
- filter: alpha(opacity = 0);
212
203
  opacity: 0;
213
204
 
214
205
  &:focus ~ .custom-file-control {
@@ -234,7 +225,7 @@
234
225
  @include box-shadow($custom-file-box-shadow);
235
226
 
236
227
  @each $lang, $text in map-get($custom-file-text, placeholder) {
237
- &:lang(#{$lang})::after {
228
+ &:lang(#{$lang}):empty::after {
238
229
  content: $text;
239
230
  }
240
231
  }
@@ -10,21 +10,27 @@
10
10
  display: inline-block;
11
11
  width: 0;
12
12
  height: 0;
13
- margin-left: $caret-width;
14
- vertical-align: middle;
13
+ margin-left: $caret-width * .85;
14
+ vertical-align: $caret-width * .85;
15
15
  content: "";
16
16
  border-top: $caret-width solid;
17
17
  border-right: $caret-width solid transparent;
18
18
  border-left: $caret-width solid transparent;
19
19
  }
20
20
 
21
- // Prevent the focus on the dropdown toggle when closing dropdowns
22
- &:focus {
23
- outline: 0;
21
+ &:empty::after {
22
+ margin-left: 0;
24
23
  }
25
24
  }
26
25
 
26
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
27
+ // Just add .dropup after the standard .dropdown class and you're set.
27
28
  .dropup {
29
+ .dropdown-menu {
30
+ margin-top: 0;
31
+ margin-bottom: $dropdown-spacer;
32
+ }
33
+
28
34
  .dropdown-toggle {
29
35
  &::after {
30
36
  border-top: 0;
@@ -43,7 +49,7 @@
43
49
  float: left;
44
50
  min-width: $dropdown-min-width;
45
51
  padding: $dropdown-padding-y 0;
46
- margin: $dropdown-margin-top 0 0; // override default ul
52
+ margin: $dropdown-spacer 0 0; // override default ul
47
53
  font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues
48
54
  color: $body-color;
49
55
  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
@@ -66,7 +72,7 @@
66
72
  .dropdown-item {
67
73
  display: block;
68
74
  width: 100%; // For `<button>`s
69
- padding: 3px $dropdown-item-padding-x;
75
+ padding: $dropdown-item-padding-y $dropdown-item-padding-x;
70
76
  clear: both;
71
77
  font-weight: $font-weight-normal;
72
78
  color: $dropdown-link-color;
@@ -91,7 +97,6 @@
91
97
  &.disabled,
92
98
  &:disabled {
93
99
  color: $dropdown-link-disabled-color;
94
- cursor: $cursor-disabled;
95
100
  background-color: transparent;
96
101
  // Remove CSS gradients if they're enabled
97
102
  @if $enable-gradients {
@@ -102,29 +107,14 @@
102
107
 
103
108
  // Open state for the dropdown
104
109
  .show {
105
- // Show the menu
106
- > .dropdown-menu {
107
- display: block;
108
- }
109
-
110
110
  // Remove the outline when :focus is triggered
111
111
  > a {
112
112
  outline: 0;
113
113
  }
114
114
  }
115
115
 
116
- // Menu positioning
117
- //
118
- // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
119
- // menu with the parent.
120
- .dropdown-menu-right {
121
- right: 0;
122
- left: auto; // Reset the default from `.dropdown-menu`
123
- }
124
-
125
- .dropdown-menu-left {
126
- right: auto;
127
- left: 0;
116
+ .dropdown-menu.show {
117
+ display: block;
128
118
  }
129
119
 
130
120
  // Dropdown section headers
@@ -136,26 +126,3 @@
136
126
  color: $dropdown-header-color;
137
127
  white-space: nowrap; // as with > li > a
138
128
  }
139
-
140
- // Backdrop to catch body clicks on mobile, etc.
141
- .dropdown-backdrop {
142
- position: fixed;
143
- top: 0;
144
- right: 0;
145
- bottom: 0;
146
- left: 0;
147
- z-index: $zindex-dropdown-backdrop;
148
- }
149
-
150
- // Allow for dropdowns to go bottom up (aka, dropup-menu)
151
- //
152
- // Just add .dropup after the standard .dropdown class and you're set.
153
-
154
- .dropup {
155
- // Different positioning for bottom up menu
156
- .dropdown-menu {
157
- top: auto;
158
- bottom: 100%;
159
- margin-bottom: $dropdown-margin-top;
160
- }
161
- }
@@ -1,4 +1,4 @@
1
- // scss-lint:disable QualifyingElement
1
+ // scss-lint:disable QualifyingElement, VendorPrefix
2
2
 
3
3
  //
4
4
  // Textual form controls
@@ -9,9 +9,9 @@
9
9
  width: 100%;
10
10
  // // Make inputs at least the height of their button counterpart (base line-height + padding + border)
11
11
  // height: $input-height;
12
- padding: $input-padding-y $input-padding-x;
12
+ padding: $input-btn-padding-y $input-btn-padding-x;
13
13
  font-size: $font-size-base;
14
- line-height: $input-line-height;
14
+ line-height: $input-btn-line-height;
15
15
  color: $input-color;
16
16
  background-color: $input-bg;
17
17
  // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214.
@@ -42,7 +42,7 @@
42
42
 
43
43
  // Placeholder
44
44
  &::placeholder {
45
- color: $input-color-placeholder;
45
+ color: $input-placeholder-color;
46
46
  // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
47
47
  opacity: 1;
48
48
  }
@@ -54,20 +54,15 @@
54
54
  // don't honor that edge case; we style them as disabled anyway.
55
55
  &:disabled,
56
56
  &[readonly] {
57
- background-color: $input-bg-disabled;
57
+ background-color: $input-disabled-bg;
58
58
  // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
59
59
  opacity: 1;
60
60
  }
61
-
62
- &:disabled {
63
- cursor: $cursor-disabled;
64
- }
65
61
  }
66
62
 
67
63
  select.form-control {
68
64
  &:not([size]):not([multiple]) {
69
- $select-border-width: ($border-width * 2);
70
- height: calc(#{$input-height} + #{$select-border-width});
65
+ height: $input-height;
71
66
  }
72
67
 
73
68
  &:focus::-ms-value {
@@ -95,20 +90,20 @@ select.form-control {
95
90
  // For use with horizontal and inline forms, when you need the label text to
96
91
  // align with the form controls.
97
92
  .col-form-label {
98
- padding-top: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
99
- padding-bottom: calc(#{$input-padding-y} - #{$input-btn-border-width} * 2);
93
+ padding-top: calc(#{$input-btn-padding-y} - #{$input-btn-border-width} * 2);
94
+ padding-bottom: calc(#{$input-btn-padding-y} - #{$input-btn-border-width} * 2);
100
95
  margin-bottom: 0; // Override the `<label>` default
101
96
  }
102
97
 
103
98
  .col-form-label-lg {
104
- padding-top: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
105
- padding-bottom: calc(#{$input-padding-y-lg} - #{$input-btn-border-width} * 2);
99
+ padding-top: calc(#{$input-btn-padding-y-lg} - #{$input-btn-border-width} * 2);
100
+ padding-bottom: calc(#{$input-btn-padding-y-lg} - #{$input-btn-border-width} * 2);
106
101
  font-size: $font-size-lg;
107
102
  }
108
103
 
109
104
  .col-form-label-sm {
110
- padding-top: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
111
- padding-bottom: calc(#{$input-padding-y-sm} - #{$input-btn-border-width} * 2);
105
+ padding-top: calc(#{$input-btn-padding-y-sm} - #{$input-btn-border-width} * 2);
106
+ padding-bottom: calc(#{$input-btn-padding-y-sm} - #{$input-btn-border-width} * 2);
112
107
  font-size: $font-size-sm;
113
108
  }
114
109
 
@@ -120,23 +115,23 @@ select.form-control {
120
115
  // For use with horizontal and inline forms, when you need the legend text to
121
116
  // be the same size as regular labels, and to align with the form controls.
122
117
  .col-form-legend {
123
- padding-top: $input-padding-y;
124
- padding-bottom: $input-padding-y;
118
+ padding-top: $input-btn-padding-y;
119
+ padding-bottom: $input-btn-padding-y;
125
120
  margin-bottom: 0;
126
121
  font-size: $font-size-base;
127
122
  }
128
123
 
129
124
 
130
- // Static form control text
125
+ // Readonly controls as plain text
131
126
  //
132
- // Apply class to an element to make any string of text align with labels in a
133
- // horizontal form layout.
127
+ // Apply class to a readonly input to make it appear like regular plain
128
+ // text (without any border, background color, focus indicator)
134
129
 
135
- .form-control-static {
136
- padding-top: $input-padding-y;
137
- padding-bottom: $input-padding-y;
130
+ .form-control-plaintext {
131
+ padding-top: $input-btn-padding-y;
132
+ padding-bottom: $input-btn-padding-y;
138
133
  margin-bottom: 0; // match inputs if this class comes on inputs with default margins
139
- line-height: $input-line-height;
134
+ line-height: $input-btn-line-height;
140
135
  border: solid transparent;
141
136
  border-width: $input-btn-border-width 0;
142
137
 
@@ -157,8 +152,9 @@ select.form-control {
157
152
  // issue documented in https://github.com/twbs/bootstrap/issues/15074.
158
153
 
159
154
  .form-control-sm {
160
- padding: $input-padding-y-sm $input-padding-x-sm;
155
+ padding: $input-btn-padding-y-sm $input-btn-padding-x-sm;
161
156
  font-size: $font-size-sm;
157
+ line-height: $input-btn-line-height-sm;
162
158
  @include border-radius($input-border-radius-sm);
163
159
  }
164
160
 
@@ -169,8 +165,9 @@ select.form-control-sm {
169
165
  }
170
166
 
171
167
  .form-control-lg {
172
- padding: $input-padding-y-lg $input-padding-x-lg;
168
+ padding: $input-btn-padding-y-lg $input-btn-padding-x-lg;
173
169
  font-size: $font-size-lg;
170
+ line-height: $input-btn-line-height-lg;
174
171
  @include border-radius($input-border-radius-lg);
175
172
  }
176
173
 
@@ -196,6 +193,24 @@ select.form-control-lg {
196
193
  }
197
194
 
198
195
 
196
+ // Form grid
197
+ //
198
+ // Special replacement for our grid system's `.row` for tighter form layouts.
199
+
200
+ .form-row {
201
+ display: flex;
202
+ flex-wrap: wrap;
203
+ margin-right: -5px;
204
+ margin-left: -5px;
205
+
206
+ > .col,
207
+ > [class*="col-"] {
208
+ padding-right: 5px;
209
+ padding-left: 5px;
210
+ }
211
+ }
212
+
213
+
199
214
  // Checkboxes and radios
200
215
  //
201
216
  // Indent the labels to position radios/checkboxes as hanging controls.
@@ -208,7 +223,6 @@ select.form-control-lg {
208
223
  &.disabled {
209
224
  .form-check-label {
210
225
  color: $text-muted;
211
- cursor: $cursor-disabled;
212
226
  }
213
227
  }
214
228
  }
@@ -216,7 +230,6 @@ select.form-control-lg {
216
230
  .form-check-label {
217
231
  padding-left: $form-check-input-gutter;
218
232
  margin-bottom: 0; // Override default `<label>` bottom margin
219
- cursor: pointer;
220
233
  }
221
234
 
222
235
  .form-check-input {
@@ -243,48 +256,37 @@ select.form-control-lg {
243
256
  }
244
257
 
245
258
 
246
- // Form control feedback states
259
+ // Form validation
247
260
  //
248
- // Apply contextual and semantic states to individual form controls.
249
-
250
- .form-control-feedback {
251
- margin-top: $form-feedback-margin-top;
252
- }
253
-
254
- .form-control-success,
255
- .form-control-warning,
256
- .form-control-danger {
257
- padding-right: ($input-padding-x * 3);
258
- background-repeat: no-repeat;
259
- background-position: center right ($input-height / 4);
260
- background-size: ($input-height / 2) ($input-height / 2);
261
+ // Provide feedback to users when form field values are valid or invalid. Works
262
+ // primarily for client-side validation via scoped `:invalid` and `:valid`
263
+ // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
264
+ // server side validation.
265
+
266
+ .invalid-feedback {
267
+ display: none;
268
+ margin-top: .25rem;
269
+ font-size: .875rem;
270
+ color: $form-feedback-invalid-color;
261
271
  }
262
272
 
263
- // Form validation states
264
- .has-success {
265
- @include form-control-validation($brand-success);
266
-
267
- .form-control-success {
268
- background-image: $form-icon-success;
269
- }
270
- }
271
-
272
- .has-warning {
273
- @include form-control-validation($brand-warning);
274
-
275
- .form-control-warning {
276
- background-image: $form-icon-warning;
277
- }
278
- }
279
-
280
- .has-danger {
281
- @include form-control-validation($brand-danger);
282
-
283
- .form-control-danger {
284
- background-image: $form-icon-danger;
285
- }
273
+ .invalid-tooltip {
274
+ position: absolute;
275
+ top: 100%;
276
+ z-index: 5;
277
+ display: none;
278
+ width: 250px;
279
+ padding: .5rem;
280
+ margin-top: .1rem;
281
+ font-size: .875rem;
282
+ line-height: 1;
283
+ color: #fff;
284
+ background-color: rgba($form-feedback-invalid-color,.8);
285
+ border-radius: .2rem;
286
286
  }
287
287
 
288
+ @include form-validation-state("valid", $form-feedback-valid-color);
289
+ @include form-validation-state("invalid", $form-feedback-invalid-color);
288
290
 
289
291
  // Inline forms
290
292
  //
@@ -333,7 +335,7 @@ select.form-control-lg {
333
335
  }
334
336
 
335
337
  // Make static controls behave like regular ones
336
- .form-control-static {
338
+ .form-control-plaintext {
337
339
  display: inline-block;
338
340
  }
339
341