_resizable-block.less 4.01 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 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
// /**
//  * Copyright © Magento, Inc. All rights reserved.
//  * See COPYING.txt for license details.
//  */

//
//  Components -> Resizable Block
//  _____________________________________________

//
//  Variables
//  ---------------------------------------------

@resizable-block-angle-handle__default__height: 12px;
@resizable-block-angle-handle__default__width: 12px;

@resizable-block-side-handle__default__size: 7px;

@resizable-block-side-handle__custom__background-color: @color-gray89;
@resizable-block-side-handle__custom__border-color: @color-gray-light2;
@resizable-block-side-handle__custom__color: @color-gray40;
@resizable-block-side-handle__custom__font-size: 1.6rem;

//
//  Extends
//  _____________________________________________

.abs-block-resizable {
    height: 15rem;
    min-height: 15rem;
}

//  Resizable Block Content
.abs-block-resizable-content {
    height: 100%;
    margin-bottom: @indent__base;
    min-height: 15rem;
    overflow: auto;
    position: relative;
    z-index: 1;
}

//  Bottom handle
.abs-block-resizable-handle-bottom {
    background: @resizable-block-side-handle__custom__background-color;
    border: 1px solid @resizable-block-side-handle__custom__border-color;
    bottom: auto;
    color: @resizable-block-side-handle__custom__color;
    font-size: @resizable-block-side-handle__custom__font-size;
    font-weight: @font-weight__bold;
    height: auto;
    left: -1px;
    letter-spacing: .1rem;
    line-height: @resizable-block-side-handle__custom__font-size;
    padding-bottom: .3rem;
    right: -1px;
    text-align: center;
    top: 100%;
    width: auto;

    &:before {
        content: ':::::';
    }
}

//
//  Default Resizable Styles
//  ---------------------------------------------

.ui-resizable {
    position: relative;
}

.ui-resizable-handle {
    display: block;
    font-size: .1px;
    position: absolute;
    touch-action: none;
}

.ui-resizable-n {
    cursor: n-resize;
    height: @resizable-block-side-handle__default__size;
    left: 0;
    top: -@resizable-block-side-handle__default__size/2;
    width: 100%;
}

.ui-resizable-s {
    bottom: -@resizable-block-side-handle__default__size/2;
    cursor: s-resize;
    height: @resizable-block-side-handle__default__size;
    left: 0;
    width: 100%;
}

.ui-resizable-e {
    cursor: e-resize;
    height: 100%;
    right: -@resizable-block-side-handle__default__size/2;
    top: 0;
    width: @resizable-block-side-handle__default__size;
}

.ui-resizable-w {
    cursor: w-resize;
    height: 100%;
    left: -@resizable-block-side-handle__default__size/2;
    top: 0;
    width: @resizable-block-side-handle__default__size;
}

.ui-resizable-se {
    bottom: -@resizable-block-angle-handle__default__height/2;
    cursor: se-resize;
    height: @resizable-block-angle-handle__default__height;
    right: -@resizable-block-angle-handle__default__width/2;
    width: @resizable-block-angle-handle__default__width;
}

.ui-resizable-sw {
    bottom: -@resizable-block-angle-handle__default__height/2;
    cursor: sw-resize;
    height: @resizable-block-angle-handle__default__height;
    left: -@resizable-block-angle-handle__default__width/2;
    width: @resizable-block-angle-handle__default__width;
}

.ui-resizable-nw {
    cursor: nw-resize;
    height: @resizable-block-angle-handle__default__height;
    left: -@resizable-block-angle-handle__default__width/2;
    top: -@resizable-block-angle-handle__default__height/2;
    width: @resizable-block-angle-handle__default__width;
}

.ui-resizable-ne {
    cursor: ne-resize;
    height: @resizable-block-angle-handle__default__height;
    right: -@resizable-block-angle-handle__default__width/2;
    top: -@resizable-block-angle-handle__default__height/2;
    width: @resizable-block-angle-handle__default__width;
}

//
//  Container
//  ---------------------------------------------

.block-resizable {
    &:extend(.abs-block-resizable all);

    .block-content {
        &:extend(.abs-block-resizable-content all);
    }

    .ui-resizable-s {
        &:extend(.abs-block-resizable-handle-bottom all);
    }
}