aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-06-27 18:49:05 -0700
committerMark Otto <[email protected]>2013-06-27 18:49:05 -0700
commit62f76ad33f5a70c21f91e729963e049547ffc391 (patch)
tree3e611f99d09a7f658dc1e529a820aa87f7c4c557 /less/forms.less
parentf64fe29003159669404f8f5a7a20551fec263904 (diff)
parentcb483b67589df7ac3ece33303b8ce944b3ac4b0e (diff)
downloadbootstrap-62f76ad33f5a70c21f91e729963e049547ffc391.tar.xz
bootstrap-62f76ad33f5a70c21f91e729963e049547ffc391.zip
Merge branch '3.0.0-wip' into bs3_remove_icons
Conflicts: docs/components.html
Diffstat (limited to 'less/forms.less')
-rw-r--r--less/forms.less60
1 files changed, 15 insertions, 45 deletions
diff --git a/less/forms.less b/less/forms.less
index 10a315da6..a96849d5f 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -72,6 +72,17 @@ input[type="color"] {
outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
}
+
+ // Disabled and read-only inputs
+ // Note: HTML5 says that inputs under a fieldset > legend:first-child won't be
+ // disabled if the fieldset is disabled. Due to implementation difficulty,
+ // we don't honor that edge case; we style them as disabled anyway.
+ &[disabled],
+ &[readonly],
+ fieldset[disabled] & {
+ cursor: not-allowed;
+ background-color: @input-bg-disabled;
+ }
}
// Reset appearance properties for textual inputs and textarea
@@ -184,7 +195,7 @@ textarea {
// Move the options list down to align with labels
.controls > .radio:first-child,
.controls > .checkbox:first-child {
- padding-top: 5px; // has to be padding because margin collaspes
+ padding-top: 5px; // has to be padding because margin collapses
}
*/
@@ -227,6 +238,7 @@ input[type="search"],
input[type="tel"],
input[type="color"] {
&.input-large {
+ min-height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
@@ -240,35 +252,6 @@ input[type="color"] {
}
-// DISABLED STATE
-// --------------
-
-// Disabled and read-only inputs
-// Note: HTML5 says that inputs under a fieldset > legend:first-child won't be
-// disabled if the fieldset is disabled. Due to implementation difficulty,
-// we don't honor that edge case; we style them as disabled anyway.
-input,
-select,
-textarea {
- &[disabled],
- &[readonly],
- fieldset[disabled] & {
- cursor: not-allowed;
- background-color: @input-bg-disabled;
- }
-}
-// Explicitly reset the colors here
-input[type="radio"],
-input[type="checkbox"] {
- &[disabled],
- &[readonly],
- fieldset[disabled] & {
- background-color: transparent;
- }
-}
-
-
-
// FORM FIELD FEEDBACK STATES
// --------------------------
@@ -286,20 +269,6 @@ input[type="checkbox"] {
.form-field-validation(@state-success-text, @state-success-text, @state-success-bg);
}
-// HTML5 invalid states
-// Shares styles with the .control-group.error above
-input:focus:invalid,
-textarea:focus:invalid,
-select:focus:invalid {
- color: #b94a48;
- border-color: #ee5f5b;
- &:focus {
- border-color: darken(#ee5f5b, 10%);
- @shadow: 0 0 6px lighten(#ee5f5b, 20%);
- .box-shadow(@shadow);
- }
-}
-
@@ -352,6 +321,7 @@ select:focus:invalid {
.input-group-addon,
.input-group-btn {
width: 1%;
+ white-space: nowrap;
vertical-align: middle; // Match the inputs
}
@@ -455,7 +425,7 @@ select:focus:invalid {
}
}
-// Only right aline form labels here when the columns stop stacking
+// Only right align form labels here when the columns stop stacking
@media (min-width: 768px) {
.form-horizontal .control-label {
text-align: right;