/* every length is in em, so overriding font-size rescales the whole block */ [class*="shj-lang-"] { white-space: pre; margin: .625em 0; border-radius: .75em; padding: 1.375em; background: white; color: #112; /* mixed from the theme's own text color, so every theme gets a fitting border without redefining it */ border: 1px solid color-mix(in srgb, currentColor 15%, transparent); text-shadow: none; font: normal 1rem/1.625 Consolas, "Courier New", Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; tab-size: 4; box-sizing: border-box; max-width: min(100%, 100vw) } .shj-inline { margin: 0; padding: .1em .3em; /* inline code tracks the text it sits in, unlike a block */ font-size: 1em; display: inline-block; border-radius: .3em } [class*="shj-lang-"]::selection, [class*="shj-lang-"] ::selection {background: #bdf5} [class*="shj-lang-"] > div { display: flex; overflow-x: auto } [class*="shj-lang-"] > div :last-child { flex: 1; outline: none } .shj-numbers { padding-right: .75em; margin-right: .75em; border-right: 1px solid color-mix(in srgb, currentColor 20%, transparent); text-align: right; counter-reset: line } /* the column is emitted either way, and numbers are off by default, so the empty one must take no room at all */ .shj-numbers:empty {display: none} .shj-numbers div::before { color: #999; display: block; content: counter(line); opacity: .5; min-width: 1.5em; counter-increment: line } .shj-syn-cmnt {font-style: italic} .shj-syn-err, .shj-syn-kwd {color: #e16} .shj-syn-num, .shj-syn-class {color: #f60} .shj-numbers, .shj-syn-cmnt {color: #999} .shj-syn-insert, .shj-syn-str {color: #7d8} .shj-syn-bool {color: #3bf} .shj-syn-type, .shj-syn-oper {color: #5af} .shj-syn-section, .shj-syn-func {color: #84f} .shj-syn-deleted, .shj-syn-var {color: #f44}