my website
at main 151 lines 3.8 kB view raw
1/* warning: hacky bs ahead */ 2 3pre > code.sourceCode { 4 white-space: pre-wrap; 5 display: block; 6} 7 8pre.numberSource code { counter-reset: source-line 0; } 9pre.numberSource { 10 margin-left: 3rem; 11 padding-left: 1rem; 12 border-left: 1px dashed #5e5c64; 13} 14pre.numberSource code > span { 15 counter-increment: source-line; 16 display: inline-block; 17 text-indent: -3rem; 18} 19pre.numberSource code > span > a:first-child { 20 margin-right: 1rem; 21 margin-left: -0.5rem; 22} 23pre.numberSource code > span > a:first-child::before { 24 box-sizing: border-box; 25 width: 2.5rem; 26 display: inline-block; 27 padding-right: 0.5rem; 28 text-align: right; 29 content: counter(source-line); 30 color: #5e5c64; 31} 32 33/* 34 colors mainly from the gnome color palette 35 https://developer.gnome.org/hig/reference/palette.html 36*/ 37 38div.sourceCode { 39 text-align: initial; 40 background-color: #f3f3f3; 41 color: black; 42} 43 44code span.do, /* Documentation */ 45code span.co /* Comment */ 46{ color: #3d3846; font-style: italic; } 47 48code span.in, /* Information */ 49code span.an, /* Annotation */ 50code span.cv /* CommentVar */ 51{ color: #3d3846; } 52 53code span.wa, /* Warning */ 54code span.al /* Alert */ 55{ color: #a51d2d; } 56 57code span.sc /* SpecialChar */ 58{ color: #237000; font-weight: bold; } 59code span.ch, /* Char */ 60code span.ss, /* SpecialString */ 61code span.vs, /* VerbatimString */ 62code span.st /* String */ 63{ color: #237000; } 64 65code span.dt /* DataType */ 66{ color: #1a5fb4; } 67code span.at /* Attribute */ 68{ color: #204a87; } 69code span.dv, /* DecVal */ 70code span.fl, /* Float */ 71code span.bn /* BaseN */ 72{ color: #9141ac; } 73code span.im, /* Import */ 74code span.kw, /* Keyword */ 75code span.cf /* ControlFlow */ 76{ color: #9141ac; font-weight: bold; } 77code span.pp, /* Preprocessor */ 78code span.cn, /* Constant */ 79code span.ex, /* Extension */ 80code span.bu /* BuiltIn */ 81{ color: #813d9c; } 82 83code span.op /* Operator */ 84{ color: #865e3c; } 85code span.er /* Error */ 86{ color: #c01c28; font-weight: bold; } 87 88code span.fu, /* Function (doesn't work?) */ 89code span.ot, /* Other (also couldn't find) */ 90code span.va /* Variable (for some reason this behaves like Constant) */ 91{ color: #241f31; } 92 93@media (prefers-color-scheme: dark) { 94 pre.numberSource { border-color: #9a9996; } 95 pre.numberSource code > span > a:first-child::before { color: #9a9996; } 96 97 div.sourceCode { 98 text-align: initial; 99 background-color: #252525; 100 color: white; 101 } 102 103 code span.do, /* Documentation */ 104 code span.co /* Comment */ 105 { color: #deddda; font-style: italic; } 106 107 code span.in, /* Information */ 108 code span.an, /* Annotation */ 109 code span.cv /* CommentVar */ 110 { color: #deddda; } 111 112 code span.wa, /* Warning */ 113 code span.al /* Alert */ 114 { color: #f66151; } 115 116 code span.sc /* SpecialChar */ 117 { color: #33d17a; font-weight: bold; } 118 code span.ch, /* Char */ 119 code span.ss, /* SpecialString */ 120 code span.vs, /* VerbatimString */ 121 code span.st /* String */ 122 { color: #33d17a; } 123 124 code span.dt /* DataType */ 125 { color: #99c1f1; } 126 code span.at /* Attribute */ 127 { color: #62a0ea; } 128 code span.dv, /* DecVal */ 129 code span.fl, /* Float */ 130 code span.bn /* BaseN */ 131 { color: #dc8add; } 132 code span.im, /* Import */ 133 code span.kw, /* Keyword */ 134 code span.cf /* ControlFlow */ 135 { color: #dc8add; font-weight: bold; } 136 code span.pp, /* Preprocessor */ 137 code span.cn, /* Constant */ 138 code span.ex, /* Extension */ 139 code span.bu /* BuiltIn */ 140 { color: #dc8add; } 141 142 code span.op /* Operator */ 143 { color: #cdab8f; } 144 code span.er /* Error */ 145 { color: #e01b24; font-weight: bold; } 146 147 code span.fu, /* Function */ 148 code span.ot, /* Other */ 149 code span.va /* Variable */ 150 { color: #f6f5f4; } 151}