Rev 13696 | Rev 13991 | 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{ |
||
13975 | obado | 60 | /* Sadly, Safari don't handle flex on fieldsets yet (you have to add a div inside)...*/ |
13330 | obado | 61 | display:flex; |
13975 | obado | 62 | flex-flow: row wrap; |
13330 | obado | 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 | } |
13975 | obado | 71 | /* If property_fields is flex, wimscenter must take the full width*/ |
11517 | obado | 72 | .property_fields .wimscenter{ |
13330 | obado | 73 | width:100%; |
13975 | 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; |
||
13975 | obado | 96 | flex-grow: 1; |
6283 | obado | 97 | } |
13975 | obado | 98 | |
99 | .box_title{margin-top:0;} |
||
100 | |||
9040 | obado | 101 | .property_fields p{ |
13330 | obado | 102 | padding:0 1em; |
9040 | obado | 103 | } |
6283 | obado | 104 | |
13692 | obado | 105 | /*.box>div, .box>input, .box>textarea, .box>select{ |
13330 | obado | 106 | margin-left:.3em; |
13692 | obado | 107 | }*/ |
6283 | obado | 108 | |
7509 | obado | 109 | .property_fields .halfwidth{ |
13330 | obado | 110 | /*display: inline-block; |
111 | vertical-align: middle;*/ |
||
112 | float:left; |
||
113 | /*min-width: 380px;*/ |
||
13440 | obado | 114 | /*min-height could be suppressed when all browsers will render well "flexbox"*/ |
13330 | obado | 115 | min-height:4em; |
7509 | obado | 116 | } |
6283 | obado | 117 | |
7245 | obado | 118 | .property_fields .field:nth-child(even){ |
119 | background-color: #DFDFDF; |
||
11693 | obado | 120 | background-color: rgba(230,230,230,.4); |
6283 | obado | 121 | } |
122 | |||
7245 | obado | 123 | .property_fields .field:nth-child(odd){ |
124 | background-color: #EFEFEF; |
||
10883 | obado | 125 | background-color: rgba(255,255,255,.8); |
6283 | obado | 126 | } |
7075 | obado | 127 | |
128 | .formHelp{ |
||
13330 | obado | 129 | font-size: 9pt; |
130 | color:#666; |
||
6284 | obado | 131 | } |
7075 | obado | 132 | |
7245 | obado | 133 | .property_fields legend{ |
13330 | obado | 134 | font-size: 1.2em; |
135 | font-weight: bold; |
||
136 | padding: 0 .5em; |
||
137 | margin-left:1em; |
||
138 | border:1px solid #BBB; |
||
139 | border-radius:5px; |
||
7075 | obado | 140 | } |
7509 | obado | 141 | |
11654 | obado | 142 | .field>label{ |
13330 | obado | 143 | font-weight:bold; |
13692 | obado | 144 | font-size: .875rem; |
145 | line-height: 1.8; |
||
13330 | obado | 146 | display:inline-block; |
147 | vertical-align: middle; |
||
7509 | obado | 148 | } |
13692 | obado | 149 | |
10946 | obado | 150 | /*.property_fields .field>label{ |
13330 | obado | 151 | min-width:10em; |
10946 | obado | 152 | }*/ |
7509 | obado | 153 | |
12583 | obado | 154 | .property_fields select,.property_fields textarea{ |
13330 | obado | 155 | vertical-align: middle; |
7539 | obado | 156 | } |
157 | |||
13696 | obado | 158 | .field input[type="text"]:not(.inline), |
159 | .field input[type="password"]:not(.inline), |
||
160 | .field input[type="email"]:not(.inline), |
||
161 | .field input[type="number"]:not(.inline), |
||
162 | .field input[type="url"]:not(.inline), |
||
13695 | obado | 163 | /*.field select,*/ |
12583 | obado | 164 | .field textarea{ |
13692 | obado | 165 | width:100%; |
12583 | obado | 166 | } |
7539 | obado | 167 | |
168 | |||
7971 | obado | 169 | .field input.small_input{ |
13330 | obado | 170 | width:6em; |
171 | min-width:6em; |
||
7971 | obado | 172 | } |
173 | |||
7521 | obado | 174 | input[type="color"]{ |
13330 | obado | 175 | vertical-align: middle; |
176 | /* min size prevents Safari displaying a very small button */ |
||
177 | min-width: 44px; |
||
178 | min-height: 23px; |
||
7521 | obado | 179 | } |
7509 | obado | 180 | |
9040 | obado | 181 | li.wims_formradio{ |
13330 | obado | 182 | display: block; |
9040 | obado | 183 | } |
7517 | bpr | 184 | .wims_formradio label { |
7531 | bpr | 185 | min-width:0; |
186 | font-weight:normal; |
||
7517 | bpr | 187 | } |
7888 | obado | 188 | |
11687 | obado | 189 | /** Styles for HTML 5 inputs (required or typed, like type="number")*/ |
12723 | obado | 190 | input:not([type="submit"]):not([type="button"]), textarea{ |
13330 | obado | 191 | background-repeat: no-repeat; |
192 | /* 92% lets some browsers display control buttons like for the type="number" input */ |
||
193 | background-position-x: 92%; |
||
194 | background-position-y: 3px; |
||
11687 | obado | 195 | } |
11641 | obado | 196 | input:required:not(.noicon), textarea:required:not(.noicon){ |
13330 | obado | 197 | /* The padding is more precise than the 92%, but we apply it only for required inputs */ |
198 | padding-right: 1em; |
||
199 | background-position-x: right; |
||
11517 | obado | 200 | } |
201 | /* invalid required inputs */ |
||
202 | input:invalid, textarea:invalid, .required_invalid_legend { |
||
13330 | obado | 203 | background-image: url("../../../gifs/svg/exclamation_mark_red.svg"); |
204 | background-size: 1em; |
||
205 | box-shadow: 0 0 1px rgba(200, 0, 0, .85); |
||
11517 | obado | 206 | } |
11687 | obado | 207 | /* invalid inputs, with focus */ |
11517 | obado | 208 | input:focus:invalid, textarea:focus:invalid, .required_invalid_focus_legend { |
13330 | obado | 209 | background-image: url("../../../gifs/svg/thumb_down_red.svg"); |
11517 | obado | 210 | } |
11687 | obado | 211 | /* valid required inputs (dont show the green check on all valid, only required ones) */ |
11517 | obado | 212 | input:required:focus:valid, textarea:required:focus:valid, .required_valid_legend { |
13330 | obado | 213 | background-image: url("../../../gifs/svg/yes_check_green.svg"); |
214 | background-size: .9em; |
||
215 | box-shadow: 0 0 1px rgba(0, 200, 0, .85); |
||
11517 | obado | 216 | } |
217 | /* noicon css class disable the required icon */ |
||
11687 | obado | 218 | input.noicon, |
219 | input.noicon:required, |
||
220 | input.noicon:required:focus, |
||
221 | textarea.noicon:required, |
||
222 | textarea.noicon:required:focus{ |
||
13330 | obado | 223 | background-image:none; |
11517 | obado | 224 | } |
7888 | obado | 225 | |
226 | |||
227 | /* Small screens */ |
||
228 | @media only screen and (max-width: 40em) { |
||
13330 | obado | 229 | .property_fields .halfwidth, .halfwidth{ |
230 | width:100%; |
||
231 | display:block; |
||
232 | min-width: 0; |
||
233 | } |
||
234 | /* prevent inputs from being larger than screen*/ |
||
13692 | obado | 235 | /*.box input:not([type="button"]):not([type="color"]),.box select,.box textarea{ |
13330 | obado | 236 | width:75%; |
13692 | obado | 237 | }*/ |
13330 | obado | 238 | .property_fields pre{ |
239 | max-width:33em; |
||
240 | } |
||
7888 | obado | 241 | } /* max-width 640px, mobile-only styles, use when QAing mobile issues */ |
242 | |||
243 | /* Medium screens */ |
||
244 | @media only screen and (min-width: 40.063em) and (max-width: 64em) { |
||
13330 | obado | 245 | .property_fields .halfwidth{ |
246 | min-width: 310px; |
||
247 | } |
||
248 | .property_fields pre{ |
||
249 | max-width:53em; |
||
250 | } |
||
7888 | obado | 251 | } /* min-width 641px and max-width 1024px, use when QAing tablet-only issues */ |
252 | |||
253 | /* Large screens */ |
||
12583 | obado | 254 | @media only screen and (min-width: 64.063em) { |
13330 | obado | 255 | .property_fields pre{ |
256 | max-width:850px; |
||
257 | } |
||
12583 | obado | 258 | } /* min-width 1025px, large screens */ |
7888 | obado | 259 |