Version 1
[yaffs-website] / web / core / themes / seven / css / components / form.css
1 /**
2  * Form elements.
3  */
4 form {
5   margin: 0;
6   padding: 0;
7 }
8 fieldset:not(.fieldgroup) {
9   background-color: #fcfcfa;
10   border-radius: 2px;
11   margin: 1em 0;
12   padding: 30px 18px 18px;
13   min-width: 0;
14   position: relative;
15 }
16 /**
17  * We've temporarily added this Firefox specific rule here to fix fieldset
18  * widths.
19  * @todo remove once this Mozilla bug is fixed.
20  * See https://bugzilla.mozilla.org/show_bug.cgi?id=504622
21  */
22 @-moz-document url-prefix() {
23   fieldset:not(.fieldgroup) {
24     display: table-cell;
25   }
26 }
27 fieldset:not(.fieldgroup) > legend {
28   font-size: 1em;
29   font-weight: bold;
30   letter-spacing: 0.08em;
31   position: absolute;
32   text-transform: uppercase;
33   top: 10px;
34 }
35 .fieldgroup {
36   min-width: 0;
37 }
38 /**
39  * We've temporarily added this Firefox specific rule here to fix fieldset
40  * widths.
41  * @todo remove once this Mozilla bug is fixed.
42  * See https://bugzilla.mozilla.org/show_bug.cgi?id=504622
43  */
44 @-moz-document url-prefix() {
45   .fieldgroup {
46     display: table-cell;
47   }
48 }
49 .form-item {
50   margin: 0.75em 0;
51 }
52 .form-type-checkbox {
53   padding: 0;
54 }
55 label {
56   display: table;
57   margin: 0 0 0.1em;
58   padding: 0;
59   font-weight: bold;
60 }
61 label.error {
62   color: #a51b00;
63 }
64 label[for] {
65   cursor: pointer;
66 }
67 .form-item label.option {
68   text-transform: none;
69 }
70 .form-item label.option input {
71   vertical-align: middle;
72 }
73 .form-disabled label {
74   color: #737373;
75 }
76 .form-disabled input.form-text,
77 .form-disabled input.form-tel,
78 .form-disabled input.form-email,
79 .form-disabled input.form-url,
80 .form-disabled input.form-search,
81 .form-disabled input.form-number,
82 .form-disabled input.form-color,
83 .form-disabled input.form-file,
84 .form-disabled textarea.form-textarea,
85 .form-disabled select.form-select {
86   border-color: #d4d4d4;
87   background-color: hsla(0, 0%, 0%, .08);
88   box-shadow: none;
89 }
90 .form-item input.error,
91 .form-item textarea.error,
92 .form-item select.error {
93   border-width: 1px;
94   border-color: #e62600;
95   background-color: hsla(15, 75%, 97%, 1);
96   box-shadow: inset 0 5px 5px -5px #b8b8b8;
97   color: #a51b00;
98 }
99 .form-item textarea.error + .cke {
100   border-width: 1px;
101   border-color: #e62600;
102 }
103 .form-item input.error:focus,
104 .form-item textarea.error:focus,
105 .form-item select.error:focus {
106   border-color: #e62600;
107   outline: 0;
108   box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 0 8px 1px #e62600;
109   background-color: #fcf4f2;
110 }
111 .form-required:after {
112   background-size: 7px 7px;
113   width: 7px;
114   height: 7px;
115 }
116 .form-item--error-message {
117   margin-top: 0.15em;
118   color: #e32700;
119 }
120 .fieldset-wrapper > .form-item--error-message {
121   margin-top: 0;
122 }
123 .text-format-wrapper .form-item--error-message {
124   border: solid #ccc;
125   border-width: 0 1px;
126   margin: 0;
127   padding: 0.25em 0.666em 0;
128 }
129
130
131 /* Filter */
132 ul.tips,
133 div.description,
134 .form-item .description {
135   margin: 0.2em 0 0 0;
136   color: #595959;
137   font-size: 0.95em;
138 }
139 .form-item .description.error {
140   margin-top: 0;
141   color: #a51b00;
142 }
143
144 ul.tips li {
145   margin: 0.25em 0 0.25em 1.5em; /* LTR */
146 }
147 [dir="rtl"] ul.tips li {
148   margin: 0.25em 1.5em 0.25em 0;
149 }
150 .form-type-radio .description,
151 .form-type-checkbox .description {
152   margin-left: 1.5em; /* LTR */
153 }
154 [dir="rtl"] .form-type-radio .description,
155 [dir="rtl"] .form-type-checkbox .description {
156   margin-left: 0;
157   margin-right: 1.5em;
158 }
159 .form-text,
160 .form-textarea {
161   border-radius: 2px;
162   font-size: 1em;
163   line-height: normal;
164 }
165
166 input.form-autocomplete,
167 input.form-text,
168 input.form-tel,
169 input.form-email,
170 input.form-url,
171 input.form-search,
172 input.form-number,
173 input.form-color,
174 input.form-file,
175 input.form-date,
176 input.form-time,
177 textarea.form-textarea {
178   box-sizing: border-box;
179   padding: .3em .4em .3em .5em; /* LTR */
180   max-width: 100%;
181   border: 1px solid #b8b8b8;
182   border-top-color: #999;
183   background: #fff;
184   color: #333;
185   border-radius: 2px;
186   background: #fcfcfa;
187   box-shadow: inset 0 1px 2px rgba(0, 0, 0, .125);
188   font-size: 1em;
189   color: #595959;
190   -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
191   transition: border linear 0.2s, box-shadow linear 0.2s;
192 }
193 [dir="rtl"] textarea.form-textarea {
194   padding: .3em .5em .3em .4em;
195 }
196 .form-text:focus,
197 .form-tel:focus,
198 .form-email:focus,
199 .form-url:focus,
200 .form-search:focus,
201 .form-number:focus,
202 .form-color:focus,
203 .form-file:focus,
204 .form-textarea:focus,
205 .form-date:focus,
206 .form-time:focus {
207   border-color: #40b6ff;
208   outline: 0;
209   box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 0 8px #40b6ff;
210   background-color: #fff;
211 }
212
213 .confirm-parent,
214 .password-parent {
215   overflow: visible;
216   width: auto;
217 }
218
219 .form-item-options-group-info-identifier,
220 .form-item-pass .description {
221   clear: both;
222 }
223
224 /**
225  * Limits extra long instances of select elements to the max width allowed
226  * to avoid breaking layouts.
227  */
228 select {
229   max-width: 100%;
230 }
231
232 /**
233  * Select elements - Webkit only
234  */
235 @media screen and (-webkit-min-device-pixel-ratio: 0) {
236   select {
237     cursor: pointer;
238     -webkit-appearance: none;
239     padding: 1px 1.571em 1px 0.5em; /* LTR */
240     border: 1px solid #a6a6a6;
241     border-radius: 0.143em;
242     background:
243       url(../../../../misc/icons/333333/caret-down.svg) no-repeat 99% 63%,
244       -webkit-linear-gradient(top, #f6f6f3, #e7e7df); /* LTR */
245     text-shadow: 0 1px hsla(0, 0%, 100%, 0.6);
246     font-size: 0.875rem;
247     -webkit-transition: all 0.1s;
248     transition: all 0.1s;
249     -webkit-font-smoothing: antialiased;
250   }
251   [dir="rtl"] select {
252     padding: 1px 0.714em 1px 1.571em;
253     background-position: 1% 63%, 0 0;
254   }
255   select:focus,
256   select:hover {
257     background-image: url(../../../../misc/icons/333333/caret-down.svg),
258     -webkit-linear-gradient(top, #fcfcfa, #e9e9dd);
259     color: #1a1a1a;
260   }
261   select:hover {
262     box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.125);
263   }
264 }
265
266 /**
267  * Improve spacing of cancel link.
268  */
269 #edit-cancel {
270   margin-left: 10px; /* LTR */
271 }
272 [dir="rtl"] #edit-cancel {
273   margin-left: 0;
274   margin-right: 10px;
275 }
276
277 /**
278  * Improve form element usability on narrow devices.
279  */
280 @media screen and (max-width: 600px) {
281   input.form-autocomplete,
282   input.form-text,
283   input.form-tel,
284   input.form-email,
285   input.form-url,
286   input.form-search,
287   input.form-number,
288   input.form-color,
289   input.form-file,
290   textarea.form-textarea {
291     width: 100%;
292     font-size: 1.2em;
293     line-height: 1.2em;
294   }
295   input.form-number {
296     width: auto;
297   }
298   .form-actions input,
299   .form-wrapper input[type="submit"] {
300     float: none;
301     margin-left: 0;
302     margin-right: 0;
303     margin-top: 10px;
304     padding-bottom: 6px;
305     width: 100%;
306   }
307   .form-actions input:first-child,
308   .form-wrapper input[type="submit"]:first-child {
309     margin-top: 0;
310   }
311   details summary {
312     overflow: hidden;
313     text-overflow: ellipsis;
314     white-space: nowrap;
315     box-sizing: border-box;
316   }
317   .password-strength {
318     width: 100%;
319   }
320   div.form-item div.password-suggestions {
321     float: none;
322   }
323   #dblog-filter-form .form-actions {
324     float: none;
325     padding: 0;
326   }
327   #edit-cancel {
328     display: block;
329     margin: 10px 0 0 0;
330   }
331   select {
332     width: 100%;
333   }
334 }
335
336 /* Exceptions */
337 #diff-inline-form select,
338 div.filter-options select {
339   padding: 0;
340 }