mention-input.less 2.81 KB
Newer Older
eddie.woo's avatar
eddie.woo 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
.mention-input-wrapper {
    align-items: flex-end;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;

    .mention-input-content {
        background-color: #fff;
        cursor: initial;
        display: inline-block;
        flex-shrink: 1;
        font-weight: normal;
        line-height: 34px;
        margin: 0;
        overflow: hidden;
        padding: 0;
        vertical-align: middle;
        white-space: nowrap;
        width: 100%;

        &.mention-input-disabled {
            background-color: #EEE;
        }

        &.mention-with-btn {
            border-radius: 0;
        }

        * {
            display: inline-block;
        }

        _:-ms-input-placeholder, :root & * {
            // Hack for IE, since in IE, an inline-block contenteditable may cause a bunch of issues
            // https://stackoverflow.com/questions/21864047/how-to-disable-elements-selection-and-resizing-in-contenteditable-div
            display: inline;
        }

        pre {
            background-color: #EEE;
            cursor: default;
            margin: 0 0 -9px 0;
            padding: 5px;
        }

        &.mention-textarea {
            min-height: 80px;
            overflow-y: auto;
            padding: 5px;
            white-space: normal;
            word-wrap: break-word;
        }
    }

    .mention-input-btn-left {
        flex-shrink: 0;

        .btn {
            border-right: none;
            border-bottom-right-radius: 0;
            border-top-right-radius: 0;
            font-style: italic;
            height: 34px;
            min-width: 25px;
            outline: none;
            padding: 2px 5px 0 5px;
            text-align: center;
            width: 25px;
        }

        &.mention-textarea-btn .btn {
            min-height: 80px;
            min-width: 50px;
            width: 50px;
        }
    }

    .mention-input-btn-right {
        flex-shrink: 0;

        .btn {
            border-left: none;
            border-bottom-left-radius: 0;
            border-top-left-radius: 0;
            height: 34px;
            min-width: 25px;
            outline: none;
            padding: 2px 5px 0 5px;
            text-align: center;
            width: 25px;
        }

        &.mention-textarea-btn .btn {
            min-height: 80px;
            min-width: 50px;
            width: 50px;
        }
    }
}

mentio-menu {
    li {
        &.list-group-item {
            padding: 0;
        }

        .text-primary {
            color: #333;
            display: inline-block;
            padding: 10px 15px;
            width: 100%;
        }

        .text-muted {
            color: #777;
        }

        &.active {
            .text-primary {
                color: #fff;
            }

            .text-muted {
                color: #ddd;
            }
        }
    }
}