Updated to Drupal 8.5. Core Media not yet in use.
[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: #686868;
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%, 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, 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 /* Filter */
131 ul.tips,
132 div.description,
133 .form-item .description {
134   margin: 0.2em 0 0 0;
135   color: #595959;
136   font-size: 0.95em;
137 }
138 .form-item .description.error {
139   margin-top: 0;
140   color: #a51b00;
141 }
142
143 ul.tips li {
144   margin: 0.25em 0 0.25em 1.5em; /* LTR */
145 }
146 [dir="rtl"] ul.tips li {
147   margin: 0.25em 1.5em 0.25em 0;
148 }
149 .form-type-radio .description,
150 .form-type-checkbox .description {
151   margin-left: 1.5em; /* LTR */
152 }
153 [dir="rtl"] .form-type-radio .description,
154 [dir="rtl"] .form-type-checkbox .description {
155   margin-left: 0;
156   margin-right: 1.5em;
157 }
158 .form-text,
159 .form-textarea {
160   border-radius: 2px;
161   font-size: 1em;
162   line-height: normal;
163 }
164
165 input.form-autocomplete,
166 input.form-text,
167 input.form-tel,
168 input.form-email,
169 input.form-url,
170 input.form-search,
171 input.form-number,
172 input.form-color,
173 input.form-file,
174 input.form-date,
175 input.form-time,
176 textarea.form-textarea {
177   box-sizing: border-box;
178   padding: 0.3em 0.4em 0.3em 0.5em; /* LTR */
179   max-width: 100%;
180   border: 1px solid #b8b8b8;
181   border-top-color: #999;
182   background: #fff;
183   color: #333;
184   border-radius: 2px;
185   background: #fcfcfa;
186   box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.125);
187   font-size: 1em;
188   color: #595959;
189   -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
190   transition: border linear 0.2s, box-shadow linear 0.2s;
191 }
192 [dir="rtl"] textarea.form-textarea {
193   padding: 0.3em 0.5em 0.3em 0.4em;
194 }
195 .form-text:focus,
196 .form-tel:focus,
197 .form-email:focus,
198 .form-url:focus,
199 .form-search:focus,
200 .form-number:focus,
201 .form-color:focus,
202 .form-file:focus,
203 .form-textarea:focus,
204 .form-date:focus,
205 .form-time:focus {
206   border-color: #40b6ff;
207   outline: 0;
208   box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 8px #40b6ff;
209   background-color: #fff;
210 }
211
212 .confirm-parent,
213 .password-parent {
214   overflow: visible;
215   width: auto;
216 }
217
218 .form-item-options-group-info-identifier,
219 .form-item-pass .description {
220   clear: both;
221 }
222
223 /**
224  * Limits extra long instances of select elements to the max width allowed
225  * to avoid breaking layouts.
226  */
227 select {
228   max-width: 100%;
229 }
230
231 /**
232  * Select elements - Webkit only
233  */
234 @media screen and (-webkit-min-device-pixel-ratio: 0) {
235   select {
236     cursor: pointer;
237     -webkit-appearance: none;
238     padding: 1px 1.571em 1px 0.5em; /* LTR */
239     border: 1px solid #a6a6a6;
240     border-radius: 0.143em;
241     background:
242       url(../../../../misc/icons/333333/caret-down.svg) no-repeat 99% 63%,
243       -webkit-linear-gradient(top, #f6f6f3, #e7e7df); /* LTR */
244
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:
258       url(../../../../misc/icons/333333/caret-down.svg),
259       -webkit-linear-gradient(top, #fcfcfa, #e9e9dd);
260     color: #1a1a1a;
261   }
262   select:hover {
263     box-shadow: 0 1px 2px hsla(0, 0%, 0%, 0.125);
264   }
265 }
266
267 /**
268  * Improve spacing of cancel link.
269  */
270 #edit-cancel {
271   margin-left: 10px; /* LTR */
272 }
273 [dir="rtl"] #edit-cancel {
274   margin-left: 0;
275   margin-right: 10px;
276 }
277
278 /**
279  * Improve form element usability on narrow devices.
280  */
281 @media screen and (max-width: 600px) {
282   input.form-autocomplete,
283   input.form-text,
284   input.form-tel,
285   input.form-email,
286   input.form-url,
287   input.form-search,
288   input.form-number,
289   input.form-color,
290   input.form-file,
291   textarea.form-textarea {
292     width: 100%;
293     font-size: 1.2em;
294     line-height: 1.2em;
295   }
296   input.form-number {
297     width: auto;
298   }
299   .form-actions input,
300   .form-wrapper input[type="submit"] {
301     float: none;
302     margin-left: 0;
303     margin-right: 0;
304     margin-top: 10px;
305     padding-bottom: 6px;
306     width: 100%;
307   }
308   .form-actions input:first-child,
309   .form-wrapper input[type="submit"]:first-child {
310     margin-top: 0;
311   }
312   details summary {
313     overflow: hidden;
314     text-overflow: ellipsis;
315     white-space: nowrap;
316     box-sizing: border-box;
317   }
318   .password-strength {
319     width: 100%;
320   }
321   div.form-item div.password-suggestions {
322     float: none;
323   }
324   #dblog-filter-form .form-actions {
325     float: none;
326     padding: 0;
327   }
328   #edit-cancel {
329     display: block;
330     margin: 10px 0 0 0;
331   }
332   select {
333     width: 100%;
334   }
335 }
336
337 /* Exceptions */
338 #diff-inline-form select,
339 div.filter-options select {
340   padding: 0;
341 }