summaryrefslogtreecommitdiffstats
path: root/theme/stylesheets/website/dropdown.less
blob: 5093d5d7c6e7e27ddd57069d36f89e879f13de06 (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
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: @dropdown-zindex;
    display: none; // none by default, but block on "open" of the menu
    float: left;
    min-width: 160px;
    padding: 0;
    margin: 2px 0 0; // override default ul
    list-style: none;
    font-size: @font-size-base;
    background-color: @dropdown-background;
    border: 1px solid @dropdown-border-color;
    border-radius: @border-radius-base;
    .box-shadow(0 6px 12px rgba(0,0,0,.175));
    background-clip: padding-box;

    &.open{
        display:block;
    }

    &.dropdown-left {
        left: auto;
        right: 4%;

        .dropdown-caret {
            right: 14px;
            left: auto;
        }
    }

    .dropdown-caret{
        position: absolute;
        top: -8px;
        left: 14px;
        width: 18px;
        height: 10px;
        float: left;
        overflow: hidden;

        .caret-outer{
            position: absolute;
            border-left: 9px solid transparent;
            border-right: 9px solid transparent;
            border-bottom: 9px solid rgba(0,0,0,0.1);
            height: auto;
            left: 0;
            top: 0;
            width: auto;
            display: inline-block;
            margin-left: -1px;
        }
        .caret-inner{
            position: absolute;
            display: inline-block;
            margin-top: -1px;
            top: 0;
            top: 1px;
            border-left: 9px solid transparent;
            border-right: 9px solid transparent;
            border-bottom: 9px solid @dropdown-background;
        }
    }

    .buttons {
        .clearfix();
        border-bottom: 1px solid @sidebar-divider-color;

        &:last-child {
            border-bottom: none;
        }

        .button {
            border: 0;
            background-color: transparent;
            color: @dropdown-button-color;
            width: 100%;
            text-align: center;
            float: left;
            line-height: @line-height-base;
            padding: 8px 4px;

            &:hover {
                color: @dropdown-button-hover-color;
            }

            &:focus, &:hover {
                outline: none;
            }

            &.size-2 {
                width: 50%;
            }

            &.size-3 {
                width: 33%;
            }
        }
    }
}