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