/**
 * yue.css
 *
 * yue.css is designed for readable content.
 *
 * Copyright (c) 2013 - 2017 by Hsiaoming Yang.
 */

 .yue {
    font: 400 18px/1.75 $void-font-default;
    [fontsize="1"] & {
        font-size: 14px;
    }
    [fontsize="2"] & {
        font-size: 16px;
    }
    [fontsize="4"] & {
        font-size: 20px;
    }
    [fontsize="5"] & {
        font-size: 22px;
    }

    -webkit-font-smoothing: antialiased;

    .serif & {
        font-family: $void-font-serif;
    }
    color: $textColor;
    .theme-dark & {
        color: $td-textColor;
    }
    word-break: break-word;
}

.yue h1,
.yue h2,
.yue h3,
.yue h4,
.yue h5,
.yue h6 {
    font-family: $void-font-sans;
    color: $darkColor;
    .theme-dark & {
        color: $td-textColor-light;
    }
    position: relative;
    & + * {
        margin-top: 0!important;
    }
}
.yue h1 {
    font-size: 1.8em;
    margin: 1.206em 0 0.36em;
    &::before {
        display: none;
    }
}
.yue > h1 {
    margin-top: 0;
    font-size: 2.2em;
}
.yue h2 {
    font-size: 1.5em;
    margin: 1.005em 0 0.375em;
}
.yue h3 {
    font-size: 1.17em;
    margin: 1em 0 0.2925em;
}
.yue h4,
.yue h5,
.yue h6 {
    font-size: 1em;
    margin: 1em 0 0.35em;
}
.yue h6 {
    font-weight: 500;
}
.yue p {
    margin: 0.92em 0;
}
.yue a {
    word-wrap: break-word;
    word-break: break-all;
    &:not([data-fancybox="gallery"]):not(.post-like):not(.edit-button) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
        &:hover {
            border-color: #000;
        }
        .theme-dark & {
            border-color: #909090;
            &:hover {
                border-color: #fff;
            }
        }
    }
}
.yue h1 a,
.yue h2 a,
.yue h3 a {
    text-decoration: none;
}
.yue strong,
.yue b {
    font-weight: 700;
    color: $darkColor;
    .theme-dark & {
        color: $td-textColor-light;
    }
}
.yue em,
.yue i {
    font-style: italic;
    color: $darkColor;
    .theme-dark & {
        color: $td-textColor-light;
    }
}
.yue img {
    max-width: 100%;
    height: auto;
    margin: 0.2em 0;
}
.yue a img {
    /* Remove border on IE */
    border: none;
}

.yue hr {
    display: block;
    width: 14%;
    margin: 40px auto 34px;
    border: 0 none;
    border-top: 3px solid #dededc;
    .theme-dark & {
        border-color: $td-borderColor;
    }
}
.yue blockquote {
    margin: 0.92em 0;
    border-left: 3px solid #dadada;
    padding-left: 12px;
    color: $fadeColor;
    .theme-dark & {
        color: $td-textColor-dark;
        border-color: $td-borderColor;
    }
}
.yue blockquote a {
    color: $fadeColor;
    .theme-dark & {
        color: $td-textColor-dark;
    }
}
.yue ul,
.yue ol {
    margin: 0 0 24px 18px;
    padding-left: 18px;
}
.yue .footnotes ol {
    margin-left: 8px;
}
.yue ul {
    list-style-type: square;
}
.yue ol {
    list-style-type: decimal;
}
.yue li {
    margin-bottom: 0.2em;
}
.yue li ul,
.yue li ol {
    margin-top: 0;
    margin-bottom: 0;
}
.yue li ul {
    list-style-type: disc;
}
.yue li ul ul {
    list-style-type: circle;
}
.yue li p {
    margin: 0.4em 0 0.6em;
}
.yue .unstyled {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.yue table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 1.5em;
    font-size: 0.96em;
    box-sizing: border-box;
    display: block;
    word-break: normal;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.yue thead {
    background-color: #efefee;
    .theme-dark & {
        background-color: $td-bgColor-dark;
    }
}
.yue th,
.yue td {
    padding: 4px 8px 4px 10px;
    border: 1px solid #dadada;
    .theme-dark & {
        border-color: rgba(#dadada, 0.2);
    }
}
.yue tr:nth-child(even) {
    background-color: #efefee;
    .theme-dark & {
        background-color: $td-bgColor-dark;
    }
}

.yue tt {
    color: #808080;
    font-size: 0.96em;
    padding: 1px 2px;
    border: 1px solid #eee;
    .theme-dark & {
        color: $td-textColor-dark;
        border-color: $td-bgColor-dark;
    }
    border-radius: 3px;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    word-wrap: break-word;
    word-break: break-all;
}

.yue code {
    background: #ebeded;
    padding: 0 3px;
    border-radius: 3px;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    .theme-dark & {
        background: $td-bgColor-dark;
    }
}

.yue pre {
    position: relative;
    width: 100%;
    .macStyleCodeBlock & {
        padding-top: 32px;
    }
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    line-height: 1.5;
    font-size: 0.96em;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    border: 1px solid rgba(#000, 0.05);
    border-radius: 5px;
    background: #f1f3f3;
    .theme-dark & {
        border: none;
        background: #111;
    }
    .theme-dark &::-webkit-scrollbar{
        background: $td-bgColor-dark;
    }
    .macStyleCodeBlock &::before {
        content: " ";
        position: absolute;
        -webkit-border-radius: 50%;
        border-radius: 50%;
        background: #fc625d;
        width: 12px;
        height: 12px;
        left: 12px;
        top: 10px;
        -webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
        box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
        z-index: 1;
    }
    .macStyleCodeBlock &::after {
        content: attr(data-lang);
        text-align: right;
        background: #ebeded;
        color: $td-textColor-light;
        width: 100%;
        height: 32px;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        line-height: 32px;
        font-size: 16px;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 0 12px;
        box-sizing: border-box;
    }
    .theme-dark.macStyleCodeBlock &::after {
        background: #21252b;
        color: #eee;
    }
    
    // code block
    code {
        display: block;
        background: none!important;
        word-break: normal;
        padding: 10px;
        overflow: auto;
        .theme-dark &::-webkit-scrollbar {
            background: #111;
        }
    }
}

@import "./prism";

.yue pre tt {
    border: none;
    background: none;
}

.yue iframe {
    display: block;
    max-width: 100%;
    margin-bottom: 30px;
}
.yue figure iframe {
    margin: auto;
}
.yue table pre {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}
@media (min-width: 1100px) {
    .yue blockquote {
        border-width: 4px;
    }
}

[lang^="zh"] .yue p,
[lang^="ja"] .yue p {
    text-align: justify;
    text-justify: inter-ideographic;
}

[lang^="zh"] .yue em,
[lang^="ja"] .yue em {
    font-style: normal;
    font-family: Baskerville, Georgia, Kaiti SC, STKaiti, AR PL UKai CN, AR PL UKai HK, AR PL UKai TW, AR PL UKai TW MBE,
        AR PL KaitiM GB, KaiTi, KaiTi_GB2312, DFKai-SB, TW\\-Kai, serif;
    -webkit-text-emphasis: dot #444;
    text-emphasis: dot #444;
    -webkit-text-emphasis-position: under left;
    text-emphasis-position: under left;
}