_ddlMenu.scss 5.95 KB
Newer Older
Deni Rinaldi's avatar
Deni Rinaldi committed
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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
$dd-height: 40px;

.drop-down-list {
    position: relative;
    width: 100%;
    height: $dd-height;
    background-color: #fff;
    &:hover {
        .ddl-border {
            border: $border2;
            cursor: pointer;
        }
        .ddl-menu {
            border-left: $border2;
            border-right: $border2;
            border-bottom: $border2;
        }
    }
    &.active {
        z-index: 10;
        .ddl-selected {
            .ddl-icon {
                .icon {
                    &:after {
                        top: 8px;
                        @include animate_1();
                        -webkit-transform: rotate(-135deg);
                           -moz-transform: rotate(-135deg);
                            -ms-transform: rotate(-135deg);
                             -o-transform: rotate(-135deg);
                                transform: rotate(-135deg);
                    }
                }
            }
        }
        .ddl-border {
            border: $border2;
            cursor: pointer;
        }
        .ddl-menu {
            border-left: $border2;
            border-right: $border2;
            border-bottom: $border2;
            display: block;
            @include animate_1();
        }
    }
    .ddl-border {
        border: $border1;
        border-radius: 5px;
    }
    .ddl-selected {
        position: relative;
        width: 100%;
        height: $dd-height;
        display: flex;
        .ddl-title {
            position: relative;
            width: calc(100% - 30px);
            padding: 0 15px;
            .title {
                @include post_top(absolute);
                left: 15px;
                font-size: 13px;
                font-weight: 600;
                color: $txt-84-color;
                text-transform: capitalize;
            }
        }
        .ddl-icon {
            width: $dd-height;
            .icon {
                position: absolute;
                width: 15px;
                height: 15px;
                border-radius: 2px;
                right: 10px;
                top: 10px;
                opacity: 1;
                &:after {
                    @include animate_1();
                    content: "";
                    position: absolute;
                    left: 0;
                    top: 3px;
                    width: 7px;
                    height: 7px;
                    border: solid rgba($color: #000, $alpha: 0.7);
                    border-width: 0 1.5px 1.5px 0;
                    -webkit-transform: rotate(45deg);
                       -moz-transform: rotate(45deg);
                        -ms-transform: rotate(45deg);
                         -o-transform: rotate(45deg);
                            transform: rotate(45deg);
                }
            }
        }
    }
    .ddl-menu {
        position: absolute;
        top: 38px;
        left: 0;
        width: calc(100% - 2px);
        max-height: 200px;
        overflow-y: auto;
        border-left: $border1;
        border-right: $border1;
        border-bottom: $border1;
        background-color: #fff;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        display: none;
        @include transparantScrollBar();
        ul {
            position: relative;
            li {
                position: relative;
                list-style: none;
                input ~ ul > li {
                    display: none;
                }
                input {
                    display: none;
                    &:checked ~ ul > li {
                        display: block;
                    }
                    &:checked ~ label {
                        // background-color: rgba($color: #999, $alpha: 0.14);
                        background-color: $blue;
                        .title {
                            color: #fff;
                        }
                        .subtitle {
                            color: #fff;
                        }
                    }
                }
                label {
                    position: relative;
                    padding: 10px 10px;
                    cursor: pointer;
                    display: block;
                    background-color: #fff;
                    &:hover {
                        background-color: rgba($color: #999, $alpha: 0.14);
                    }
                    .title {
                        font-size: 13px;
                        font-weight: 600;
                        color: $txt-84-color;
                    }
                    .subtitle {
                        font-size: 12px;
                        font-weight: 500;
                        color: $txt-54-color;
                    }
                }
                ul {
                    position: relative;
                    margin-left: 20px;
                    li {
                        position: relative;
                        &:before {
                            content: "";
                            position: absolute;
                            top: 0;
                            left: -10px;
                            width: 7.5px;
                            height: 20px;
                            border-left: 1px rgba($color: #000, $alpha: 0.34) solid;
                            border-bottom: 1px rgba($color: #000, $alpha: 0.34) solid;
                            z-index: 10;
                        }
                        input {
                            &:checked ~ label {
                                // background-color: rgba($color: #999, $alpha: 0.14);
                                background-color: $blue;
                                .title {
                                    color: #fff;
                                }
                                .subtitle {
                                    color: #fff;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}