aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/sass/_multiselect.scss
blob: 6760b2282703f9548d5f0981b667cf3e4f107acc (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
.multi-select-container {
    position: relative;
}

.multi-select-menu {
    position: absolute;
    left: 0;
    top: 0.8em;
    z-index: 1;
    float: left;
    min-width: 100%;
    background: #fff;
    margin: 1em 0;
    padding: 0.4em 0;
    border: 1px solid #aaa;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: none;

    label {
        display: block;
        font-size: 0.875em;
        padding: 0.3em 1em 0.3em 30px;
        white-space: nowrap;
    }

    input {
        position: absolute;
        margin-top: 0.25em;
        margin-left: -20px;
    }
}

.multi-select-button {
    display: inline-block;
    font-size: 0.875em;
    padding: 0.2em 1.5em 0.2em 0.6em;
    max-width: 20em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: -0.5em;
    background-color: #fff;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: default;
    position: relative;

    &:after {
        content: "";
        display: block;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0.4em 0.4em 0 0.4em;
        border-color: #999 transparent transparent transparent;

        position: absolute;
        right: 0.5em;
        top: 50%;
        margin: -0.2em 0 0 0;
    }
}

.multi-select-container--open {
    .multi-select-menu {
        display: block;
    }

    .multi-select-button:after {
        border-width: 0 0.4em 0.4em 0.4em;
        border-color: transparent transparent #999 transparent;
    }
}

.multi-select-container--positioned {
    .multi-select-menu {
        box-sizing: border-box;

        label {
            white-space: normal;
        }
    }
}