Rev 13695 | Rev 13975 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6283 | obado | 1 | /** themes/_css - forms.css */ |
2 | /** Somes styles designed to display fields in forms, tableless **/ |
||
7242 | obado | 3 | /* Currently used in exam and documents properties **/ |
6283 | obado | 4 | |
7242 | obado | 5 | /*form{ |
7075 | obado | 6 | line-height: 2em; |
7242 | obado | 7 | }*/ |
7075 | obado | 8 | |
9051 | obado | 9 | /* corrects attributes color:inherit from normalize.css */ |
9040 | obado | 10 | input, textarea { |
13330 | obado | 11 | color:black; |
9040 | obado | 12 | } |
9077 | obado | 13 | input[disabled], textarea[disabled] { |
13330 | obado | 14 | color:#444; |
15 | background-color:#DFDFDF; |
||
9077 | obado | 16 | } |
11654 | obado | 17 | |
13692 | obado | 18 | |
19 | /***** Foundation 6 input styles *****/ |
||
20 | |||
21 | input:not([type]), [type="text"], [type="password"], [type="date"], [type="datetime"], |
||
22 | [type="datetime-local"], [type="month"], [type="week"], [type="email"], [type="number"], |
||
23 | [type="search"], [type="tel"], [type="time"], [type="color"], [type="url"], textarea { |
||
24 | border: 1px solid #cacaca; |
||
25 | box-sizing: border-box; |
||
26 | } |
||
27 | |||
28 | /* everything but color */ |
||
29 | input:not([type]), [type="text"], [type="password"], [type="date"], [type="datetime"], |
||
30 | [type="datetime-local"], [type="month"], [type="week"], [type="email"], [type="number"], |
||
31 | [type="search"], [type="tel"], [type="time"], [type="url"], textarea { |
||
32 | padding: .5rem; |
||
33 | } |
||
34 | |||
35 | input:not([type]):focus, [type='text']:focus, [type='password']:focus, |
||
36 | [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus, |
||
37 | [type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus, |
||
38 | [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='url']:focus, |
||
39 | [type='color']:focus, textarea:focus { |
||
40 | outline: none; |
||
41 | border: 1px solid #8a8a8a; |
||
42 | background-color: #fefefe; |
||
43 | box-shadow: 0 0 5px #cacaca; |
||
44 | transition: box-shadow .5s, border-color .25s ease-in-out; |
||
45 | } |
||
46 | |||
47 | |||
48 | |||
11654 | obado | 49 | /* don't glue labels to their associated input */ |
50 | input[type="radio"]+label, input[type="checkbox"]+label{ |
||
13330 | obado | 51 | padding-left: .3em; |
9077 | obado | 52 | } |
9040 | obado | 53 | |
13330 | obado | 54 | fieldset>ul{ |
55 | margin: 0; |
||
56 | padding-left: 1.5em; |
||
57 | } |
||
7242 | obado | 58 | /* this is generaly a fieldset class */ |
59 | .property_fields{ |
||
13330 | obado | 60 | /* Sadly, Safari don't handle flex on fieldsets yet (you have to add a div inside)... |
61 | display:flex; |
||
62 | flex-flow: row wrap;*/ |
||
63 | position: relative; |
||
64 | margin-top:1em; |
||
65 | margin-bottom:1em; |
||
66 | max-width:900px; |
||
67 | padding:.5em 3px; |
||
68 | /*Background-image is here to lighten background color */ |
||
69 | background-image: linear-gradient(to bottom, rgba(255,255,255,0.7) 0%,rgba(255, 255, 255, 0.9) 48%,rgba(255,255,255,0.4) 100%); /* W3C */ |
||
6283 | obado | 70 | } |
11517 | obado | 71 | /* If property_fields is flex, wimscenter must take the full width |
72 | .property_fields .wimscenter{ |
||
13330 | obado | 73 | width:100%; |
11517 | obado | 74 | }*/ |
6283 | obado | 75 | |
7888 | obado | 76 | /*.property_fields .field { |
77 | margin: auto; |
||
78 | }*/ |
||
6283 | obado | 79 | |
9040 | obado | 80 | .property_fields .actions, |
81 | .property_fields .wimsform{ |
||
13330 | obado | 82 | padding:.5em; |
83 | margin-top:.5em; |
||
7519 | obado | 84 | } |
11687 | obado | 85 | .property_fields>fieldset{ |
13330 | obado | 86 | margin-bottom:.5em; |
11687 | obado | 87 | } |
7519 | obado | 88 | |
11654 | obado | 89 | .field.box{ |
13692 | obado | 90 | padding: .4em .4em .8em .4em; /*.4em seems max for Chrome 2-columns layout */ |
13330 | obado | 91 | border:1px solid #CFCFCF; |
92 | /*margin-bottom:1px;*/ |
||
93 | line-height:1.2em; |
||
94 | /* min height lets having an help button right float*/ |
||
95 | min-height:2em; |
||
6283 | obado | 96 | } |
9040 | obado | 97 | .property_fields p{ |
13330 | obado | 98 | padding:0 1em; |
9040 | obado | 99 | } |
6283 | obado | 100 | |
13692 | obado | 101 | /*.box>div, .box>input, .box>textarea, .box>select{ |
13330 | obado | 102 | margin-left:.3em; |
13692 | obado | 103 | }*/ |
6283 | obado | 104 | |
7509 | obado | 105 | .property_fields .halfwidth{ |
13330 | obado | 106 | /*display: inline-block; |
107 | vertical-align: middle;*/ |
||
108 | float:left; |
||
109 | /*min-width: 380px;*/ |
||
13440 | obado | 110 | /*min-height could be suppressed when all browsers will render well "flexbox"*/ |
13330 | obado | 111 | min-height:4em; |
7509 | obado | 112 | } |
6283 | obado | 113 | |
7245 | obado | 114 | .property_fields .field:nth-child(even){ |
115 | background-color: #DFDFDF; |
||
11693 | obado | 116 | background-color: rgba(230,230,230,.4); |
6283 | obado | 117 | } |
118 | |||
7245 | obado | 119 | .property_fields .field:nth-child(odd){ |
120 | background-color: #EFEFEF; |
||
10883 | obado | 121 | background-color: rgba(255,255,255,.8); |
6283 | obado | 122 | } |
7075 | obado | 123 | |
124 | .formHelp{ |
||
13330 | obado | 125 | font-size: 9pt; |
126 | color:#666; |
||
6284 | obado | 127 | } |
7075 | obado | 128 | |
7245 | obado | 129 | .property_fields legend{ |
13330 | obado | 130 | font-size: 1.2em; |
131 | font-weight: bold; |
||
132 | padding: 0 .5em; |
||
133 | margin-left:1em; |
||
134 | border:1px solid #BBB; |
||
135 | border-radius:5px; |
||
7075 | obado | 136 | } |
7509 | obado | 137 | |
11654 | obado | 138 | .field>label{ |
13330 | obado | 139 | font-weight:bold; |
13692 | obado | 140 | font-size: .875rem; |
141 | line-height: 1.8; |
||
13330 | obado | 142 | display:inline-block; |
143 | vertical-align: middle; |
||
7509 | obado | 144 | } |
13692 | obado | 145 | |
10946 | obado | 146 | /*.property_fields .field>label{ |
13330 | obado | 147 | min-width:10em; |
10946 | obado | 148 | }*/ |
7509 | obado | 149 | |
12583 | obado | 150 | .property_fields select,.property_fields textarea{ |
13330 | obado | 151 | vertical-align: middle; |
7539 | obado | 152 | } |
153 | |||
13696 | obado | 154 | .field input[type="text"]:not(.inline), |
155 | .field input[type="password"]:not(.inline), |
||
156 | .field input[type="email"]:not(.inline), |
||
157 | .field input[type="number"]:not(.inline), |
||
158 | .field input[type="url"]:not(.inline), |
||
13695 | obado | 159 | /*.field select,*/ |
12583 | obado | 160 | .field textarea{ |
13692 | obado | 161 | width:100%; |
12583 | obado | 162 | } |
7539 | obado | 163 | |
164 | |||
7971 | obado | 165 | .field input.small_input{ |
13330 | obado | 166 | width:6em; |
167 | min-width:6em; |
||
7971 | obado | 168 | } |
169 | |||
7521 | obado | 170 | input[type="color"]{ |
13330 | obado | 171 | vertical-align: middle; |
172 | /* min size prevents Safari displaying a very small button */ |
||
173 | min-width: 44px; |
||
174 | min-height: 23px; |
||
7521 | obado | 175 | } |
7509 | obado | 176 | |
9040 | obado | 177 | li.wims_formradio{ |
13330 | obado | 178 | display: block; |
9040 | obado | 179 | } |
7517 | bpr | 180 | .wims_formradio label { |
7531 | bpr | 181 | min-width:0; |
182 | font-weight:normal; |
||
7517 | bpr | 183 | } |
7888 | obado | 184 | |
11687 | obado | 185 | /** Styles for HTML 5 inputs (required or typed, like type="number")*/ |
12723 | obado | 186 | input:not([type="submit"]):not([type="button"]), textarea{ |
13330 | obado | 187 | background-repeat: no-repeat; |
188 | /* 92% lets some browsers display control buttons like for the type="number" input */ |
||
189 | background-position-x: 92%; |
||
190 | background-position-y: 3px; |
||
11687 | obado | 191 | } |
11641 | obado | 192 | input:required:not(.noicon), textarea:required:not(.noicon){ |
13330 | obado | 193 | /* The padding is more precise than the 92%, but we apply it only for required inputs */ |
194 | padding-right: 1em; |
||
195 | background-position-x: right; |
||
11517 | obado | 196 | } |
197 | /* invalid required inputs */ |
||
198 | input:invalid, textarea:invalid, .required_invalid_legend { |
||
13330 | obado | 199 | background-image: url("../../../gifs/svg/exclamation_mark_red.svg"); |
200 | background-size: 1em; |
||
201 | box-shadow: 0 0 1px rgba(200, 0, 0, .85); |
||
11517 | obado | 202 | } |
11687 | obado | 203 | /* invalid inputs, with focus */ |
11517 | obado | 204 | input:focus:invalid, textarea:focus:invalid, .required_invalid_focus_legend { |
13330 | obado | 205 | background-image: url("../../../gifs/svg/thumb_down_red.svg"); |
11517 | obado | 206 | } |
11687 | obado | 207 | /* valid required inputs (dont show the green check on all valid, only required ones) */ |
11517 | obado | 208 | input:required:focus:valid, textarea:required:focus:valid, .required_valid_legend { |
13330 | obado | 209 | background-image: url("../../../gifs/svg/yes_check_green.svg"); |
210 | background-size: .9em; |
||
211 | box-shadow: 0 0 1px rgba(0, 200, 0, .85); |
||
11517 | obado | 212 | } |
213 | /* noicon css class disable the required icon */ |
||
11687 | obado | 214 | input.noicon, |
215 | input.noicon:required, |
||
216 | input.noicon:required:focus, |
||
217 | textarea.noicon:required, |
||
218 | textarea.noicon:required:focus{ |
||
13330 | obado | 219 | background-image:none; |
11517 | obado | 220 | } |
7888 | obado | 221 | |
222 | |||
223 | /* Small screens */ |
||
224 | @media only screen and (max-width: 40em) { |
||
13330 | obado | 225 | .property_fields .halfwidth, .halfwidth{ |
226 | width:100%; |
||
227 | display:block; |
||
228 | min-width: 0; |
||
229 | } |
||
230 | /* prevent inputs from being larger than screen*/ |
||
13692 | obado | 231 | /*.box input:not([type="button"]):not([type="color"]),.box select,.box textarea{ |
13330 | obado | 232 | width:75%; |
13692 | obado | 233 | }*/ |
13330 | obado | 234 | .property_fields pre{ |
235 | max-width:33em; |
||
236 | } |
||
7888 | obado | 237 | } /* max-width 640px, mobile-only styles, use when QAing mobile issues */ |
238 | |||
239 | /* Medium screens */ |
||
240 | @media only screen and (min-width: 40.063em) and (max-width: 64em) { |
||
13330 | obado | 241 | .property_fields .halfwidth{ |
242 | min-width: 310px; |
||
243 | } |
||
244 | .property_fields pre{ |
||
245 | max-width:53em; |
||
246 | } |
||
7888 | obado | 247 | } /* min-width 641px and max-width 1024px, use when QAing tablet-only issues */ |
248 | |||
249 | /* Large screens */ |
||
12583 | obado | 250 | @media only screen and (min-width: 64.063em) { |
13330 | obado | 251 | .property_fields pre{ |
252 | max-width:850px; |
||
253 | } |
||
12583 | obado | 254 | } /* min-width 1025px, large screens */ |
7888 | obado | 255 |