pre {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

#content {
    td.linenos, td.code {
        border: none;
        padding: 0;
        margin: 0;
        > .highlight pre {
            border: none;
        }
    }
    code {
        color: var(--CdTClr);
        padding: 0.25rem 0.1rem;
        margin: 0;
        font-size: 0.85em;
        background-color: var(--CdBgClr);
        border-bottom: var(--CdBClr) solid 0.2em;
        a, a:visited {
            color: var(--CdLClr);
            &:hover {
                color: var(--CdLHClr);
            }
        }
    }

    td.linenos pre, pre span.lineno {
        border-right: solid 0.3em var(--CdLnBClr);
        background-color: var(--CdLnBgClr);
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
        color: var(--CdLnTClr);
        white-space: pre;
        overflow-wrap: normal;
        margin: 0;
    }

    pre span.lineno {
        float: left;
        margin: 0 0.5rem 0 -0.5rem;
        padding-left: 0.5rem;
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
    }

    pre, pre[class*="language-"] {
        line-height: 1.4;
        padding: 1.25rem 1.5rem 1.25rem 0.5rem;
        margin: 0.85rem 0;
        background-color: var(--PrBgClr);
        color: var(--PrTClr);
        border-left: var(--PrBClr) solid 0.5em;
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
        code {
            color: var(--PrTClr);
            padding: 0;
            background-color: transparent;
        }
        a, a:visited {
            color: var(--PrLClr);
            &:hover {
                color: var(--PrLHClr);
            }
        }
    }
}

div[class*="language-"] {
    position: relative;
    background-color: var(--CdBgClr);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    .highlight-lines {
        padding-top: 1.3rem;
        width: 100%;
        line-height: 1.4;
        .highlighted {
            background-color: var(--CdBgAClr);
            color: var(--CdAClr);
        }
    }
    pre, pre[class*="language-"] {
        background: transparent;
        position: relative;
        z-index: 1;
    }
    &::before {
        z-index: 3;
        font-size: 0.75rem;
        color: var(--CdT2Clr);
    }
    &:not(.line-numbers-mode) {
        .line-numbers-wrapper {
            display: none;
        }
    }
    &.line-numbers-mode {
        .highlight-lines {
            .highlighted {
                position: relative;
                &:before {
                    content: ' ';
                    z-index: 3;
                    display: block;
                    width: var(--lineNumbersWrapperWidth);
                    height: 100%;
                    background-color: var(--CdBgAClr);
                    color: var(--CdBgClr);
                }
            }
        }
        pre {
            padding-left: var(--lineNumbersWrapperWidth);
            vertical-align: middle;
        }
        .line-numbers-wrapper {
            width: var(--lineNumbersWrapperWidth);
            text-align: center;
            color: var(--PrLNClr);
            padding: 1.25rem 0;
            line-height: 1.4;
            .line-number {
                position: relative;
                z-index: 4;
                font-size: 0.85em;
            }
        }
        &::after {
            content: '';
            z-index: 2;
            width: var(--lineNumbersWrapperWidth);
            height: 100%;
            border-left: 0.5rem solid var(--PrB2Clr);
            background-color: var(--PrBgClr);
        }
    }
}


//for lang in js ts html md vue css sass scss less stylus go java c sh yaml rst rust zsh gdscript esc
//    div{'[class~="language-' + lang + '"]'}
//        &:before
//            content ('' + lang)

div[class~="language-javascript"] {
    &:before {
        content: "js";
    }
}

div[class~="language-typescript"] {
    &:before {
        content: "ts";
    }
}

div[class~="language-markup"] {
    &:before {
        content: "html";
    }
}

div[class~="language-markdown"] {
    &:before {
        content: "md";
    }
}

div[class~="language-json"]:before {
    content: "json";
}

div[class~="language-ruby"]:before {
    content: "rb";
}

div[class~="language-python"]:before {
    content: "py";
}

div[class~="language-bash"]:before {
    content: "sh";
}
