stepy.less 4.06 KB
Newer Older
Luis Gangas 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
/* ------------------------------------------------------------------------------
*
*  # Stepy wizard
*
*  jQuery plugin which generates a customizable wizard from form fieldsets
*
*  Version: 1.0
*  Latest update: May 25, 2015
*
* ---------------------------------------------------------------------------- */


// Core
// ------------------------------

.stepy-step {
    padding: @content-padding-large;
    padding-top: 0;
}


// Header
// ------------------------------

.stepy-header {
    list-style: none;
    padding: 0;
    margin: 0;
    display: table;
    table-layout: fixed;
    width: 100%;

    // Add top border if inside flat panel
    .panel-flat > & {
        border-top: 1px solid @panel-default-border;
    }

    // Nav list item
    li {
        cursor: pointer;
        display: table-cell;
        vertical-align: top;
        width: auto;
        padding: @content-padding-large 0;
        text-align: center;
        position: relative;

        // Step nav text label
        span {
            display: block;
            margin-top: 10px;
            color: @text-muted;
        }

        // Line indicator
        &:before,
        &:after {
            content: '';
            display: block;
            position: absolute;
            top: 43px;
            width: 50%;
            height: 2px;
            background-color: @brand-info;
            z-index: 9;
        }
        &:before {
            left: 0;
        }
        &:after {
            right: 0;
        }
        &:first-child:before,
        &:last-child:after {
            content: none;
        }

        // Number indicator
        div {
            background-color: @brand-info;
            font-size: 0;
            position: relative;
            color: #fff;
            margin-left: auto;
            margin-right: auto;
            width: 38px;
            height: 38px;
            border: 2px solid @brand-info;
            z-index: 10;
            line-height: 34px;
            text-align: center;
            border-radius: 50%;

            // Icon
            &:after {
                content: '\ed6c';
                font-family: 'icomoon';
                display: inline-block;
                font-size: @icon-font-size;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                line-height: 34px;
                .transition(all 0.15s ease-in-out);
            }
        }

        // Active step
        &.stepy-active {
            &:after,
            ~ li:before,
            ~ li:after {
                background-color: #f5f5f5;
            }

            ~ li div {
                border-color: @gray-lighter;
                background-color: #fff;
                color: #ccc;
                font-size: 14px;

                &:after {
                    content: none;
                }
            }

            // Icon container
            div {
                cursor: auto;
                border-color: @brand-info;
                background-color: #fff;
                color: @brand-info;

                &:after {
                    content: '\e913';
                }
            }

            // Text label
            span {
                color: @text-color;
            }
        }
    }


    // Media queries
    @media (max-width: @screen-sm) {
        margin-bottom: @line-height-computed;

        // List item
        li {
            display: block;
            float: left;
            width: 50%;
            padding-bottom: 0;

            &:first-child:before,
            &:last-child:after {
                content: '';
            }
            &.stepy-active:last-child:after {
                background-color: @brand-info;
            }
        }
    }

    @media (max-width: @screen-xs) {

        // List item
        li {
            width: 100%;

            &.stepy-active:after {
                background-color: @brand-info;
            }
        }
    }
}


// Pagination
// ------------------------------

.stepy-navigator {
    text-align: right;

    .btn + .btn {
        margin-left: 5px;
    }
}