bootstrap-sass 3.3.0.1 → 3.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.travis.yml +8 -14
  4. data/CHANGELOG.md +64 -0
  5. data/CONTRIBUTING.md +8 -1
  6. data/Gemfile +1 -4
  7. data/LICENSE +2 -1
  8. data/README.md +135 -114
  9. data/Rakefile +58 -12
  10. data/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  11. data/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +273 -214
  12. data/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  13. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  14. data/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  15. data/assets/javascripts/bootstrap/affix.js +11 -9
  16. data/assets/javascripts/bootstrap/alert.js +6 -5
  17. data/assets/javascripts/bootstrap/button.js +25 -16
  18. data/assets/javascripts/bootstrap/carousel.js +25 -18
  19. data/assets/javascripts/bootstrap/collapse.js +13 -12
  20. data/assets/javascripts/bootstrap/dropdown.js +51 -47
  21. data/assets/javascripts/bootstrap/modal.js +112 -35
  22. data/assets/javascripts/bootstrap/popover.js +31 -27
  23. data/assets/javascripts/bootstrap/scrollspy.js +19 -22
  24. data/assets/javascripts/bootstrap/tab.js +14 -12
  25. data/assets/javascripts/bootstrap/tooltip.js +255 -56
  26. data/assets/javascripts/bootstrap/transition.js +5 -5
  27. data/assets/javascripts/bootstrap-sprockets.js +2 -2
  28. data/assets/javascripts/bootstrap.js +1282 -962
  29. data/assets/javascripts/bootstrap.min.js +6 -0
  30. data/assets/stylesheets/_bootstrap-compass.scss +2 -0
  31. data/assets/stylesheets/_bootstrap-mincer.scss +4 -2
  32. data/assets/stylesheets/_bootstrap-sprockets.scss +2 -0
  33. data/assets/stylesheets/_bootstrap.scss +6 -0
  34. data/assets/stylesheets/bootstrap/_alerts.scss +8 -3
  35. data/assets/stylesheets/bootstrap/_badges.scss +16 -5
  36. data/assets/stylesheets/bootstrap/_breadcrumbs.scss +3 -1
  37. data/assets/stylesheets/bootstrap/_button-groups.scss +11 -14
  38. data/assets/stylesheets/bootstrap/_buttons.scss +18 -10
  39. data/assets/stylesheets/bootstrap/_carousel.scss +40 -36
  40. data/assets/stylesheets/bootstrap/_close.scss +2 -0
  41. data/assets/stylesheets/bootstrap/_code.scss +3 -3
  42. data/assets/stylesheets/bootstrap/_component-animations.scss +2 -2
  43. data/assets/stylesheets/bootstrap/_dropdowns.scss +24 -24
  44. data/assets/stylesheets/bootstrap/_forms.scss +149 -103
  45. data/assets/stylesheets/bootstrap/_glyphicons.scss +85 -12
  46. data/assets/stylesheets/bootstrap/_grid.scss +10 -0
  47. data/assets/stylesheets/bootstrap/_input-groups.scss +10 -5
  48. data/assets/stylesheets/bootstrap/_jumbotron.scss +11 -5
  49. data/assets/stylesheets/bootstrap/_labels.scss +1 -1
  50. data/assets/stylesheets/bootstrap/_list-group.scss +30 -34
  51. data/assets/stylesheets/bootstrap/_media.scss +19 -0
  52. data/assets/stylesheets/bootstrap/_mixins.scss +1 -0
  53. data/assets/stylesheets/bootstrap/_modals.scss +9 -8
  54. data/assets/stylesheets/bootstrap/_navbar.scss +77 -82
  55. data/assets/stylesheets/bootstrap/_navs.scss +4 -6
  56. data/assets/stylesheets/bootstrap/_normalize.scss +13 -13
  57. data/assets/stylesheets/bootstrap/_pager.scss +2 -2
  58. data/assets/stylesheets/bootstrap/_pagination.scss +15 -17
  59. data/assets/stylesheets/bootstrap/_panels.scss +16 -6
  60. data/assets/stylesheets/bootstrap/_popovers.scss +50 -58
  61. data/assets/stylesheets/bootstrap/_print.scss +90 -98
  62. data/assets/stylesheets/bootstrap/_progress-bars.scss +3 -3
  63. data/assets/stylesheets/bootstrap/_responsive-embed.scss +10 -10
  64. data/assets/stylesheets/bootstrap/_responsive-utilities.scss +11 -6
  65. data/assets/stylesheets/bootstrap/_scaffolding.scss +18 -7
  66. data/assets/stylesheets/bootstrap/_tables.scss +24 -24
  67. data/assets/stylesheets/bootstrap/_theme.scss +57 -22
  68. data/assets/stylesheets/bootstrap/_thumbnails.scss +1 -1
  69. data/assets/stylesheets/bootstrap/_tooltip.scss +49 -32
  70. data/assets/stylesheets/bootstrap/_type.scss +12 -12
  71. data/assets/stylesheets/bootstrap/_utilities.scss +0 -1
  72. data/assets/stylesheets/bootstrap/_variables.scss +27 -17
  73. data/assets/stylesheets/bootstrap/_wells.scss +2 -2
  74. data/assets/stylesheets/bootstrap/mixins/_alerts.scss +2 -1
  75. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +2 -1
  76. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +4 -4
  77. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +20 -11
  78. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +1 -1
  79. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
  80. data/assets/stylesheets/bootstrap/mixins/_forms.scss +4 -4
  81. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +6 -8
  82. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +2 -2
  83. data/assets/stylesheets/bootstrap/mixins/_grid.scss +8 -8
  84. data/assets/stylesheets/bootstrap/mixins/_hide-text.scss +3 -3
  85. data/assets/stylesheets/bootstrap/mixins/_image.scss +5 -10
  86. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +3 -2
  87. data/assets/stylesheets/bootstrap/mixins/_opacity.scss +2 -3
  88. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -1
  89. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  90. data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  91. data/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +1 -5
  92. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
  93. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +2 -1
  94. data/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +4 -4
  95. data/bootstrap-sass.gemspec +10 -9
  96. data/bower.json +6 -20
  97. data/composer.json +2 -2
  98. data/eyeglass-exports.js +7 -0
  99. data/lib/bootstrap-sass/engine.rb +6 -1
  100. data/lib/bootstrap-sass/version.rb +2 -2
  101. data/lib/bootstrap-sass.rb +32 -13
  102. data/package-lock.json +1611 -0
  103. data/package.json +21 -7
  104. data/sache.json +1 -1
  105. data/tasks/bower.rake +2 -5
  106. data/tasks/converter/fonts_conversion.rb +1 -1
  107. data/tasks/converter/js_conversion.rb +7 -5
  108. data/tasks/converter/less_conversion.rb +48 -37
  109. data/tasks/converter/network.rb +12 -7
  110. data/tasks/converter.rb +1 -1
  111. data/templates/project/_bootstrap-variables.sass +27 -18
  112. data/templates/project/styles.sass +3 -0
  113. data/test/compilation_test.rb +24 -12
  114. data/test/dummy_rails/app/assets/stylesheets/{application.css.sass → application.sass} +0 -0
  115. data/test/dummy_rails/app/views/pages/root.html.slim +43 -0
  116. data/test/dummy_rails/config/application.rb +2 -1
  117. data/test/dummy_rails/config/boot.rb +1 -1
  118. data/test/dummy_rails/config/environments/development.rb +0 -3
  119. data/test/dummy_rails/config/environments/production.rb +7 -1
  120. data/test/dummy_rails/config/environments/test.rb +9 -1
  121. data/test/dummy_sass_only/Gemfile +1 -1
  122. data/test/dummy_sass_only/compile.rb +14 -7
  123. data/test/dummy_sass_only/import_all.scss +2 -0
  124. data/test/gemfiles/default.gemfile +3 -0
  125. data/test/node_mincer_test.rb +2 -3
  126. data/test/node_sass_compile_test.sh +4 -3
  127. data/test/sass_test.rb +10 -7
  128. data/test/sprockets_rails_test.rb +12 -8
  129. data/test/support/dummy_rails_integration.rb +1 -1
  130. data/test/support/reporting.rb +10 -0
  131. data/test/test_helper.rb +3 -2
  132. metadata +56 -46
  133. data/test/compass_test.rb +0 -9
  134. data/test/dummy_rails/log/development.log +0 -0
  135. data/test/dummy_sass_only/import_all.sass +0 -2
  136. data/test/gemfiles/sass_3_2.gemfile +0 -6
  137. data/test/gemfiles/sass_3_3.gemfile +0 -6
  138. data/test/gemfiles/sass_3_4.gemfile +0 -7
  139. data/test/gemfiles/sass_head.gemfile +0 -6
@@ -26,10 +26,12 @@
26
26
  // Additional properties for button version
27
27
  // iOS requires the button element instead of an anchor tag.
28
28
  // If you want the anchor version, it requires `href="#"`.
29
+ // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
29
30
  button.close {
30
31
  padding: 0;
31
32
  cursor: pointer;
32
33
  background: transparent;
33
34
  border: 0;
34
35
  -webkit-appearance: none;
36
+ appearance: none;
35
37
  }
@@ -27,12 +27,12 @@ kbd {
27
27
  color: $kbd-color;
28
28
  background-color: $kbd-bg;
29
29
  border-radius: $border-radius-small;
30
- box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
30
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
31
31
 
32
32
  kbd {
33
33
  padding: 0;
34
34
  font-size: 100%;
35
- font-weight: bold;
35
+ font-weight: 700;
36
36
  box-shadow: none;
37
37
  }
38
38
  }
@@ -44,9 +44,9 @@ pre {
44
44
  margin: 0 0 ($line-height-computed / 2);
45
45
  font-size: ($font-size-base - 1); // 14px to 13px
46
46
  line-height: $line-height-base;
47
+ color: $pre-color;
47
48
  word-break: break-all;
48
49
  word-wrap: break-word;
49
- color: $pre-color;
50
50
  background-color: $pre-bg;
51
51
  border: 1px solid $pre-border-color;
52
52
  border-radius: $border-radius-base;
@@ -10,6 +10,7 @@
10
10
  .fade {
11
11
  opacity: 0;
12
12
  @include transition(opacity .15s linear);
13
+
13
14
  &.in {
14
15
  opacity: 1;
15
16
  }
@@ -17,9 +18,8 @@
17
18
 
18
19
  .collapse {
19
20
  display: none;
20
- visibility: hidden;
21
21
 
22
- &.in { display: block; visibility: visible; }
22
+ &.in { display: block; }
23
23
  // [converter] extracted tr&.in to tr.collapse.in
24
24
  // [converter] extracted tbody&.in to tbody.collapse.in
25
25
  }
@@ -10,12 +10,14 @@
10
10
  height: 0;
11
11
  margin-left: 2px;
12
12
  vertical-align: middle;
13
- border-top: $caret-width-base solid;
13
+ border-top: $caret-width-base dashed;
14
+ border-top: $caret-width-base solid \9; // IE8
14
15
  border-right: $caret-width-base solid transparent;
15
- border-left: $caret-width-base solid transparent;
16
+ border-left: $caret-width-base solid transparent;
16
17
  }
17
18
 
18
19
  // The dropdown wrapper (div)
20
+ .dropup,
19
21
  .dropdown {
20
22
  position: relative;
21
23
  }
@@ -36,15 +38,15 @@
36
38
  min-width: 160px;
37
39
  padding: 5px 0;
38
40
  margin: 2px 0 0; // override default ul
39
- list-style: none;
40
41
  font-size: $font-size-base;
41
42
  text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
43
+ list-style: none;
42
44
  background-color: $dropdown-bg;
45
+ background-clip: padding-box;
43
46
  border: 1px solid $dropdown-fallback-border; // IE8 fallback
44
47
  border: 1px solid $dropdown-border;
45
48
  border-radius: $border-radius-base;
46
- @include box-shadow(0 6px 12px rgba(0,0,0,.175));
47
- background-clip: padding-box;
49
+ @include box-shadow(0 6px 12px rgba(0, 0, 0, .175));
48
50
 
49
51
  // Aligns the dropdown menu to right
50
52
  //
@@ -64,20 +66,17 @@
64
66
  display: block;
65
67
  padding: 3px 20px;
66
68
  clear: both;
67
- font-weight: normal;
69
+ font-weight: 400;
68
70
  line-height: $line-height-base;
69
71
  color: $dropdown-link-color;
70
72
  white-space: nowrap; // prevent links from randomly breaking onto new lines
71
- }
72
- }
73
73
 
74
- // Hover/Focus state
75
- .dropdown-menu > li > a {
76
- &:hover,
77
- &:focus {
78
- text-decoration: none;
79
- color: $dropdown-link-hover-color;
80
- background-color: $dropdown-link-hover-bg;
74
+ &:hover,
75
+ &:focus {
76
+ color: $dropdown-link-hover-color;
77
+ text-decoration: none;
78
+ background-color: $dropdown-link-hover-bg;
79
+ }
81
80
  }
82
81
  }
83
82
 
@@ -88,8 +87,8 @@
88
87
  &:focus {
89
88
  color: $dropdown-link-active-color;
90
89
  text-decoration: none;
91
- outline: 0;
92
90
  background-color: $dropdown-link-active-bg;
91
+ outline: 0;
93
92
  }
94
93
  }
95
94
 
@@ -108,10 +107,10 @@
108
107
  &:hover,
109
108
  &:focus {
110
109
  text-decoration: none;
110
+ cursor: $cursor-disabled;
111
111
  background-color: transparent;
112
112
  background-image: none; // Remove CSS gradient
113
113
  @include reset-filter;
114
- cursor: $cursor-disabled;
115
114
  }
116
115
  }
117
116
 
@@ -133,8 +132,8 @@
133
132
  // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
134
133
  // menu with the parent.
135
134
  .dropdown-menu-right {
136
- left: auto; // Reset the default from `.dropdown-menu`
137
135
  right: 0;
136
+ left: auto; // Reset the default from `.dropdown-menu`
138
137
  }
139
138
  // With v3, we enabled auto-flipping if you have a dropdown within a right
140
139
  // aligned nav component. To enable the undoing of that, we provide an override
@@ -143,8 +142,8 @@
143
142
  // This is only for left-aligning a dropdown menu within a `.navbar-right` or
144
143
  // `.pull-right` nav component.
145
144
  .dropdown-menu-left {
146
- left: 0;
147
145
  right: auto;
146
+ left: 0;
148
147
  }
149
148
 
150
149
  // Dropdown section headers
@@ -160,10 +159,10 @@
160
159
  // Backdrop to catch body clicks on mobile, etc.
161
160
  .dropdown-backdrop {
162
161
  position: fixed;
163
- left: 0;
162
+ top: 0;
164
163
  right: 0;
165
164
  bottom: 0;
166
- top: 0;
165
+ left: 0;
167
166
  z-index: ($zindex-dropdown - 10);
168
167
  }
169
168
 
@@ -182,15 +181,16 @@
182
181
  .navbar-fixed-bottom .dropdown {
183
182
  // Reverse the caret
184
183
  .caret {
185
- border-top: 0;
186
- border-bottom: $caret-width-base solid;
187
184
  content: "";
185
+ border-top: 0;
186
+ border-bottom: $caret-width-base dashed;
187
+ border-bottom: $caret-width-base solid \9; // IE8
188
188
  }
189
189
  // Different positioning for bottom up menu
190
190
  .dropdown-menu {
191
191
  top: auto;
192
192
  bottom: 100%;
193
- margin-bottom: 1px;
193
+ margin-bottom: 2px;
194
194
  }
195
195
  }
196
196
 
@@ -8,13 +8,13 @@
8
8
  // Restyle and baseline non-control form elements.
9
9
 
10
10
  fieldset {
11
- padding: 0;
12
- margin: 0;
13
- border: 0;
14
11
  // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
15
12
  // so we reset that to ensure it behaves more like a standard block element.
16
13
  // See https://github.com/twbs/bootstrap/issues/12359.
17
14
  min-width: 0;
15
+ padding: 0;
16
+ margin: 0;
17
+ border: 0;
18
18
  }
19
19
 
20
20
  legend {
@@ -33,7 +33,7 @@ label {
33
33
  display: inline-block;
34
34
  max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
35
35
  margin-bottom: 5px;
36
- font-weight: bold;
36
+ font-weight: 700;
37
37
  }
38
38
 
39
39
 
@@ -43,9 +43,18 @@ label {
43
43
  // is required to ensure optimum display with or without those classes to better
44
44
  // address browser inconsistencies.
45
45
 
46
- // Override content-box in Normalize (* isn't specific enough)
47
46
  input[type="search"] {
47
+ // Override content-box in Normalize (* isn't specific enough)
48
48
  @include box-sizing(border-box);
49
+
50
+ // Search inputs in iOS
51
+ //
52
+ // This overrides the extra rounded corners on search inputs in iOS so that our
53
+ // `.form-control` class can properly style them. Note that this cannot simply
54
+ // be added to `.form-control` as it's not specific enough. For details, see
55
+ // https://github.com/twbs/bootstrap/issues/11586.
56
+ -webkit-appearance: none;
57
+ appearance: none;
49
58
  }
50
59
 
51
60
  // Position radios and checkboxes better
@@ -54,9 +63,18 @@ input[type="checkbox"] {
54
63
  margin: 4px 0 0;
55
64
  margin-top: 1px \9; // IE8-9
56
65
  line-height: normal;
66
+
67
+ // Apply same disabled cursor tweak as for inputs
68
+ // Some special care is needed because <label>s don't inherit their parent's `cursor`.
69
+ //
70
+ // Note: Neither radios nor checkboxes can be readonly.
71
+ &[disabled],
72
+ &.disabled,
73
+ fieldset[disabled] & {
74
+ cursor: $cursor-disabled;
75
+ }
57
76
  }
58
77
 
59
- // Set the height of file controls to match text inputs
60
78
  input[type="file"] {
61
79
  display: block;
62
80
  }
@@ -123,8 +141,8 @@ output {
123
141
  background-color: $input-bg;
124
142
  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
125
143
  border: 1px solid $input-border;
126
- border-radius: $input-border-radius;
127
- @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
144
+ border-radius: $input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
145
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075));
128
146
  @include transition(border-color ease-in-out .15s, box-shadow ease-in-out .15s);
129
147
 
130
148
  // Customize the `:focus` state to imitate native WebKit styles.
@@ -133,6 +151,12 @@ output {
133
151
  // Placeholder
134
152
  @include placeholder;
135
153
 
154
+ // Unstyle the caret on `<select>`s in IE10+.
155
+ &::-ms-expand {
156
+ background-color: transparent;
157
+ border: 0;
158
+ }
159
+
136
160
  // Disabled and read-only inputs
137
161
  //
138
162
  // HTML5 says that controls under a fieldset > legend:first-child won't be
@@ -141,9 +165,13 @@ output {
141
165
  &[disabled],
142
166
  &[readonly],
143
167
  fieldset[disabled] & {
144
- cursor: $cursor-disabled;
145
168
  background-color: $input-bg-disabled;
146
- opacity: 1; // iOS fix for unreadable disabled content
169
+ opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
170
+ }
171
+
172
+ &[disabled],
173
+ fieldset[disabled] & {
174
+ cursor: $cursor-disabled;
147
175
  }
148
176
 
149
177
  // [converter] extracted textarea& to textarea.form-control
@@ -155,56 +183,33 @@ textarea.form-control {
155
183
  }
156
184
 
157
185
 
158
- // Search inputs in iOS
159
- //
160
- // This overrides the extra rounded corners on search inputs in iOS so that our
161
- // `.form-control` class can properly style them. Note that this cannot simply
162
- // be added to `.form-control` as it's not specific enough. For details, see
163
- // https://github.com/twbs/bootstrap/issues/11586.
164
-
165
- input[type="search"] {
166
- -webkit-appearance: none;
167
- }
168
-
169
-
170
186
  // Special styles for iOS temporal inputs
171
187
  //
172
188
  // In Mobile Safari, setting `display: block` on temporal inputs causes the
173
- // text within the input to become vertically misaligned.
174
- // As a workaround, we set a pixel line-height that matches the
175
- // given height of the input. Since this fucks up everything else, we have to
176
- // appropriately reset it for Internet Explorer and the size variations.
177
-
178
- input[type="date"],
179
- input[type="time"],
180
- input[type="datetime-local"],
181
- input[type="month"] {
182
- line-height: $input-height-base;
183
- // IE8+ misaligns the text within date inputs, so we reset
184
- line-height: $line-height-base #{\0};
185
-
186
- &.input-sm {
187
- line-height: $input-height-small;
188
- line-height: $line-height-small #{\0};
189
- }
190
- &.input-lg {
191
- line-height: $input-height-large;
192
- line-height: $line-height-large #{\0};
193
- }
194
- }
189
+ // text within the input to become vertically misaligned. As a workaround, we
190
+ // set a pixel line-height that matches the given height of the input, but only
191
+ // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
192
+ //
193
+ // Note that as of 9.3, iOS doesn't support `week`.
194
+
195
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
196
+ input[type="date"],
197
+ input[type="time"],
198
+ input[type="datetime-local"],
199
+ input[type="month"] {
200
+ &.form-control {
201
+ line-height: $input-height-base;
202
+ }
195
203
 
196
- // IE 11 hack to reverse the iOS temporal input hack.
197
- _:-ms-fullscreen, :root input[type="date"],
198
- _:-ms-fullscreen, :root input[type="time"],
199
- _:-ms-fullscreen, :root input[type="datetime-local"],
200
- _:-ms-fullscreen, :root input[type="month"] {
201
- line-height: $line-height-base;
204
+ &.input-sm,
205
+ .input-group-sm & {
206
+ line-height: $input-height-small;
207
+ }
202
208
 
203
- &.input-sm {
204
- line-height: $line-height-small;
205
- }
206
- &.input-lg {
207
- line-height: $line-height-large;
209
+ &.input-lg,
210
+ .input-group-lg & {
211
+ line-height: $input-height-large;
212
+ }
208
213
  }
209
214
  }
210
215
 
@@ -215,7 +220,7 @@ _:-ms-fullscreen, :root input[type="month"] {
215
220
  // horizontal forms, use the predefined grid classes.
216
221
 
217
222
  .form-group {
218
- margin-bottom: 15px;
223
+ margin-bottom: $form-group-margin-bottom;
219
224
  }
220
225
 
221
226
 
@@ -230,11 +235,19 @@ _:-ms-fullscreen, :root input[type="month"] {
230
235
  margin-top: 10px;
231
236
  margin-bottom: 10px;
232
237
 
238
+ // These are used on elements with <label> descendants
239
+ &.disabled,
240
+ fieldset[disabled] & {
241
+ label {
242
+ cursor: $cursor-disabled;
243
+ }
244
+ }
245
+
233
246
  label {
234
247
  min-height: $line-height-computed; // Ensure the input doesn't jump when there is no text
235
248
  padding-left: 20px;
236
249
  margin-bottom: 0;
237
- font-weight: normal;
250
+ font-weight: 400;
238
251
  cursor: pointer;
239
252
  }
240
253
  }
@@ -243,8 +256,8 @@ _:-ms-fullscreen, :root input[type="month"] {
243
256
  .checkbox input[type="checkbox"],
244
257
  .checkbox-inline input[type="checkbox"] {
245
258
  position: absolute;
246
- margin-left: -20px;
247
259
  margin-top: 4px \9;
260
+ margin-left: -20px;
248
261
  }
249
262
 
250
263
  .radio + .radio,
@@ -255,48 +268,24 @@ _:-ms-fullscreen, :root input[type="month"] {
255
268
  // Radios and checkboxes on same line
256
269
  .radio-inline,
257
270
  .checkbox-inline {
271
+ position: relative;
258
272
  display: inline-block;
259
273
  padding-left: 20px;
260
274
  margin-bottom: 0;
275
+ font-weight: 400;
261
276
  vertical-align: middle;
262
- font-weight: normal;
263
277
  cursor: pointer;
264
- }
265
- .radio-inline + .radio-inline,
266
- .checkbox-inline + .checkbox-inline {
267
- margin-top: 0;
268
- margin-left: 10px; // space out consecutive inline controls
269
- }
270
278
 
271
- // Apply same disabled cursor tweak as for inputs
272
- // Some special care is needed because <label>s don't inherit their parent's `cursor`.
273
- //
274
- // Note: Neither radios nor checkboxes can be readonly.
275
- input[type="radio"],
276
- input[type="checkbox"] {
277
- &[disabled],
279
+ // These are used directly on <label>s
278
280
  &.disabled,
279
281
  fieldset[disabled] & {
280
282
  cursor: $cursor-disabled;
281
283
  }
282
284
  }
283
- // These classes are used directly on <label>s
284
- .radio-inline,
285
- .checkbox-inline {
286
- &.disabled,
287
- fieldset[disabled] & {
288
- cursor: $cursor-disabled;
289
- }
290
- }
291
- // These classes are used on elements with <label> descendants
292
- .radio,
293
- .checkbox {
294
- &.disabled,
295
- fieldset[disabled] & {
296
- label {
297
- cursor: $cursor-disabled;
298
- }
299
- }
285
+ .radio-inline + .radio-inline,
286
+ .checkbox-inline + .checkbox-inline {
287
+ margin-top: 0;
288
+ margin-left: 10px; // space out consecutive inline controls
300
289
  }
301
290
 
302
291
 
@@ -306,6 +295,7 @@ input[type="checkbox"] {
306
295
  // a horizontal form layout.
307
296
 
308
297
  .form-control-static {
298
+ min-height: ($line-height-computed + $font-size-base);
309
299
  // Size it appropriately next to real form controls
310
300
  padding-top: ($padding-base-vertical + 1);
311
301
  padding-bottom: ($padding-base-vertical + 1);
@@ -314,8 +304,8 @@ input[type="checkbox"] {
314
304
 
315
305
  &.input-lg,
316
306
  &.input-sm {
317
- padding-left: 0;
318
307
  padding-right: 0;
308
+ padding-left: 0;
319
309
  }
320
310
  }
321
311
 
@@ -324,10 +314,61 @@ input[type="checkbox"] {
324
314
  //
325
315
  // Build on `.form-control` with modifier classes to decrease or increase the
326
316
  // height and font-size of form controls.
317
+ //
318
+ // The `.form-group-* form-control` variations are sadly duplicated to avoid the
319
+ // issue documented in https://github.com/twbs/bootstrap/issues/15074.
327
320
 
328
- @include input-size('.input-sm, .form-group-sm .form-control', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
321
+ @include input-size('.input-sm', $input-height-small, $padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $input-border-radius-small);
322
+ .form-group-sm {
323
+ .form-control {
324
+ height: $input-height-small;
325
+ padding: $padding-small-vertical $padding-small-horizontal;
326
+ font-size: $font-size-small;
327
+ line-height: $line-height-small;
328
+ border-radius: $input-border-radius-small;
329
+ }
330
+ select.form-control {
331
+ height: $input-height-small;
332
+ line-height: $input-height-small;
333
+ }
334
+ textarea.form-control,
335
+ select[multiple].form-control {
336
+ height: auto;
337
+ }
338
+ .form-control-static {
339
+ height: $input-height-small;
340
+ min-height: ($line-height-computed + $font-size-small);
341
+ padding: ($padding-small-vertical + 1) $padding-small-horizontal;
342
+ font-size: $font-size-small;
343
+ line-height: $line-height-small;
344
+ }
345
+ }
329
346
 
330
- @include input-size('.input-lg, .form-group-lg .form-control', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
347
+ @include input-size('.input-lg', $input-height-large, $padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $input-border-radius-large);
348
+ .form-group-lg {
349
+ .form-control {
350
+ height: $input-height-large;
351
+ padding: $padding-large-vertical $padding-large-horizontal;
352
+ font-size: $font-size-large;
353
+ line-height: $line-height-large;
354
+ border-radius: $input-border-radius-large;
355
+ }
356
+ select.form-control {
357
+ height: $input-height-large;
358
+ line-height: $input-height-large;
359
+ }
360
+ textarea.form-control,
361
+ select[multiple].form-control {
362
+ height: auto;
363
+ }
364
+ .form-control-static {
365
+ height: $input-height-large;
366
+ min-height: ($line-height-computed + $font-size-large);
367
+ padding: ($padding-large-vertical + 1) $padding-large-horizontal;
368
+ font-size: $font-size-large;
369
+ line-height: $line-height-large;
370
+ }
371
+ }
331
372
 
332
373
 
333
374
  // Form control feedback states
@@ -356,12 +397,16 @@ input[type="checkbox"] {
356
397
  text-align: center;
357
398
  pointer-events: none;
358
399
  }
359
- .input-lg + .form-control-feedback {
400
+ .input-lg + .form-control-feedback,
401
+ .input-group-lg + .form-control-feedback,
402
+ .form-group-lg .form-control + .form-control-feedback {
360
403
  width: $input-height-large;
361
404
  height: $input-height-large;
362
405
  line-height: $input-height-large;
363
406
  }
364
- .input-sm + .form-control-feedback {
407
+ .input-sm + .form-control-feedback,
408
+ .input-group-sm + .form-control-feedback,
409
+ .form-group-sm .form-control + .form-control-feedback {
365
410
  width: $input-height-small;
366
411
  height: $input-height-small;
367
412
  line-height: $input-height-small;
@@ -382,10 +427,10 @@ input[type="checkbox"] {
382
427
  .has-feedback label {
383
428
 
384
429
  & ~ .form-control-feedback {
385
- top: ($line-height-computed + 5); // Height of the `label` and its margin
430
+ top: ($line-height-computed + 5); // Height of the `label` and its margin
386
431
  }
387
432
  &.sr-only ~ .form-control-feedback {
388
- top: 0;
433
+ top: 0;
389
434
  }
390
435
  }
391
436
 
@@ -460,8 +505,7 @@ input[type="checkbox"] {
460
505
  }
461
506
 
462
507
  // Remove default margin on radios/checkboxes that were used for stacking, and
463
- // then undo the floating of radios and checkboxes to match (which also avoids
464
- // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
508
+ // then undo the floating of radios and checkboxes to match.
465
509
  .radio,
466
510
  .checkbox {
467
511
  display: inline-block;
@@ -506,9 +550,9 @@ input[type="checkbox"] {
506
550
  .checkbox,
507
551
  .radio-inline,
508
552
  .checkbox-inline {
553
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
509
554
  margin-top: 0;
510
555
  margin-bottom: 0;
511
- padding-top: ($padding-base-vertical + 1); // Default padding plus a border
512
556
  }
513
557
  // Account for padding we're adding to ensure the alignment and of help text
514
558
  // and other content below items
@@ -526,9 +570,9 @@ input[type="checkbox"] {
526
570
  // labels on narrow viewports stack the same as a default form example.
527
571
  @media (min-width: $screen-sm-min) {
528
572
  .control-label {
529
- text-align: right;
530
- margin-bottom: 0;
531
573
  padding-top: ($padding-base-vertical + 1); // Default padding plus a border
574
+ margin-bottom: 0;
575
+ text-align: right;
532
576
  }
533
577
  }
534
578
 
@@ -537,7 +581,7 @@ input[type="checkbox"] {
537
581
  // Reposition the icon because it's now within a grid column and columns have
538
582
  // `position: relative;` on them. Also accounts for the grid gutter padding.
539
583
  .has-feedback .form-control-feedback {
540
- right: ($grid-gutter-width / 2);
584
+ right: floor(($grid-gutter-width / 2));
541
585
  }
542
586
 
543
587
  // Form group sizes
@@ -547,7 +591,8 @@ input[type="checkbox"] {
547
591
  .form-group-lg {
548
592
  @media (min-width: $screen-sm-min) {
549
593
  .control-label {
550
- padding-top: (($padding-large-vertical * $line-height-large) + 1);
594
+ padding-top: ($padding-large-vertical + 1);
595
+ font-size: $font-size-large;
551
596
  }
552
597
  }
553
598
  }
@@ -555,6 +600,7 @@ input[type="checkbox"] {
555
600
  @media (min-width: $screen-sm-min) {
556
601
  .control-label {
557
602
  padding-top: ($padding-small-vertical + 1);
603
+ font-size: $font-size-small;
558
604
  }
559
605
  }
560
606
  }