Skip to content
Snippets Groups Projects
controls.scss 6.34 KiB
Newer Older
David Sehnal's avatar
David Sehnal committed

David Sehnal's avatar
David Sehnal committed
.msp-row {
    position: relative;
    height: $row-height;
    background: $default-background;
    margin-top: 1px;

    select, button, input[type=text] {
        @extend .msp-form-control;
    }
David Sehnal's avatar
David Sehnal committed
    button {
        @extend .msp-btn;
        @extend .msp-btn-block;
    }
}

.msp-control-row {
David Sehnal's avatar
David Sehnal committed
    position: relative;
    height: $row-height;
    background: $default-background;
    margin-top: 1px;
David Sehnal's avatar
David Sehnal committed
    > span {
        line-height: $row-height;
        display: block;
        width: $control-label-width + $control-spacing;
        text-align: right;
        padding: 0 $control-spacing;
David Sehnal's avatar
David Sehnal committed
        color: color-lower-contrast($font-color, 15%);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        @include non-selectable;
David Sehnal's avatar
David Sehnal committed
    }
David Sehnal's avatar
David Sehnal committed
    select, button, input[type=text] {
        @extend .msp-form-control;
    }
David Sehnal's avatar
David Sehnal committed
    button {
        @extend .msp-btn;
        @extend .msp-btn-block;
    }
David Sehnal's avatar
David Sehnal committed
    > div:nth-child(2) {
        background: $msp-form-control-background;
        position: absolute;
        left: $control-label-width + $control-spacing;
        top: 0;
        right: 0;
        bottom: 0;
    }
}

.msp-control-group {
    position: relative;
}

.msp-toggle-button {
David Sehnal's avatar
David Sehnal committed
    .msp-icon {
        display: inline-block;
        margin-right: 6px;
    }
David Sehnal's avatar
David Sehnal committed
    > div > button:hover {
        border-color: color-increase-contrast($msp-form-control-background, 5%) !important;
        border: none;
        outline-offset: -1px  !important;
        outline: 1px solid color-increase-contrast($msp-form-control-background, 20%) !important;
.msp-slider {
David Sehnal's avatar
David Sehnal committed
    > div:first-child {
        position: absolute;
        top: 0;
David Sehnal's avatar
David Sehnal committed
        bottom: 0;
        right: 62px;
        display: grid;
David Sehnal's avatar
David Sehnal committed
    }
David Sehnal's avatar
David Sehnal committed
    > div:last-child {
        position: absolute;
        height: $row-height;
        line-height: $row-height;
        text-align: center;
        right: 0;
        width: 50px;
        top: 0;
        bottom: 0;
David Sehnal's avatar
David Sehnal committed
    }
    input[type=text] {
        padding-right: 6px;
        padding-left: 4px;
        font-size: 80%;
        text-align: right;
    }
David Sehnal's avatar
David Sehnal committed
    // input[type=range] {
    //     width: 100%;
    // }
.msp-slider2 {
    > div:first-child {
        position: absolute;
        height: $row-height;
        line-height: $row-height;
        text-align: center;
        left: 0;
        width: 25px;
        top: 0;
        bottom: 0;
        font-size: 80%;
    }
    > div:nth-child(2) {
        position: absolute;
        top: 0;
        right: 37px;
        display: grid;
    }
    > div:last-child {
        position: absolute;
        height: $row-height;
        line-height: $row-height;
        text-align: center;
        right: 0;
        width: 25px;
        top: 0;
        bottom: 0;
        font-size: 80%;
    }
    input[type=text] {
        padding-right: 4px;
        padding-left: 4px;
        font-size: 80%;
        text-align: center;
    }
David Sehnal's avatar
David Sehnal committed
.msp-toggle-color-picker {
    button {
        border: $control-spacing solid $msp-form-control-background !important;
        margin: 0;
        text-align: center;
        padding-right: $control-spacing;
        padding-left: $control-spacing;

David Sehnal's avatar
David Sehnal committed
        &:hover {
            border-color: color-increase-contrast($msp-form-control-background, 5%) !important;
            border: none;
            outline-offset: -1px  !important;
            outline: 1px solid color-increase-contrast($msp-form-control-background, 20%) !important;
David Sehnal's avatar
David Sehnal committed
        }
    }
David Sehnal's avatar
David Sehnal committed
    .msp-color-picker {
        position: absolute;
        z-index: 100000;
        background: $default-background;
        border-top: 1px solid $default-background;
        padding-bottom: $control-spacing / 2;
David Sehnal's avatar
David Sehnal committed
        // input[type=text] {
        //     background: $msp-form-control-background !important;
        // }
    }
}

.msp-toggle-color-picker-above {
    .msp-color-picker {
        top: -2 * 32px - 16px - $control-spacing / 2;
        height: 2 * 32px + 16px + $control-spacing / 2;
    }
}

.msp-toggle-color-picker-below {
    .msp-color-picker {
        top: $row-height;
        height: 2 * 32px + 16px;
    }
}

David Sehnal's avatar
David Sehnal committed
.msp-control-offset {
    // border-left-width: $control-spacing / 2;
    // border-left-style: solid;
    // border-left-color: color-increase-contrast($default-background, 10%);
    // padding-left: 1px;
    padding-left: $control-spacing;
}

.msp-control-group-wrapper {
    //border-left-width: $control-spacing / 2;
    //border-left-style: solid;
    //border-left-color: color-increase-contrast($default-background, 10%);

David Sehnal's avatar
David Sehnal committed
    margin-bottom: 0px;
David Sehnal's avatar
David Sehnal committed
    padding-top: 1px;
}

// TODO : get rid of the important
.msp-control-group-header {
    > button {
        padding-left: $control-spacing / 2 !important;
        text-align: left !important;
        height: 2 * $row-height / 3 !important;
        line-height: 2 * $row-height / 3 !important;
        font-size: 70% !important;
        background: $default-background !important;
David Sehnal's avatar
David Sehnal committed
        color: color-lower-contrast($font-color, 15%) !important;
    }
}

.msp-control-group-footer {
    background: color-increase-contrast($default-background, 5%);
    height: $control-spacing / 2;
    font-size: 1px;
    margin-top: 1px;
}
David Sehnal's avatar
David Sehnal committed

.msp-control-subgroup {
    margin-top: 1px;
David Sehnal's avatar
David Sehnal committed
    .msp-control-row {
        margin-left: $control-spacing !important;
        > span {
            width: $control-label-width !important;
        }
David Sehnal's avatar
David Sehnal committed
        > div:nth-child(2) {
            left: $control-label-width !important;
        }
    }
}

.msp-conrol-group-expander {
    display: block;
    position: absolute;
    line-height: $row-height;
    padding: 0;
    left: 0;
    top: 0;
    width: $control-label-width + $control-spacing;
    text-align: left;
    background: transparent;
David Sehnal's avatar
David Sehnal committed
    .msp-icon {
        line-height: $row-height - 3;
        width: $row-height - 1;
        text-align: center;
        // display: inline-block;
David Sehnal's avatar
David Sehnal committed
        font-size: 100%;
    }
}

.msp-plugin-layout_controls {
    position: absolute;
    left: $control-spacing;
    top: $control-spacing;
}

.msp-plugin-layout_controls > button:first-child {
    margin-right: 6px;
}

.msp-empty-control {
    display: none;
}

.msp-control .msp-btn-block {
    margin-bottom: 0px;
    margin-top: 0px;
}

.msp-row-text {
    > div {
        line-height: $row-height;
        text-align: center;
    }
}