@use "../abstracts/themes"; // all code code { font-size: 0.925em; letter-spacing: normal; page-break-inside: avoid; // stylelint-disable-line plugin/no-unsupported-browser-features } // inline code in paragraphs/elsewhere (single backticks) :not(pre) > code { padding: 0.075em 0.25em; border: 1px solid; } // allow for inline code in post/page titles -- override above styles and match title .title code { font-size: 1em; background: none !important; border: 0 !important; margin: 0 0.075em !important; padding: 0 !important; } // same as above but different font weight for big titles h1.title code { font-weight: 600; } // code fences div.highlight { line-height: 1.6; max-width: 100%; overflow-x: scroll; margin: 1em 0; border: 1px solid; pre { padding-left: 1.5em; margin: 1em 0; } // code fences without syntax highlighting > pre > code { padding-right: 1.5em; } } // elements dynamically added by clipboard.js code div.highlight-clipboard-enabled { position: relative; button.copy-button { position: absolute; top: 0; right: 0; width: 5.5em; padding: 0.75em 0.25em; border: 1px solid; cursor: pointer; font-size: 0.85em; font-weight: 500; line-height: 1; &:hover { @include themes.themed( ( color: "links", ) ); } } } // global table styles for line numbers and font styles .chroma { .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } // columns .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; // add right padding to second column (the code) when fence overflows &:nth-of-type(2) { padding-right: 1em; } } // line numbers .ln, .lnt { user-select: none; } .gh, .gi, .gu { font-weight: bold; } .kd, // .nb, // .nl, // .nv, .vc, .vg, .vi, .ge { font-style: italic; } .gl { text-decoration: underline; } } // Syntax Highlighting (light) - modified from Monokai Light: https://github.com/mlgill/pygments-style-monokailight body.light { // stylelint-disable no-descending-specificity div.highlight, button.copy-button, :not(pre) > code { background-color: #fbfbfb; border-color: #d5d5d5; } div.highlight, button.copy-button { color: #313131; } // stylelint-enable no-descending-specificity .chroma { .k, .kc, .kd, .kp, .kr, .kt, .no { color: #029cb9; } .na, .nc, .nd, .ne, .nf, .nx { color: #70a800; } .nt, .o, .ow, .kn { color: #f92672; } .l, .se, .m, .mb, .mf, .mh, .mi, .il, .mo { color: #ae81ff; } .ld, .s, .sa, .sb, .sc, .dl, .sd, .s2, .sh, .si, .sx, .sr, .s1, .ss { color: #d88200; } .c, .ch, .cm, .c1, .cs, .cp, .cpf { color: #75715e; } .lnt { color: #8a8a8a; } } } // Syntax Highlighting (dark) - modified from Dracula: https://github.com/dracula/pygments body.dark { // stylelint-disable no-descending-specificity div.highlight, button.copy-button, :not(pre) > code { background-color: #252525; border-color: #535353; } div.highlight, button.copy-button { color: #e4e4e4; } // stylelint-enable no-descending-specificity .chroma { .k, .kc, .kd, .kp, .kr, .kt, .no { color: #3b9dd2; } .na, .nc, .nd, .ne, .nf, .nx { color: #78df55; } .nt, .o, .ow, .kn { color: #f95757; } .l, .se, .m, .mb, .mf, .mh, .mi, .il, .mo { color: #d588fb; } .ld, .s, .sa, .sb, .sc, .dl, .sd, .s2, .sh, .si, .sx, .sr, .s1, .ss { color: #fd992a; } .c, .ch, .cm, .c1, .cs, .cp, .cpf { color: #929292; } .lnt { color: #b1b1b1; } } }