_main_form.scss 8.4 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// Disable ms-clear pseudo-element globally to avoid confusion with the
// existing clearable integration in TYPO3
//
// https://msdn.microsoft.com/en-us/library/windows/apps/hh465740.aspx
//
*::-ms-clear {
    display: none;
}

//
// Form
//
#typo3-docbody form {
    margin-bottom: 1.25em;
}

//
// Go back A-tags
//
a.typo3-goBack {
    font-weight: bold;

    img {
        margin-right: 5px;
        vertical-align: middle;
    }
}

span.typo3-moduleHeader img {
    margin-right: 4px;
    vertical-align: middle;
}

//
// Form control state additions
//
.has-change {
    @include form-control-validation($state-info-text, $state-info-text, $state-info-bg);

    .thumbnail-status {
        border: 1px solid $state-info-text;
    }
    // A loading order issue prevents .has-change to be overridden with .has-error
    // this is a workaround needs to be cleaned up in a less file restructuring
    &.has-error {
        @extend .has-error;
    }
}

//
// Input group additions
//
.input-group-icon {
    vertical-align: middle;

    img {
        max-height: 18px;
    }
}

.input-group-addon {
63
    min-width: 2.5rem;
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
}

//
// IE: ensure DatePicker is opened on button click
//
label {
    .icon {
        img {
            pointer-events: none;
        }
    }
}

//
// Form control additions
//
.form-control {
    min-width: 120px;
}

.form-control-adapt {
    width: auto;
    max-width: 100%;
}

.form-control-wrap {
    margin: 9px 0;
}

.form-control-holder {
    position: relative;
}

.row {
    > .form-group {
        > .form-control-wrap {
            margin-bottom: 0;
        }
102
103
    }
}
104

105
106
107
.form-group {
    .t3js-formengine-field-item {
        position: relative;
108

109
110
111
112
        > .t3js-charcounter {
            left: 0;
            position: absolute;
            top: 100%;
113
        }
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
    }
}

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
    color: $input-color-disabled;
}

//
// Form control icon
//
.form-control-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translate(0, -50%);
    z-index: 1;
132
    pointer-events: none;
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

    + .form-control,
    + .form-control-clearable .form-control {
        padding-left: 3.25em;
    }
}

//
// Form group validation states
//
.form-group.has-error {
    label:before {
        font-family: FontAwesome;
        font-size: 12px;
        text-align: center;
        content: $fa-var-exclamation-circle;
149
        color: $danger;
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
        display: inline-block;
    }

    .btn-toolbar {
        label:before {
            font-family: inherit;
            font-size: inherit;
            margin-right: inherit;
            text-align: inherit;
            content: '';
            color: inherit;
            display: block;
        }
    }

    .input-group-btn {
        label {
167
            border-color: $danger;
168
169

            .t3-icon {
170
                color: $danger;
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
            }
        }

        label:before {
            font-family: inherit;
            font-size: inherit;
            margin-right: inherit;
            text-align: inherit;
            content: '';
            color: inherit;
            display: block;
        }
    }
}

//
// Select
//
select {
190
    &.form-select {
191
        &[multiple],
192
        &[size]:not([size="1"]) {
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
            min-height: 156px;
        }

        > optgroup {
            margin-top: 9px;

            &:first-child {
                margin-top: 0;
            }
        }

        option {
            padding-top: 2px;
            padding-bottom: 2px;
        }
    }

    &.icon-select {
        option {
            padding-left: 22px;
        }
    }
}

//
// Styles for the "clearable" jquery plugin.
//
.form-control-clearable {
    position: relative;
222
223
224
    border: 0;
    padding: 0;
    height: 100%;
225
226
227
228
229
230

    .form-control {
        padding-right: 2.3em;
    }

    .close {
231
232
        border: none;
        background-color: transparent;
233
        position: absolute;
234
        height: 16px;
235
236
237
        z-index: 3;
        top: 50%;
        right: 0.5em;
238
        transform: translate(0, -50%);
239
240
241
242
243
        opacity: 0.2;

        &:hover {
            opacity: 0.5;
        }
244

245
246
        .icon {
            vertical-align: 0;
247
248
249
        }
    }

250
251
252
    &:focus {
        box-shadow: none;
        border-color: inherit;
253
254
255
    }
}

256
.form-inline {
257
    .form-control-clearable {
258
        display: inline-block;
259
260
261
262
263
264
265
266
    }
}

//
// Styles for the "capslock" jquery plugin.
//
.form-notice-capslock {
    position: absolute;
267
    right: 25px;
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
    top: 50%;
    margin-top: -10px;
    height: 20px;
    width: 20px;
    padding: 3px;
    z-index: 10;
    background-color: #fff;

    > img {
        display: block;
        opacity: 0.5;
    }
}

//
// Form Inline adjustments
//
.form-inline-spaced {
    margin: 0 -0.5em $line-height-computed;

    .form-group {
        margin: 0.5em 0.5em 0;

        label {
            margin-right: 0.5em;
        }
    }
}

//
// Form group additions
//
.form-group-dashed {
    & + .form-group-dashed {
        padding-top: 15px;
        border-top: 1px dashed #ccc;
    }
}

//
// Form Sections
//
.form-section {
    border: 1px solid #ccc;
    background-color: #fafafa;
    padding: 15px 12px 3px;

    & + .form-section {
        margin-top: -1px;
    }
}

.tab-pane {
    > .form-section:first-child {
        border-top: none;
    }
}

.form-section-headline {
    margin-top: 0;
    margin-bottom: 10px;
}

//
// Form Wizards
//
.form-wizards-wrap {
    display: table;
    width: 100%;

    > .form-wizards-element {
        display: table-cell;
        width: 100%;
341
342
343
344
345

        .col-icon img {
            max-width: 2em;
            max-height: 2em;
        }
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
    }

    > .form-wizards-items-top {
        display: table-row;
    }

    > .form-wizards-items-aside {
        display: table-cell;
        vertical-align: top;
        padding-left: 5px;
        white-space: nowrap;
    }

    > .form-wizards-items-bottom {
        display: table-row;
361
362
363
364
365

        .tablelist-item-nolink {
            padding: 6px;
            display: inline-block;
        }
366
367
368
369
370
371
372
373
374
375
376
    }

    > .form-wizards-items-bottom:first-child {
        margin-top: 4px;
    }
}

//
// Form Irre
//
.form-irre-header {
377
378
    display: flex;
    align-items: center;
379
380
381
382
383
384
385
386
387
388
389
    margin: -5px;

    @include user-select(none);
}

.form-irre-header-cell {
    vertical-align: middle;
    white-space: nowrap;
    padding: 5px;
}

390
391
392
393
394
395
396
397
398
399
400
401
.form-irre-header-button {
    display: flex;
    text-align: left;
    align-items: center;
    align-self: stretch;
    background: transparent;
    border: 0;
    width: 100%;
    margin-left: -15px;
    padding-left: 20px;
}

402
403
404
405
.form-irre-header-body {
    width: 100%;
    font-weight: normal;
    white-space: normal;
406
    padding-left: 5px;
407
408
409
410
411
412
413
414
415
416
417
418

    dl {
        @extend .dl-horizontal;

        margin-bottom: 0;
    }
}

.form-irre-header-icon {
    padding-right: 0;
}

419
420
421
422
.form-irre-header-thumbnail {
    padding-right: 5px;
}

423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
.form-irre-header-control {
    cursor: auto;

    .btn-group > .btn {
        float: none;
    }
}

//
// Form Multi Group
//
.form-multigroup-wrap {
    width: 100%;
    display: table;

    .form-multigroup-item {
        display: table-cell;
        width: 50%;
        vertical-align: top;

        + .form-multigroup-item {
            padding-left: 5px;
        }
    }

    .form-multigroup-item-wizard {
        margin-bottom: 5px;

451
452
        + select.form-select[multiple],
        + select.form-select[size] {
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
            min-height: 125px;
        }
    }

    .form-wizards-wrap {
        width: 100%;
    }
}

//
// Radio & Checkbox
//
.radio-row,
.checkbox-row {
    margin-top: 10px;
    margin-bottom: 5px;
}

.radio-column,
.checkbox-column {
    margin-bottom: 5px;

475
    > .form-check-input,
476
477
478
479
480
481
482
483
    > .radio,
    > .checkbox {
        margin: 0;
    }
}

.radio-inline,
.checkbox-inline {
484
    &.form-check-input,
485
486
487
488
489
490
491
492
493
    &.radio,
    &.checkbox {
        display: block;
        margin-left: 0;
        margin-right: 10px;
        margin-bottom: 10px;
        padding: 0;

        @media (max-width: $screen-xs-max) {
494
            & + .form-check-in,
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
            & + .radio,
            & + .checkbox {
                margin-top: -5px;
            }
        }

        @media (min-width: $screen-sm-min) {
            display: inline-block;
            margin-top: 10px;

            label {
                white-space: nowrap;
            }
        }
    }
}

//
// Autoresize for Textareas
//
// no manual resizing for textareas (works on non-IE browser only anyways)
// as it is handled by JS: "autosize"
//
textarea {
    &.formengine-textarea {
        resize: none;
    }
}