app/frameworks/twitter/bootstrap/forms.less in less-rails-bootstrap-3.3.4.0 vs app/frameworks/twitter/bootstrap/forms.less in less-rails-bootstrap-3.3.5.0
- old
+ new
@@ -54,11 +54,10 @@
margin: 4px 0 0;
margin-top: 1px \9; // IE8-9
line-height: normal;
}
-// Set the height of file controls to match text inputs
input[type="file"] {
display: block;
}
// Make range inputs behave like textual form controls
@@ -173,17 +172,21 @@
//
// In Mobile Safari, setting `display: block` on temporal inputs causes the
// text within the input to become vertically misaligned. As a workaround, we
// set a pixel line-height that matches the given height of the input, but only
// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
+//
+// Note that as of 8.3, iOS doesn't support `datetime` or `week`.
@media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
- line-height: @input-height-base;
+ &.form-control {
+ line-height: @input-height-base;
+ }
&.input-sm,
.input-group-sm & {
line-height: @input-height-small;
}
@@ -320,34 +323,58 @@
.input-sm {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
}
.form-group-sm {
.form-control {
- .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
- }
- .form-control-static {
height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
line-height: @line-height-small;
+ border-radius: @input-border-radius-small;
+ }
+ select.form-control {
+ height: @input-height-small;
+ line-height: @input-height-small;
+ }
+ textarea.form-control,
+ select[multiple].form-control {
+ height: auto;
+ }
+ .form-control-static {
+ height: @input-height-small;
min-height: (@line-height-computed + @font-size-small);
+ padding: (@padding-small-vertical + 1) @padding-small-horizontal;
+ font-size: @font-size-small;
+ line-height: @line-height-small;
}
}
.input-lg {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
}
.form-group-lg {
.form-control {
- .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
- }
- .form-control-static {
height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
line-height: @line-height-large;
+ border-radius: @input-border-radius-large;
+ }
+ select.form-control {
+ height: @input-height-large;
+ line-height: @input-height-large;
+ }
+ textarea.form-control,
+ select[multiple].form-control {
+ height: auto;
+ }
+ .form-control-static {
+ height: @input-height-large;
min-height: (@line-height-computed + @font-size-large);
+ padding: (@padding-large-vertical + 1) @padding-large-horizontal;
+ font-size: @font-size-large;
+ line-height: @line-height-large;
}
}
// Form control feedback states
@@ -374,16 +401,20 @@
height: @input-height-base;
line-height: @input-height-base;
text-align: center;
pointer-events: none;
}
-.input-lg + .form-control-feedback {
+.input-lg + .form-control-feedback,
+.input-group-lg + .form-control-feedback,
+.form-group-lg .form-control + .form-control-feedback {
width: @input-height-large;
height: @input-height-large;
line-height: @input-height-large;
}
-.input-sm + .form-control-feedback {
+.input-sm + .form-control-feedback,
+.input-group-sm + .form-control-feedback,
+.form-group-sm .form-control + .form-control-feedback {
width: @input-height-small;
height: @input-height-small;
line-height: @input-height-small;
}
@@ -548,27 +579,29 @@
// Validation states
//
// Reposition the icon because it's now within a grid column and columns have
// `position: relative;` on them. Also accounts for the grid gutter padding.
.has-feedback .form-control-feedback {
- right: (@grid-gutter-width / 2);
+ right: floor((@grid-gutter-width / 2));
}
// Form group sizes
//
// Quick utility class for applying `.input-lg` and `.input-sm` styles to the
// inputs and labels within a `.form-group`.
.form-group-lg {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
+ font-size: @font-size-large;
}
}
}
.form-group-sm {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: (@padding-small-vertical + 1);
+ font-size: @font-size-small;
}
}
}
}