aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/stylesheets/less/studip-selection.less
blob: 24044cc811226a81c7cafb0a46621e8f24336da4 (plain)
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
63
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
102
103
104
105
.studip-selection {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    > * {
        flex: 1 0 100%;
    }
    > legend {
        margin-bottom: 0 !important;
    }

    // General list item styles and placeholders
    ul, li {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    li {
        display: inline-block;
        vertical-align: top;
    }

    li:not(.empty-placeholder) {
        color: @base-color;
        cursor: pointer;
        margin: 1px 0;
        padding-right: 0.5em;
    }

    li.empty-placeholder {
        color: fadeout(@text-color, 30%);
        &:not(:only-child) {
            display: none;
        }
    }

    .studip-selection-selectable li.empty-placeholder {
        color: @text-color;
        padding-left: 20px;
        position: relative;

        .icon('before', 'info-circle', 'info');
        &::before {
            position: absolute;
            left: 0;
            top: 3px;
        }
    }

    // Selected and selectable lists
    .studip-selection-image img {
        transition: opacity 300ms;
    }

    .studip-selection-selected .studip-selection-label {
        .icon('before', 'radiobutton-checked', 'clickable');
    }
    .studip-selection-selectable .studip-selection-label {
        .icon('before', 'radiobutton-unchecked', 'clickable');
    }

    .studip-selection-image + .studip-selection-label {
        &::before {
            display: none;
        }
    }

    .studip-selection-selected li:hover {
        .studip-selection-image,
        .studip-selection-label::before {
            .background-icon('remove-circle-full', 'clickable');
        }
    }
    .studip-selection-selectable li:hover {
        .studip-selection-image,
        .studip-selection-label::before {
            .background-icon('add-circle-full', 'clickable');
        }
    }

    .studip-selection-selected,
    .studip-selection-selectable {
        flex: 1 1 300px;
        padding-top: 0;

        h2 {
            margin-top: 0;
        }

        li:hover {
            .studip-selection-image {
                background-position: center;
                background-repeat: no-repeat;
                background-size: contain;
                img {
                    opacity: 0;
                }
            }
            .studip-selection-label {
                color: @active-color;
            }
        }
    }
}