feat(workspace): code block with language picker and live highlighting

This commit is contained in:
sandrodach committed 2026-10-29 22:18:03 +01:00
1 parent 6a5e82431f
commit ff53f06991
13 files changed
+1089 -367

No files matched your search

+77 -33
View File
@@ -411,62 +411,106 @@ body {
color: var(--text-main);
}
/* Prism Syntax Highlighting Tokens */
/* Prism Syntax Highlighting Tokens (VS Code Dark+ / Light+ via Theme Variables) */
:root {
--code-keyword: #569cd6;
--code-string: #ce9178;
--code-number: #b5cea8;
--code-comment: #6a9955;
--code-property: #9cdcfe;
--code-function: #dcdcaa;
--code-type: #4ec9b0;
--code-punctuation: #d4d4d4;
--code-variable: #9cdcfe;
}
:root:not(.dark),
:root[data-theme="light"] {
--code-keyword: #0000ff;
--code-string: #a31515;
--code-number: #098658;
--code-comment: #008000;
--code-property: #0451a5;
--code-function: #795e26;
--code-type: #267f99;
--code-punctuation: #3b3b3b;
--code-variable: #001080;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #71717a;
color: var(--code-comment);
font-style: italic;
}
.token.punctuation {
color: #94a3b8;
.token.punctuation,
.token.operator {
color: var(--code-punctuation);
}
.token.property,
.token.tag,
.token.boolean,
.token.key,
.token.attr-name {
color: var(--code-property);
}
.token.string,
.token.char,
.token.attr-value,
.token.scalar,
.token.inserted,
.language-css .token.string,
.style .token.string {
color: var(--code-string);
}
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #f43f5e;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #10b981;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #38bdf8;
.token.datetime {
color: var(--code-number);
}
.token.keyword,
.token.boolean,
.token.null,
.token.atrule,
.token.attr-value,
.token.keyword {
color: #818cf8;
font-weight: 600;
.token.directive,
.token.tag,
.token.deleted {
color: var(--code-keyword);
}
.token.key.atrule {
color: var(--code-property);
}
.token.function,
.token.class-name {
color: #fbbf24;
.token.function-variable {
color: var(--code-function);
}
.token.class-name,
.token.type,
.token.builtin,
.token.namespace {
color: var(--code-type);
}
.token.variable,
.token.regex,
.token.important,
.token.variable {
color: #f97316;
.token.selector,
.token.entity,
.token.url {
color: var(--code-variable);
}
.token.boolean.important,
.token.null.important {
color: var(--code-keyword);
}
}