Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I apply color styling to backticks? #562

Closed
brgndyy opened this issue Sep 11, 2023 · 0 comments
Closed

How do I apply color styling to backticks? #562

brgndyy opened this issue Sep 11, 2023 · 0 comments

Comments

@brgndyy
Copy link

brgndyy commented Sep 11, 2023

Hello, I am currently creating a custom theme.
"``` typescript"
I also want to add a different color to the part where I enter the backtick. What is this part called?
Currently, specifying quote, comment or other tags does not apply.

const myTheme = createTheme({
  theme: "dark",
  settings: {
    background: "#171717",
    foreground: "#ffffff",
    caret: "#8a7878",
    selection: "#212121",
    selectionMatch: "#212121",
    lineHighlight: "#8a91991a",
    gutterBackground: "#9e7575",
    gutterForeground: "#8a919966",
  },
  styles: [
    { tag: t.comment, color: "#5c6370;" },
    { tag: t.variableName, color: "#0080ff" },
    { tag: [t.string, t.special(t.brace)], color: "#5c6166" },
    { tag: t.number, color: "#5c6166" },
    { tag: t.bool, color: "#5c6166" },
    { tag: t.null, color: "#5c6166" },
    { tag: t.keyword, color: "#5c6166" },
    { tag: t.operator, color: "#5c6166" },
    { tag: t.className, color: "#5c6166" },
    { tag: t.definition(t.typeName), color: "#5c6166" },
    { tag: t.typeName, color: "#5c6166" },
    { tag: t.angleBracket, color: "#5c6166" },
    { tag: t.tagName, color: "#5c6166" },
    { tag: t.attributeName, color: "#5c6166" },
    { tag: t.heading1, fontWeight: "bold", fontSize: "2.5rem" },
    { tag: t.heading2, fontWeight: "bold", fontSize: "2rem" },
    { tag: t.heading3, fontWeight: "bold", fontSize: "1.17em" },
    { tag: t.heading4, fontWeight: "bold", fontSize: "1em" },
    { tag: t.heading5, fontWeight: "bold", fontSize: ".83em" },
    { tag: t.heading6, fontWeight: "bold", fontSize: ".67em" },
    { tag: t.strong, fontWeight: "bold" },
    { tag: t.typeName, color: "#5c6370" },
    { tag: t.quote, color: "#5c6370" },
    { tag: t.blockComment, color: "#5c6370" },
    { tag: t.bracket, color: "#5c6370" },
  ],
});
@brgndyy brgndyy closed this as completed Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant