|
| 1 | +/* Prism.js Syntax Highlighting for Kalco Documentation */ |
| 2 | + |
| 3 | +code[class*="language-"], |
| 4 | +pre[class*="language-"] { |
| 5 | + color: #e5e7eb; |
| 6 | + background: none; |
| 7 | + font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; |
| 8 | + font-size: 0.875rem; |
| 9 | + text-align: left; |
| 10 | + white-space: pre; |
| 11 | + word-spacing: normal; |
| 12 | + word-break: normal; |
| 13 | + word-wrap: normal; |
| 14 | + line-height: 1.5; |
| 15 | + tab-size: 4; |
| 16 | + hyphens: none; |
| 17 | +} |
| 18 | + |
| 19 | +/* Code blocks */ |
| 20 | +pre[class*="language-"] { |
| 21 | + padding: 1rem; |
| 22 | + margin: 0; |
| 23 | + overflow: auto; |
| 24 | + border-radius: 0.5rem; |
| 25 | +} |
| 26 | + |
| 27 | +/* Inline code */ |
| 28 | +:not(pre) > code[class*="language-"] { |
| 29 | + padding: 0.2em 0.4em; |
| 30 | + border-radius: 0.375rem; |
| 31 | + white-space: normal; |
| 32 | +} |
| 33 | + |
| 34 | +/* Token styles */ |
| 35 | +.token.comment, |
| 36 | +.token.prolog, |
| 37 | +.token.doctype, |
| 38 | +.token.cdata { |
| 39 | + color: #6b7280; |
| 40 | +} |
| 41 | + |
| 42 | +.token.punctuation { |
| 43 | + color: #9ca3af; |
| 44 | +} |
| 45 | + |
| 46 | +.token.namespace { |
| 47 | + opacity: 0.7; |
| 48 | +} |
| 49 | + |
| 50 | +.token.property, |
| 51 | +.token.tag, |
| 52 | +.token.boolean, |
| 53 | +.token.number, |
| 54 | +.token.constant, |
| 55 | +.token.symbol, |
| 56 | +.token.deleted { |
| 57 | + color: #f59e0b; |
| 58 | +} |
| 59 | + |
| 60 | +.token.selector, |
| 61 | +.token.attr-name, |
| 62 | +.token.string, |
| 63 | +.token.char, |
| 64 | +.token.builtin, |
| 65 | +.token.inserted { |
| 66 | + color: #10b981; |
| 67 | +} |
| 68 | + |
| 69 | +.token.operator, |
| 70 | +.token.entity, |
| 71 | +.token.url, |
| 72 | +.language-css .token.string, |
| 73 | +.style .token.string { |
| 74 | + color: #6366f1; |
| 75 | +} |
| 76 | + |
| 77 | +.token.atrule, |
| 78 | +.token.attr-value, |
| 79 | +.token.keyword { |
| 80 | + color: #8b5cf6; |
| 81 | +} |
| 82 | + |
| 83 | +.token.function, |
| 84 | +.token.class-name { |
| 85 | + color: #06b6d4; |
| 86 | +} |
| 87 | + |
| 88 | +.token.regex, |
| 89 | +.token.important, |
| 90 | +.token.variable { |
| 91 | + color: #ef4444; |
| 92 | +} |
| 93 | + |
| 94 | +.token.important, |
| 95 | +.token.bold { |
| 96 | + font-weight: bold; |
| 97 | +} |
| 98 | + |
| 99 | +.token.italic { |
| 100 | + font-style: italic; |
| 101 | +} |
| 102 | + |
| 103 | +.token.entity { |
| 104 | + cursor: help; |
| 105 | +} |
| 106 | + |
| 107 | +/* Line numbers */ |
| 108 | +.line-numbers .line-numbers-rows { |
| 109 | + position: absolute; |
| 110 | + pointer-events: none; |
| 111 | + top: 0; |
| 112 | + font-size: 100%; |
| 113 | + left: -3.8em; |
| 114 | + width: 3em; |
| 115 | + letter-spacing: -1px; |
| 116 | + border-right: 1px solid #374151; |
| 117 | + user-select: none; |
| 118 | +} |
| 119 | + |
| 120 | +.line-numbers-rows > span { |
| 121 | + pointer-events: none; |
| 122 | + display: block; |
| 123 | + counter-increment: linenumber; |
| 124 | +} |
| 125 | + |
| 126 | +.line-numbers-rows > span:before { |
| 127 | + content: counter(linenumber); |
| 128 | + color: #6b7280; |
| 129 | + display: block; |
| 130 | + padding-right: 0.8em; |
| 131 | + text-align: right; |
| 132 | +} |
| 133 | + |
| 134 | +/* Command line */ |
| 135 | +.command-line-prompt { |
| 136 | + border-right: 1px solid #374151; |
| 137 | + display: inline-block; |
| 138 | + margin: 0; |
| 139 | + padding: 0 0.5em; |
| 140 | + margin-right: 0.5em; |
| 141 | + color: #10b981; |
| 142 | +} |
| 143 | + |
| 144 | +.command-line-prompt > span:before { |
| 145 | + color: #10b981; |
| 146 | + content: " "; |
| 147 | + display: block; |
| 148 | + padding-right: 0.8em; |
| 149 | +} |
| 150 | + |
| 151 | +.command-line-prompt > span[data-user]:before { |
| 152 | + content: "$ "; |
| 153 | +} |
| 154 | + |
| 155 | +.command-line-prompt > span[data-user="root"]:before { |
| 156 | + content: "# "; |
| 157 | +} |
| 158 | + |
| 159 | +.command-line-prompt > span[data-prompt]:before { |
| 160 | + content: attr(data-prompt); |
| 161 | +} |
| 162 | + |
| 163 | +/* Shell session */ |
| 164 | +.shell-session { |
| 165 | + background: #1f2937; |
| 166 | + border-radius: 0.5rem; |
| 167 | + overflow: hidden; |
| 168 | +} |
| 169 | + |
| 170 | +.shell-session .command-line-prompt { |
| 171 | + background: #374151; |
| 172 | + color: #10b981; |
| 173 | + padding: 0.5rem 1rem; |
| 174 | + border-bottom: 1px solid #4b5563; |
| 175 | +} |
| 176 | + |
| 177 | +.shell-session pre { |
| 178 | + margin: 0; |
| 179 | + background: #1f2937; |
| 180 | +} |
| 181 | + |
| 182 | +/* Copy button positioning */ |
| 183 | +.code-block { |
| 184 | + position: relative; |
| 185 | +} |
| 186 | + |
| 187 | +.copy-btn { |
| 188 | + position: absolute; |
| 189 | + top: 0.5rem; |
| 190 | + right: 0.5rem; |
| 191 | + z-index: 10; |
| 192 | +} |
| 193 | + |
| 194 | +/* Dark theme support */ |
| 195 | +@media (prefers-color-scheme: dark) { |
| 196 | + code[class*="language-"], |
| 197 | + pre[class*="language-"] { |
| 198 | + color: #e5e7eb; |
| 199 | + } |
| 200 | + |
| 201 | + .token.comment, |
| 202 | + .token.prolog, |
| 203 | + .token.doctype, |
| 204 | + .token.cdata { |
| 205 | + color: #6b7280; |
| 206 | + } |
| 207 | + |
| 208 | + .token.punctuation { |
| 209 | + color: #9ca3af; |
| 210 | + } |
| 211 | +} |
| 212 | + |
| 213 | +/* Print styles */ |
| 214 | +@media print { |
| 215 | + code[class*="language-"], |
| 216 | + pre[class*="language-"] { |
| 217 | + text-shadow: none; |
| 218 | + } |
| 219 | +} |
0 commit comments