Subversion Repositories wimsdev

Rev

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