1 // Form validation states
3 // Used in forms.less to generate the form validation CSS for warnings, errors,
6 .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
7 // Color the label and help text
17 &.checkbox-inline label {
20 // Set the border and box shadow on specific inputs to match
22 border-color: @border-color;
23 .box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075)); // Redeclare so transitions work
25 border-color: darken(@border-color, 10%);
26 @shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten(@border-color, 20%);
30 // Set validation states also for addons
33 border-color: @border-color;
34 background-color: @background-color;
36 // Optional feedback icon
37 .form-control-feedback {
42 // Form control focus state
44 // Generate a customized focus state and for any input with the specified color,
45 // which defaults to the `@input-border-focus` variable.
47 // We highly encourage you to not customize the default value, but instead use
48 // this to tweak colors on an as-needed basis. This aesthetic change is based on
49 // WebKit's default styles, but applicable to a wider range of browsers. Its
50 // usability and accessibility should be taken into account with any change.
52 // Example usage: change the default blue border and shadow to white for better
53 // contrast against a dark gray background.
54 .form-control-focus(@color: @input-border-focus) {
55 @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
59 .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
63 // Form control sizing
65 // Relative text size, padding, and border-radii changes for form controls. For
66 // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
67 // element gets special love because it's special, and that's a fact!
68 .input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
69 height: @input-height;
70 padding: @padding-vertical @padding-horizontal;
71 font-size: @font-size;
72 line-height: @line-height;
73 border-radius: @border-radius;
76 height: @input-height;
77 line-height: @input-height;