Sha256: 46b9b457752d6a2b6339f16d23c299255fe39a25e992d9bde1b91be3da803a40

Contents?: true

Size: 1.85 KB

Versions: 2

Compression:

Stored size: 1.85 KB

Contents

/**
 * @copyright   2010-2013, The Titon Project
 * @license     http://opensource.org/licenses/bsd-license.php
 * @link        http://titon.io
 */

@import "../common";

.dropdown {
    display: none;
    text-align: left;
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background: $gray;
    border: 1px solid $gray-dark;
    line-height: 100%;
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    @include transition(opacity .3s);

    // Nested dropdowns
    .dropdown {
        display: block;
        top: 0;
        left: 90%;
        z-index: 510;
        @include transition(left .3s, opacity .3s);
    }

    li {
        position: relative;

        > a {
            padding: $small-padding;
            display: block;

            .caret-right {
                float: right;
                display: none;
            }
        }

        &.has-children {
            > a .caret-right { display: inline-block; }
        }

        // Show nested dropdown
        &:hover {
            > a { background: #fff; }

            .dropdown {
                visibility: visible;
                opacity: 1;
                left: 100%;
            }
        }
    }

    // Force display
    &.show {
        display: block;
    }
}

.dropdown,
.dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-divider {
    margin: ($margin / 2) 0;
    border-top: 1px solid $gray-dark;
}

.dropdown-heading {
    padding: $small-padding;
    background-color: $gray-dark;
}

//-------------------- Modifiers --------------------//

.dropdown.dropdown--top {
    top: auto;
    bottom: 100%;
}

.dropdown.dropdown--right {
    top: auto;
    left: 100%;
}

.dropdown.dropdown--left {
    top: auto;
    left: auto;
    right: 100%;
}

.dropdown.dropdown--push {
    left: auto;
    right: 0;
}

.dropdown.dropdown--pull {
    bottom: 0;
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
titon-toolkit-1.0.0.rc.2 scss/toolkit/components/dropdown.scss
titon-toolkit-1.0.0.rc1 scss/toolkit/components/dropdown.scss