Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions apps/webapp/app/components/code/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,17 @@ const defaultTheme: PrismTheme = {
},
},
{
types: ["property", "tag", "boolean", "number", "constant", "symbol", "deleted"],
types: ["property", "tag", "constant", "symbol", "deleted"],
style: {
color: "#9B99FF",
},
},
{
types: ["boolean", "number"],
style: {
color: "#E5C07B",
},
},
{
types: ["selector", "attr-name", "string", "char", "builtin", "inserted"],
style: {
Expand Down Expand Up @@ -151,12 +157,6 @@ const defaultTheme: PrismTheme = {
color: "#F85149",
},
},
{
types: ["boolean"],
style: {
color: "#9B99FF",
},
},
{
types: ["char"],
style: {
Expand Down
8 changes: 5 additions & 3 deletions apps/webapp/app/components/code/codeMirrorTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ export function darkTheme(): Extension {
ivory = "#abb2bf",
stone = "#7d8799",
malibu = "#61afef",
sage = "#98c379",
sage = "#afec73",
whiskey = "#d19a66",
violet = "#c678dd",
lilac = "#9b99ff",
darkBackground = "#21252b",
highlightBackground = "rgba(71,85,105,0.2)",
background = "#121317",
Expand Down Expand Up @@ -173,7 +174,7 @@ export function darkTheme(): Extension {
{ tag: tags.keyword, color: violet },
{
tag: [tags.name, tags.deleted, tags.character, tags.propertyName, tags.macroName],
color: coral,
color: lilac,
},
Comment on lines 176 to 178
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Deleted and character tokens now colored lilac — inconsistent with CodeBlock (red and pale green respectively)

Including tags.deleted and tags.character in the lilac group makes CodeMirror render them as lilac, while CodeBlock renders:

  • deleted as red (#F85149)
  • char as pale green (#b5cea8)

This contradicts the PR goal of consistency across editors. Remove these tags from the lilac group and add explicit rules matching CodeBlock.

Apply this diff to the current block:

-      tag: [tags.name, tags.deleted, tags.character, tags.propertyName, tags.macroName],
+      tag: [tags.name, tags.propertyName, tags.macroName],

Then add explicit deleted/character styles near other token rules:

// Add after the heading rule or nearby token rules
{ tag: tags.deleted, color: "#F85149" },
{ tag: tags.character, color: "#b5cea8" },
🤖 Prompt for AI Agents
In apps/webapp/app/components/code/codeMirrorTheme.ts around lines 176-178,
remove tags.deleted and tags.character from the lilac tag group so they are no
longer colored lilac, and then add explicit token rules (placed near the heading
or other token rules) for deleted and character with the CodeBlock colors: set
tags.deleted to "#F85149" and tags.character to "#b5cea8"; ensure the new
explicit rules are ordered so they override the lilac group.

{ tag: [tags.function(tags.variableName), tags.labelName], color: malibu },
{
Expand All @@ -186,6 +187,7 @@ export function darkTheme(): Extension {
tags.typeName,
tags.className,
tags.number,
tags.bool,
tags.changed,
tags.annotation,
tags.modifier,
Expand Down Expand Up @@ -213,7 +215,7 @@ export function darkTheme(): Extension {
{ tag: tags.link, color: stone, textDecoration: "underline" },
{ tag: tags.heading, fontWeight: "bold", color: coral },
{
tag: [tags.atom, tags.bool, tags.special(tags.variableName)],
tag: [tags.atom, tags.special(tags.variableName)],
color: whiskey,
},
{
Expand Down
Loading