_actions.less 1.9 KB
Newer Older
Ketan's avatar
Ketan 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
// /**
//  * Copyright © Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Utilities -> Actions
//  _____________________________________________

.action-reset() {
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;

    &:hover {
        background-color: transparent;
        border: none;
        box-shadow: none;
    }
}

.action-icon() {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;

    &:hover {
        background-color: transparent;
        border-color: transparent;
        box-shadow: none;
    }
}

//  Used in action dropdown, actions split & all other actions with triangle marker
.action-toggle-triangle (
    @_dropdown__padding-right: 3rem;
    @_triangle__height: @button-marker-triangle__height;
    @_triangle__width: @button-marker-triangle__width;
    @_triangle__color: @color-black;
    @_triangle__hover__color: darken(@_triangle__color, 10%);
    @_triangle__right: (@_dropdown__padding-right / 2) - (@_triangle__width / 2);
) {
    padding-right: @_dropdown__padding-right;

    &._active,
    &.active {
        &:after {
            transform: rotate(180deg);
        }
    }

    &:after {
        border-color: @_triangle__color transparent transparent transparent;
        border-style: solid;
        border-width: @_triangle__height @_triangle__width / 2 0 @_triangle__width / 2;
        content: '';
        height: 0;
        margin-top: -((@_triangle__width / 2) / 2);
        position: absolute;
        right: @_triangle__right;
        top: 50%;
        transition: all .2s linear;
        width: 0;

        ._active &,
        .active & {
            transform: rotate(180deg);
        }
    }

    &:hover {
        &:after {
            border-color: @_triangle__hover__color transparent transparent transparent;
        }
    }
}