Skip to content

Commit 3ec95cd

Browse files
authored
fix: code editor/block theme inconsistency (#2393)
Tiny fix to make the themes across code blocks and editor components across the app consistent.
1 parent 6f29b7d commit 3ec95cd

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

apps/webapp/app/components/code/CodeBlock.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,17 @@ const defaultTheme: PrismTheme = {
8686
},
8787
},
8888
{
89-
types: ["property", "tag", "boolean", "number", "constant", "symbol", "deleted"],
89+
types: ["property", "tag", "constant", "symbol", "deleted"],
9090
style: {
9191
color: "#9B99FF",
9292
},
9393
},
94+
{
95+
types: ["boolean", "number"],
96+
style: {
97+
color: "#E5C07B",
98+
},
99+
},
94100
{
95101
types: ["selector", "attr-name", "string", "char", "builtin", "inserted"],
96102
style: {
@@ -151,12 +157,6 @@ const defaultTheme: PrismTheme = {
151157
color: "#F85149",
152158
},
153159
},
154-
{
155-
types: ["boolean"],
156-
style: {
157-
color: "#9B99FF",
158-
},
159-
},
160160
{
161161
types: ["char"],
162162
style: {

apps/webapp/app/components/code/codeMirrorTheme.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ export function darkTheme(): Extension {
1111
ivory = "#abb2bf",
1212
stone = "#7d8799",
1313
malibu = "#61afef",
14-
sage = "#98c379",
14+
sage = "#afec73",
1515
whiskey = "#d19a66",
1616
violet = "#c678dd",
17+
lilac = "#9b99ff",
1718
darkBackground = "#21252b",
1819
highlightBackground = "rgba(71,85,105,0.2)",
1920
background = "#121317",
@@ -173,7 +174,7 @@ export function darkTheme(): Extension {
173174
{ tag: tags.keyword, color: violet },
174175
{
175176
tag: [tags.name, tags.deleted, tags.character, tags.propertyName, tags.macroName],
176-
color: coral,
177+
color: lilac,
177178
},
178179
{ tag: [tags.function(tags.variableName), tags.labelName], color: malibu },
179180
{
@@ -186,6 +187,7 @@ export function darkTheme(): Extension {
186187
tags.typeName,
187188
tags.className,
188189
tags.number,
190+
tags.bool,
189191
tags.changed,
190192
tags.annotation,
191193
tags.modifier,
@@ -213,7 +215,7 @@ export function darkTheme(): Extension {
213215
{ tag: tags.link, color: stone, textDecoration: "underline" },
214216
{ tag: tags.heading, fontWeight: "bold", color: coral },
215217
{
216-
tag: [tags.atom, tags.bool, tags.special(tags.variableName)],
218+
tag: [tags.atom, tags.special(tags.variableName)],
217219
color: whiskey,
218220
},
219221
{

0 commit comments

Comments
 (0)