annotate static/bootstrap/less/forms.less @ 74:3c8e07af93c7

Added FontAwesome icons.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 27 Feb 2013 22:02:02 -0800
parents 130eccd396d8
children a5a3d454eac9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 //
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2 // Forms
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 // --------------------------------------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 // GENERAL STYLES
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 // --------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 // Make all forms have space below them
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10 form {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11 margin: 0 0 @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14 fieldset {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 padding: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 margin: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17 border: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 // Groups of fields with labels on top (legends)
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21 legend {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
22 display: block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
23 width: 100%;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
24 padding: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
25 margin-bottom: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26 font-size: @baseFontSize * 1.5;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27 line-height: @baseLineHeight * 2;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
28 color: @grayDark;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
29 border: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
30 border-bottom: 1px solid #e5e5e5;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
31
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32 // Small
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
33 small {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
34 font-size: @baseLineHeight * .75;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
35 color: @grayLight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
36 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
37 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
38
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
39 // Set font for forms
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
40 label,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
42 button,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
44 textarea {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
45 #font > .shorthand(@baseFontSize,normal,@baseLineHeight); // Set size, weight, line-height here
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
46 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
47 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
48 button,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
49 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
50 textarea {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
51 font-family: @baseFontFamily; // And only set font-family here for those that need it (note the missing label element)
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
52 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
53
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
54 // Identify controls by their labels
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
55 label {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
56 display: block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
57 margin-bottom: 5px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
58 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
59
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
60 // Form controls
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
61 // -------------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
62
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
63 // Shared size and type resets
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
64 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
65 textarea,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
66 input[type="text"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
67 input[type="password"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
68 input[type="datetime"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
69 input[type="datetime-local"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
70 input[type="date"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
71 input[type="month"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
72 input[type="time"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
73 input[type="week"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
74 input[type="number"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
75 input[type="email"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
76 input[type="url"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
77 input[type="search"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
78 input[type="tel"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
79 input[type="color"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
80 .uneditable-input {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
81 display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
82 height: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
83 padding: 4px 6px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
84 margin-bottom: @baseLineHeight / 2;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
85 font-size: @baseFontSize;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
86 line-height: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
87 color: @gray;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
88 .border-radius(@inputBorderRadius);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
89 vertical-align: middle;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
90 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
91
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
92 // Reset appearance properties for textual inputs and textarea
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
93 // Declare width for legacy (can't be on input[type=*] selectors or it's too specific)
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
94 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
95 textarea,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
96 .uneditable-input {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
97 width: 206px; // plus 12px padding and 2px border
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
98 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
99 // Reset height since textareas have rows
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
100 textarea {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
101 height: auto;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
102 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
103 // Everything else
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
104 textarea,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
105 input[type="text"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
106 input[type="password"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
107 input[type="datetime"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
108 input[type="datetime-local"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
109 input[type="date"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
110 input[type="month"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
111 input[type="time"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
112 input[type="week"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
113 input[type="number"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
114 input[type="email"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
115 input[type="url"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
116 input[type="search"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
117 input[type="tel"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
118 input[type="color"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
119 .uneditable-input {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
120 background-color: @inputBackground;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
121 border: 1px solid @inputBorder;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
122 .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
123 .transition(~"border linear .2s, box-shadow linear .2s");
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
124
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
125 // Focus state
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
126 &:focus {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
127 border-color: rgba(82,168,236,.8);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
128 outline: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
129 outline: thin dotted \9; /* IE6-9 */
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
130 .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
131 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
132 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
133
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
134 // Position radios and checkboxes better
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
135 input[type="radio"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
136 input[type="checkbox"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
137 margin: 4px 0 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
138 *margin-top: 0; /* IE7 */
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
139 margin-top: 1px \9; /* IE8-9 */
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
140 line-height: normal;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
141 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
142
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
143 // Reset width of input images, buttons, radios, checkboxes
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
144 input[type="file"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
145 input[type="image"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
146 input[type="submit"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
147 input[type="reset"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
148 input[type="button"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
149 input[type="radio"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
150 input[type="checkbox"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
151 width: auto; // Override of generic input selector
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
152 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
153
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
154 // Set the height of select and file controls to match text inputs
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
155 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
156 input[type="file"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
157 height: @inputHeight; /* In IE7, the height of the select element cannot be changed by height, only font-size */
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
158 *margin-top: 4px; /* For IE7, add top margin to align select with labels */
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
159 line-height: @inputHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
160 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
161
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
162 // Make select elements obey height by applying a border
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
163 select {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
164 width: 220px; // default input width + 10px of padding that doesn't get applied
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
165 border: 1px solid @inputBorder;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
166 background-color: @inputBackground; // Chrome on Linux and Mobile Safari need background-color
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
167 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
168
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
169 // Make multiple select elements height not fixed
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
170 select[multiple],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
171 select[size] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
172 height: auto;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
173 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
174
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
175 // Focus for select, file, radio, and checkbox
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
176 select:focus,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
177 input[type="file"]:focus,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
178 input[type="radio"]:focus,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
179 input[type="checkbox"]:focus {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
180 .tab-focus();
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
181 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
182
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
183
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
184 // Uneditable inputs
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
185 // -------------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
186
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
187 // Make uneditable inputs look inactive
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
188 .uneditable-input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
189 .uneditable-textarea {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
190 color: @grayLight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
191 background-color: darken(@inputBackground, 1%);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
192 border-color: @inputBorder;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
193 .box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
194 cursor: not-allowed;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
195 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
196
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
197 // For text that needs to appear as an input but should not be an input
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
198 .uneditable-input {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
199 overflow: hidden; // prevent text from wrapping, but still cut it off like an input does
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
200 white-space: nowrap;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
201 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
202
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
203 // Make uneditable textareas behave like a textarea
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
204 .uneditable-textarea {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
205 width: auto;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
206 height: auto;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
207 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
208
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
209
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
210 // Placeholder
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
211 // -------------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
212
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
213 // Placeholder text gets special styles because when browsers invalidate entire lines if it doesn't understand a selector
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
214 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
215 textarea {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
216 .placeholder();
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
217 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
218
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
219
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
220 // CHECKBOXES & RADIOS
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
221 // -------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
222
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
223 // Indent the labels to position radios/checkboxes as hanging
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
224 .radio,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
225 .checkbox {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
226 min-height: @baseLineHeight; // clear the floating input if there is no label text
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
227 padding-left: 20px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
228 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
229 .radio input[type="radio"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
230 .checkbox input[type="checkbox"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
231 float: left;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
232 margin-left: -20px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
233 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
234
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
235 // Move the options list down to align with labels
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
236 .controls > .radio:first-child,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
237 .controls > .checkbox:first-child {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
238 padding-top: 5px; // has to be padding because margin collaspes
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
239 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
240
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
241 // Radios and checkboxes on same line
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
242 // TODO v3: Convert .inline to .control-inline
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
243 .radio.inline,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
244 .checkbox.inline {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
245 display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
246 padding-top: 5px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
247 margin-bottom: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
248 vertical-align: middle;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
249 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
250 .radio.inline + .radio.inline,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
251 .checkbox.inline + .checkbox.inline {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
252 margin-left: 10px; // space out consecutive inline controls
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
253 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
254
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
255
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
256
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
257 // INPUT SIZES
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
258 // -----------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
259
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
260 // General classes for quick sizes
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
261 .input-mini { width: 60px; }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
262 .input-small { width: 90px; }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
263 .input-medium { width: 150px; }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
264 .input-large { width: 210px; }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
265 .input-xlarge { width: 270px; }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
266 .input-xxlarge { width: 530px; }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
267
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
268 // Grid style input sizes
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
269 input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
270 select[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
271 textarea[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
272 .uneditable-input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
273 // Redeclare since the fluid row class is more specific
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
274 .row-fluid input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
275 .row-fluid select[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
276 .row-fluid textarea[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
277 .row-fluid .uneditable-input[class*="span"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
278 float: none;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
279 margin-left: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
280 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
281 // Ensure input-prepend/append never wraps
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
282 .input-append input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
283 .input-append .uneditable-input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
284 .input-prepend input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
285 .input-prepend .uneditable-input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
286 .row-fluid input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
287 .row-fluid select[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
288 .row-fluid textarea[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
289 .row-fluid .uneditable-input[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
290 .row-fluid .input-prepend [class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
291 .row-fluid .input-append [class*="span"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
292 display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
293 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
294
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
295
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
296
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
297 // GRID SIZING FOR INPUTS
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
298 // ----------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
299
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
300 // Grid sizes
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
301 #grid > .input(@gridColumnWidth, @gridGutterWidth);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
302
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
303 // Control row for multiple inputs per line
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
304 .controls-row {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
305 .clearfix(); // Clear the float from controls
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
306 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
307
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
308 // Float to collapse white-space for proper grid alignment
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
309 .controls-row [class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
310 // Redeclare the fluid grid collapse since we undo the float for inputs
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
311 .row-fluid .controls-row [class*="span"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
312 float: left;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
313 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
314 // Explicity set top padding on all checkboxes/radios, not just first-child
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
315 .controls-row .checkbox[class*="span"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
316 .controls-row .radio[class*="span"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
317 padding-top: 5px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
318 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
319
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
320
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
321
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
322
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
323 // DISABLED STATE
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
324 // --------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
325
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
326 // Disabled and read-only inputs
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
327 input[disabled],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
328 select[disabled],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
329 textarea[disabled],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
330 input[readonly],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
331 select[readonly],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
332 textarea[readonly] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
333 cursor: not-allowed;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
334 background-color: @inputDisabledBackground;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
335 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
336 // Explicitly reset the colors here
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
337 input[type="radio"][disabled],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
338 input[type="checkbox"][disabled],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
339 input[type="radio"][readonly],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
340 input[type="checkbox"][readonly] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
341 background-color: transparent;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
342 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
343
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
344
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
345
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
346
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
347 // FORM FIELD FEEDBACK STATES
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
348 // --------------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
349
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
350 // Warning
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
351 .control-group.warning {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
352 .formFieldState(@warningText, @warningText, @warningBackground);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
353 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
354 // Error
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
355 .control-group.error {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
356 .formFieldState(@errorText, @errorText, @errorBackground);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
357 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
358 // Success
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
359 .control-group.success {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
360 .formFieldState(@successText, @successText, @successBackground);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
361 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
362 // Success
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
363 .control-group.info {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
364 .formFieldState(@infoText, @infoText, @infoBackground);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
365 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
366
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
367 // HTML5 invalid states
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
368 // Shares styles with the .control-group.error above
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
369 input:focus:invalid,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
370 textarea:focus:invalid,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
371 select:focus:invalid {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
372 color: #b94a48;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
373 border-color: #ee5f5b;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
374 &:focus {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
375 border-color: darken(#ee5f5b, 10%);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
376 @shadow: 0 0 6px lighten(#ee5f5b, 20%);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
377 .box-shadow(@shadow);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
378 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
379 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
380
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
381
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
382
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
383 // FORM ACTIONS
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
384 // ------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
385
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
386 .form-actions {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
387 padding: (@baseLineHeight - 1) 20px @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
388 margin-top: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
389 margin-bottom: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
390 background-color: @formActionsBackground;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
391 border-top: 1px solid #e5e5e5;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
392 .clearfix(); // Adding clearfix to allow for .pull-right button containers
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
393 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
394
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
395
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
396
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
397 // HELP TEXT
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
398 // ---------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
399
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
400 .help-block,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
401 .help-inline {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
402 color: lighten(@textColor, 15%); // lighten the text some for contrast
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
403 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
404
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
405 .help-block {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
406 display: block; // account for any element using help-block
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
407 margin-bottom: @baseLineHeight / 2;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
408 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
409
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
410 .help-inline {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
411 display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
412 .ie7-inline-block();
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
413 vertical-align: middle;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
414 padding-left: 5px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
415 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
416
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
417
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
418
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
419 // INPUT GROUPS
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
420 // ------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
421
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
422 // Allow us to put symbols and text within the input field for a cleaner look
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
423 .input-append,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
424 .input-prepend {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
425 margin-bottom: 5px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
426 font-size: 0; // white space collapse hack
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
427 white-space: nowrap; // Prevent span and input from separating
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
428
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
429 // Reset the white space collapse hack
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
430 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
431 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
432 .uneditable-input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
433 .dropdown-menu {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
434 font-size: @baseFontSize;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
435 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
436
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
437 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
438 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
439 .uneditable-input {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
440 position: relative; // placed here by default so that on :focus we can place the input above the .add-on for full border and box-shadow goodness
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
441 margin-bottom: 0; // prevent bottom margin from screwing up alignment in stacked forms
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
442 *margin-left: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
443 vertical-align: top;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
444 .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
445 // Make input on top when focused so blue border and shadow always show
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
446 &:focus {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
447 z-index: 2;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
448 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
449 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
450 .add-on {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
451 display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
452 width: auto;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
453 height: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
454 min-width: 16px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
455 padding: 4px 5px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
456 font-size: @baseFontSize;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
457 font-weight: normal;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
458 line-height: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
459 text-align: center;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
460 text-shadow: 0 1px 0 @white;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
461 background-color: @grayLighter;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
462 border: 1px solid #ccc;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
463 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
464 .add-on,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
465 .btn,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
466 .btn-group > .dropdown-toggle {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
467 vertical-align: top;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
468 .border-radius(0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
469 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
470 .active {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
471 background-color: lighten(@green, 30);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
472 border-color: @green;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
473 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
474 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
475
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
476 .input-prepend {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
477 .add-on,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
478 .btn {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
479 margin-right: -1px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
480 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
481 .add-on:first-child,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
482 .btn:first-child {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
483 // FYI, `.btn:first-child` accounts for a button group that's prepended
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
484 .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
485 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
486 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
487
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
488 .input-append {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
489 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
490 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
491 .uneditable-input {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
492 .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
493 + .btn-group .btn:last-child {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
494 .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
495 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
496 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
497 .add-on,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
498 .btn,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
499 .btn-group {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
500 margin-left: -1px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
501 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
502 .add-on:last-child,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
503 .btn:last-child,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
504 .btn-group:last-child > .dropdown-toggle {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
505 .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
506 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
507 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
508
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
509 // Remove all border-radius for inputs with both prepend and append
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
510 .input-prepend.input-append {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
511 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
512 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
513 .uneditable-input {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
514 .border-radius(0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
515 + .btn-group .btn {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
516 .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
517 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
518 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
519 .add-on:first-child,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
520 .btn:first-child {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
521 margin-right: -1px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
522 .border-radius(@inputBorderRadius 0 0 @inputBorderRadius);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
523 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
524 .add-on:last-child,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
525 .btn:last-child {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
526 margin-left: -1px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
527 .border-radius(0 @inputBorderRadius @inputBorderRadius 0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
528 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
529 .btn-group:first-child {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
530 margin-left: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
531 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
532 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
533
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
534
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
535
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
536
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
537 // SEARCH FORM
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
538 // -----------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
539
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
540 input.search-query {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
541 padding-right: 14px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
542 padding-right: 4px \9;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
543 padding-left: 14px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
544 padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
545 margin-bottom: 0; // Remove the default margin on all inputs
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
546 .border-radius(15px);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
547 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
548
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
549 /* Allow for input prepend/append in search forms */
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
550 .form-search .input-append .search-query,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
551 .form-search .input-prepend .search-query {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
552 .border-radius(0); // Override due to specificity
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
553 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
554 .form-search .input-append .search-query {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
555 .border-radius(14px 0 0 14px);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
556 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
557 .form-search .input-append .btn {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
558 .border-radius(0 14px 14px 0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
559 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
560 .form-search .input-prepend .search-query {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
561 .border-radius(0 14px 14px 0);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
562 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
563 .form-search .input-prepend .btn {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
564 .border-radius(14px 0 0 14px);
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
565 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
566
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
567
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
568
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
569
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
570 // HORIZONTAL & VERTICAL FORMS
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
571 // ---------------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
572
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
573 // Common properties
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
574 // -----------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
575
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
576 .form-search,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
577 .form-inline,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
578 .form-horizontal {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
579 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
580 textarea,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
581 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
582 .help-inline,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
583 .uneditable-input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
584 .input-prepend,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
585 .input-append {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
586 display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
587 .ie7-inline-block();
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
588 margin-bottom: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
589 vertical-align: middle;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
590 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
591 // Re-hide hidden elements due to specifity
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
592 .hide {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
593 display: none;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
594 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
595 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
596 .form-search label,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
597 .form-inline label,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
598 .form-search .btn-group,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
599 .form-inline .btn-group {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
600 display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
601 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
602 // Remove margin for input-prepend/-append
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
603 .form-search .input-append,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
604 .form-inline .input-append,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
605 .form-search .input-prepend,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
606 .form-inline .input-prepend {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
607 margin-bottom: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
608 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
609 // Inline checkbox/radio labels (remove padding on left)
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
610 .form-search .radio,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
611 .form-search .checkbox,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
612 .form-inline .radio,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
613 .form-inline .checkbox {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
614 padding-left: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
615 margin-bottom: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
616 vertical-align: middle;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
617 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
618 // Remove float and margin, set to inline-block
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
619 .form-search .radio input[type="radio"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
620 .form-search .checkbox input[type="checkbox"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
621 .form-inline .radio input[type="radio"],
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
622 .form-inline .checkbox input[type="checkbox"] {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
623 float: left;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
624 margin-right: 3px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
625 margin-left: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
626 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
627
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
628
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
629 // Margin to space out fieldsets
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
630 .control-group {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
631 margin-bottom: @baseLineHeight / 2;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
632 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
633
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
634 // Legend collapses margin, so next element is responsible for spacing
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
635 legend + .control-group {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
636 margin-top: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
637 -webkit-margin-top-collapse: separate;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
638 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
639
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
640 // Horizontal-specific styles
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
641 // --------------------------
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
642
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
643 .form-horizontal {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
644 // Increase spacing between groups
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
645 .control-group {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
646 margin-bottom: @baseLineHeight;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
647 .clearfix();
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
648 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
649 // Float the labels left
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
650 .control-label {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
651 float: left;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
652 width: @horizontalComponentOffset - 20;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
653 padding-top: 5px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
654 text-align: right;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
655 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
656 // Move over all input controls and content
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
657 .controls {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
658 // Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
659 // don't inherit the margin of the parent, in this case .controls
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
660 *display: inline-block;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
661 *padding-left: 20px;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
662 margin-left: @horizontalComponentOffset;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
663 *margin-left: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
664 &:first-child {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
665 *padding-left: @horizontalComponentOffset;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
666 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
667 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
668 // Remove bottom margin on block level help text since that's accounted for on .control-group
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
669 .help-block {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
670 margin-bottom: 0;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
671 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
672 // And apply it only to .help-block instances that follow a form control
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
673 input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
674 select,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
675 textarea,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
676 .uneditable-input,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
677 .input-prepend,
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
678 .input-append {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
679 + .help-block {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
680 margin-top: @baseLineHeight / 2;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
681 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
682 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
683 // Move over buttons in .form-actions to align with .controls
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
684 .form-actions {
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
685 padding-left: @horizontalComponentOffset;
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
686 }
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
687 }