Dotclear

source: admin/style/scss/partials/_forms.scss @ 3711:004095dbea64

Revision 3711:004095dbea64, 5.1 KB checked in by franck <carnet.franck.paul@…>, 7 years ago (diff)

Cope with specialized input fields in admin CSS

Line 
1input[type=text],
2input[type=color],
3input[type=email],
4input[type=url],
5input[type=datetime],
6input[type=date],
7input[type=time],
8input[type=file],
9input[type=number],
10input[type=password],
11input[type=submit],
12input[type=button],
13input[type=reset],
14a.button, button, textarea, select, legend {
15  max-width: 100%;
16}
17input[type=text],
18input[type=color],
19input[type=email],
20input[type=url],
21input[type=datetime],
22input[type=date],
23input[type=time],
24input[type=file],
25input[type=number],
26input[type=password],
27input[type=submit],
28input[type=button],
29input[type=reset],
30a.button, button, textarea, legend {
31  border-radius: 3px;
32}
33form {
34  display: block;
35  margin: 0;
36  padding: 0;
37}
38fieldset {
39  display: block;
40  margin: 1em 0;
41  padding: 1em 0.5em;
42  border-width: 1px 0;
43  border-style: solid;
44  border-color: #ccc;
45  background: #f7f7f7;
46  &:focus-within {
47    background-color: #eee;
48  }
49}
50input[type=text],
51input[type=color],
52input[type=email],
53input[type=url],
54input[type=datetime],
55input[type=date],
56input[type=time],
57input[type=file],
58input[type=number],
59textarea {
60  font-family: $sans-serif-input;
61  font-size: 100%;
62}
63legend {
64  padding: 0.2em 0.6em;
65  border-width: 1px;
66  border-style: solid;
67  border-color: #676e78;
68  background: #fff;
69  margin-bottom: 0.5em;
70}
71label .maximal, textarea.maximal, input.maximal, select.maximal {
72  width: 99%;
73}
74input.invalid, textarea.invalid, select.invalid, input:not([type=file]):invalid:not(:focus) {
75  color: #900;
76  box-shadow: 0 0 0 3px rgba(218, 62, 90, 0.3);
77}
78input.invalid, textarea.invalid, input:not([type=file]):invalid:not(:focus) {
79  border: 1px solid red;
80  background: #FFBABA;
81}
82input[type=text],
83input[type=password],
84input[type=color],
85input[type=email],
86input[type=url],
87input[type=datetime],
88input[type=date],
89input[type=time],
90input[type=file],
91input[type=number],
92textarea, select, input:not([type=file]):invalid, input:not([type=file]):invalid:placeholder-shown {
93  color: #000;
94  box-shadow: 1px 1px 2px #f3f3f3 inset;
95  padding: 3px;
96  vertical-align: top;
97}
98input[type=text],
99input[type=password],
100input[type=color],
101input[type=email],
102input[type=url],
103input[type=datetime],
104input[type=date],
105input[type=time],
106input[type=file],
107input[type=number],
108textarea, input:not([type=file]):invalid, input:not([type=file]):invalid:placeholder-shown {
109  background: #fcfcfc;
110  border-width: 1px;
111  border-style: solid;
112  border-color: #dfdfdf;
113}
114input:focus, textarea:focus {
115  border-color: #9bca1c;
116}
117textarea {
118  padding: 2px 0;
119  &.maximal {
120    resize: vertical;
121  }
122  .area & {
123    display: block;
124    width: 100%;
125    resize: vertical;
126  }
127}
128select {
129  padding: 2px 0;
130  vertical-align: middle;
131}
132@media not all and (min-resolution:.001dpcm) {
133  @supports (-webkit-appearance: none) {
134    /* Safari 10.1+ only (https://browserstrangeness.bitbucket.io/css_hacks.html#webkit) */
135    select {
136      font-size: initial;
137    }
138  }
139}
140select.l10n option {
141  padding-left: 16px;
142}
143option.avail10n {
144  background: transparent url(../images/check-on.png) no-repeat 0 50%;
145}
146input[type=text],
147input[type=color],
148input[type=email],
149input[type=url],
150input[type=datetime],
151input[type=date],
152input[type=time],
153input[type=number],
154input[type=password],
155textarea {
156  margin-right: .3em;
157}
158input[type=checkbox], input[type=radio], input[type=file] {
159  border: none;
160  margin: 0 .33em 0 0;
161  padding: 0;
162  background: transparent;
163}
164input+input[type=checkbox] {
165  // Used for js expand/hide (lists, options, ...)
166  margin-left: .33em;
167}
168a input {
169  // Used for js expand/hide (lists, options, ...)
170  margin-right: .33em;
171}
172input[type=file] {
173  margin-top: .3em;
174  margin-bottom: .3em;
175}
176optgroup {
177  font-weight: bold;
178  font-style: normal;
179}
180option {
181  font-weight: normal;
182}
183label, label span {
184  display: block;
185}
186label.ib, input.ib {
187  display: inline-block;
188}
189label.classic {
190  display: inline;
191}
192label.classic input, label span input, label.classic select, label span select {
193  display: inline;
194}
195label.required {
196  font-weight: bold;
197}
198label.required abbr {
199  color: #900;
200  font-size: 1.3em;
201}
202label.bold {
203  text-transform: uppercase;
204  font-weight: bold;
205  margin-top: 2em;
206}
207label.area, p.area {
208  width: inherit !important;
209}
210p.field {
211  position: relative;
212  label {
213    display: inline-block;
214    width: 14em;
215  }
216  &.wide label {
217    width: 21em;
218  }
219  input, select {
220    display: inline-block;
221  }
222}
223.form-note, .form-stats {
224  font-style: italic;
225  font-weight: normal;
226  color: #676e78;
227}
228p.form-note, p.form-stats {
229  margin-top: -.7em;
230}
231span.form-note, span.form-stats {
232  text-transform: none;
233}
234.missing {
235  background-color: inherit;
236  animation-name: kf-missing;
237  animation-duration: 1s;
238}
239@keyframes kf-missing {
240  0% {
241    background-color: inherit;
242  }
243  50% {
244    background-color: #ffbaba;
245  }
246  100% {
247    background-color: inherit;
248  }
249}
250.focus {
251  background-color: inherit;
252  animation-name: kf-focus;
253  animation-duration: 1s;
254}
255@keyframes kf-focus {
256  0% {
257    background-color: inherit;
258  }
259  50% {
260    background-color: #ccff00;
261  }
262  100% {
263    background-color: inherit;
264  }
265}
266// .more-info Additional information on fieldset, field, … (may be hide from user-prefs)
267.more-info {}
268.no-more-info {
269  display: none;
270}
Note: See TracBrowser for help on using the repository browser.

Sites map