Skip to content

Commit 61d413d

Browse files
codebytesCopilot
andcommitted
Fix code block syntax highlighting contrast in slides
Add GitHub Dark syntax highlighting colors for hljs tokens in both light and dark themes. The dark pre background (#1f2328) was rendering with Marp's default light-theme highlight colors, making code blocks unreadable. Now uses GitHub's dark syntax palette (blues, reds, greens). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e19daef commit 61d413d

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

‎slides/themes/custom-github-dark.css‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,23 @@ section pre code {
236236
font-size: 1em;
237237
}
238238

239+
/* ===== Syntax Highlighting (dark bg code blocks) ===== */
240+
section pre code span.hljs-attr,
241+
section pre code span.hljs-attribute { color: #79c0ff; }
242+
section pre code span.hljs-string,
243+
section pre code span.hljs-meta { color: #a5d6ff; }
244+
section pre code span.hljs-keyword,
245+
section pre code span.hljs-selector-tag { color: #ff7b72; }
246+
section pre code span.hljs-number,
247+
section pre code span.hljs-literal { color: #79c0ff; }
248+
section pre code span.hljs-comment { color: #8b949e; }
249+
section pre code span.hljs-built_in,
250+
section pre code span.hljs-type { color: #ffa657; }
251+
section pre code span.hljs-name,
252+
section pre code span.hljs-tag { color: #7ee787; }
253+
section pre code span.hljs-bullet { color: #f2cc60; }
254+
section pre code span.hljs-symbol { color: #d2a8ff; }
255+
239256
/* ===== Lists ===== */
240257
section ul, section ol {
241258
margin-left: 1.5em;

‎slides/themes/custom-github.css‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,23 @@ section pre code {
250250
font-size: 1em;
251251
}
252252

253+
/* ===== Syntax Highlighting (dark bg code blocks) ===== */
254+
section pre code span.hljs-attr,
255+
section pre code span.hljs-attribute { color: #79c0ff; }
256+
section pre code span.hljs-string,
257+
section pre code span.hljs-meta { color: #a5d6ff; }
258+
section pre code span.hljs-keyword,
259+
section pre code span.hljs-selector-tag { color: #ff7b72; }
260+
section pre code span.hljs-number,
261+
section pre code span.hljs-literal { color: #79c0ff; }
262+
section pre code span.hljs-comment { color: #8b949e; }
263+
section pre code span.hljs-built_in,
264+
section pre code span.hljs-type { color: #ffa657; }
265+
section pre code span.hljs-name,
266+
section pre code span.hljs-tag { color: #7ee787; }
267+
section pre code span.hljs-bullet { color: #f2cc60; }
268+
section pre code span.hljs-symbol { color: #d2a8ff; }
269+
253270
/* ===== Lists ===== */
254271
section ul, section ol {
255272
margin-left: 1.5em;

0 commit comments

Comments
 (0)