summaryrefslogtreecommitdiff
path: root/bower_components/bootstrap/less/forms.less
diff options
context:
space:
mode:
Diffstat (limited to 'bower_components/bootstrap/less/forms.less')
-rw-r--r--bower_components/bootstrap/less/forms.less69
1 files changed, 44 insertions, 25 deletions
diff --git a/bower_components/bootstrap/less/forms.less b/bower_components/bootstrap/less/forms.less
index 2c5e9bfa..38e4ce6d 100644
--- a/bower_components/bootstrap/less/forms.less
+++ b/bower_components/bootstrap/less/forms.less
@@ -141,7 +141,7 @@ output {
&[disabled],
&[readonly],
fieldset[disabled] & {
- cursor: not-allowed;
+ cursor: @cursor-disabled;
background-color: @input-bg-disabled;
opacity: 1; // iOS fix for unreadable disabled content
}
@@ -183,9 +183,26 @@ input[type="month"] {
&.input-sm {
line-height: @input-height-small;
+ line-height: @line-height-small ~"\0";
}
&.input-lg {
line-height: @input-height-large;
+ line-height: @line-height-large ~"\0";
+ }
+}
+
+// IE 11 hack to reverse the iOS temporal input hack.
+_:-ms-fullscreen, :root input[type="date"],
+_:-ms-fullscreen, :root input[type="time"],
+_:-ms-fullscreen, :root input[type="datetime-local"],
+_:-ms-fullscreen, :root input[type="month"] {
+ line-height: @line-height-base;
+
+ &.input-sm {
+ line-height: @line-height-small;
+ }
+ &.input-lg {
+ line-height: @line-height-large;
}
}
@@ -208,11 +225,11 @@ input[type="month"] {
.checkbox {
position: relative;
display: block;
- min-height: @line-height-computed; // clear the floating input if there is no label text
margin-top: 10px;
margin-bottom: 10px;
label {
+ min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
@@ -258,7 +275,7 @@ input[type="checkbox"] {
&[disabled],
&.disabled,
fieldset[disabled] & {
- cursor: not-allowed;
+ cursor: @cursor-disabled;
}
}
// These classes are used directly on <label>s
@@ -266,7 +283,7 @@ input[type="checkbox"] {
.checkbox-inline {
&.disabled,
fieldset[disabled] & {
- cursor: not-allowed;
+ cursor: @cursor-disabled;
}
}
// These classes are used on elements with <label> descendants
@@ -275,7 +292,7 @@ input[type="checkbox"] {
&.disabled,
fieldset[disabled] & {
label {
- cursor: not-allowed;
+ cursor: @cursor-disabled;
}
}
}
@@ -306,12 +323,14 @@ input[type="checkbox"] {
// Build on `.form-control` with modifier classes to decrease or increase the
// height and font-size of form controls.
-.input-sm {
- .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
+.input-sm,
+.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);
}
-.input-lg {
- .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
+.input-lg,
+.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);
}
@@ -331,7 +350,7 @@ input[type="checkbox"] {
// Feedback icon (requires .glyphicon classes)
.form-control-feedback {
position: absolute;
- top: (@line-height-computed + 5); // Height of the `label` and its margin
+ top: 0;
right: 0;
z-index: 2; // Ensure icon is above input groups
display: block;
@@ -339,6 +358,7 @@ input[type="checkbox"] {
height: @input-height-base;
line-height: @input-height-base;
text-align: center;
+ pointer-events: none;
}
.input-lg + .form-control-feedback {
width: @input-height-large;
@@ -362,10 +382,15 @@ input[type="checkbox"] {
.form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
}
+// Reposition feedback icon if input has visible label above
+.has-feedback label {
-// Reposition feedback icon if label is hidden with "screenreader only" state
-.has-feedback label.sr-only ~ .form-control-feedback {
- top: 0;
+ & ~ .form-control-feedback {
+ top: (@line-height-computed + 5); // Height of the `label` and its margin
+ }
+ &.sr-only ~ .form-control-feedback {
+ top: 0;
+ }
}
@@ -382,7 +407,6 @@ input[type="checkbox"] {
}
-
// Inline forms
//
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
@@ -412,6 +436,11 @@ input[type="checkbox"] {
vertical-align: middle;
}
+ // Make static controls behave like regular ones
+ .form-control-static {
+ display: inline-block;
+ }
+
.input-group {
display: inline-table;
vertical-align: middle;
@@ -453,10 +482,7 @@ input[type="checkbox"] {
margin-left: 0;
}
- // 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.
+ // Re-override the feedback icon.
.has-feedback .form-control-feedback {
top: 0;
}
@@ -509,7 +535,6 @@ input[type="checkbox"] {
// 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 {
- top: 0;
right: (@grid-gutter-width / 2);
}
@@ -523,9 +548,6 @@ input[type="checkbox"] {
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
}
}
- .form-control {
- &:extend(.input-lg);
- }
}
.form-group-sm {
@media (min-width: @screen-sm-min) {
@@ -533,8 +555,5 @@ input[type="checkbox"] {
padding-top: (@padding-small-vertical + 1);
}
}
- .form-control {
- &:extend(.input-sm);
- }
}
}