/**
 * Core Codemirror styles.
 */
.CodeMirror {
    /* Set height, width, borders, and global font properties here */
    font-family    : @font-family-monospace;
    height         : auto;
}

.editor--fullscreen.-preview {
    .CodeMirror {
        position : absolute;
        top      : 0;
        bottom   : 0;
        left     : 0;
        right    : 0;
    }

    .CodeMirror-lines {
        padding-left  : 10px;
        padding-right : 10px;
    }

    .CodeMirror-linenumber {
        left: -16px !important;
    }

    .CodeMirror-gutter-wrapper + .CodeMirror-line {
        left: -5px;
    }
}

/**
 * Paddings
 */
.CodeMirror-lines {
    padding: 15px 0 100px; // Vertical padding around content
}

.CodeMirror pre {
    font-size   : @font-size-base * 1;
    line-height : floor((@font-size-base * 1 * @line-height-base));
}

// IE7 hack to prevent it from returning funny offsetTops on the spans
.CodeMirror span { *vertical-align: text-bottom; }

/**
 * Gutter
 */
.CodeMirror-gutter {
    /* Hack to make IE7 behave */
    *zoom:1;
    *display:inline;
}

.CodeMirror-gutter-wrapper {
    -webkit-user-select : none;
    -moz-user-select    : none;
    user-select         : none;
}

.CodeMirror-linenumber {
    left: -6px !important;
}

// Added because markdown-it-katex is displaying aria-hidden in codemirror for some reason
.katex-mathml {
    display: none;
}

// Fix vim mode
.CodeMirror-dialog-bottom {
    position: fixed;
    bottom: 20px;
    background: white;
    z-index: 4;

    input {
        outline: none;
    }
}
