@@ -170,41 +170,28 @@ input[type="search"] {
170
170
// Special styles for iOS temporal inputs
171
171
//
172
172
// 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 {
173
+ // text within the input to become vertically misaligned. As a workaround, we
174
+ // set a pixel line-height that matches the given height of the input, but only
175
+ // for Safari.
176
+
177
+ @media screen and (-webkit-min-device-pixel-ratio : 0 ) {
178
+ input [type = " date" ],
179
+ input [type = " time" ],
180
+ input [type = " datetime-local" ],
181
+ input [type = " month" ] {
182
+ line-height : $input-height-base ;
183
+ }
184
+ input [type = " date" ].input-sm ,
185
+ input [type = " time" ].input-sm ,
186
+ input [type = " datetime-local" ].input-sm ,
187
+ input [type = " month" ].input-sm {
187
188
line-height : $input-height-small ;
188
- line-height : $line-height-small #{\0 } ;
189
189
}
190
- & .input-lg {
190
+ input [type = " date" ].input-lg ,
191
+ input [type = " time" ].input-lg ,
192
+ input [type = " datetime-local" ].input-lg ,
193
+ input [type = " month" ].input-lg {
191
194
line-height : $input-height-large ;
192
- line-height : $line-height-large #{\0 } ;
193
- }
194
- }
195
-
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 ;
202
-
203
- & .input-sm {
204
- line-height : $line-height-small ;
205
- }
206
- & .input-lg {
207
- line-height : $line-height-large ;
208
195
}
209
196
}
210
197
@@ -325,9 +312,11 @@ input[type="checkbox"] {
325
312
// Build on `.form-control` with modifier classes to decrease or increase the
326
313
// height and font-size of form controls.
327
314
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 );
315
+ @include input-size (' .input-sm' , $input-height-small , $padding-small-vertical , $padding-small-horizontal , $font-size-small , $line-height-small , $input-border-radius-small );
316
+ @include input-size (' .form-group-sm .form-control' , $input-height-small , $padding-small-vertical , $padding-small-horizontal , $font-size-small , $line-height-small , $input-border-radius-small );
329
317
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 );
318
+ @include input-size (' .input-lg' , $input-height-large , $padding-large-vertical , $padding-large-horizontal , $font-size-large , $line-height-large , $input-border-radius-large );
319
+ @include input-size (' .form-group-lg .form-control' , $input-height-large , $padding-large-vertical , $padding-large-horizontal , $font-size-large , $line-height-large , $input-border-radius-large );
331
320
332
321
333
322
// Form control feedback states
0 commit comments