MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / darkTheme

Function darkTheme

app/utilities/codeMirrorTheme.ts:5–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { HighlightStyle, tags as t } from "@codemirror/highlight";
4
5export function darkTheme(): Extension {
6 const chalky = "#e5c07b",
7 coral = "#e06c75",
8 cyan = "#56b6c2",
9 invalid = "#ffffff",
10 ivory = "#abb2bf",
11 stone = "#7d8799",
12 malibu = "#61afef",
13 sage = "#98c379",
14 whiskey = "#d19a66",
15 violet = "#c678dd",
16 darkBackground = "#21252b",
17 highlightBackground = "rgba(234,179,8,0.3)",
18 background = "rgb(15,23,42)",
19 tooltipBackground = "#353a42",
20 selection = "#3E4451",
21 cursor = "#528bff";
22
23 const jsonHeroEditorTheme = EditorView.theme(
24 {
25 "&": {
26 color: ivory,
27 backgroundColor: background,
28 },
29
30 ".cm-content": {
31 caretColor: cursor,
32 fontFamily: "MonoLisa, monospace",
33 fontSize: "14px",
34 },
35
36 ".cm-cursor, .cm-dropCursor": { borderLeftColor: cursor },
37 "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":
38 { backgroundColor: selection },
39
40 ".cm-panels": { backgroundColor: darkBackground, color: ivory },
41 ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
42 ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
43
44 ".cm-searchMatch": {
45 backgroundColor: "#72a1ff59",
46 outline: "1px solid #457dff",
47 },
48 ".cm-searchMatch.cm-searchMatch-selected": {
49 backgroundColor: "#6199ff2f",
50 },
51
52 ".cm-activeLine": { backgroundColor: highlightBackground },
53 ".cm-selectionMatch": { backgroundColor: "#aafe661a" },
54
55 "&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket": {
56 backgroundColor: "#bad0f847",
57 outline: "1px solid #515a6b",
58 },
59
60 ".cm-gutters": {
61 backgroundColor: background,
62 color: stone,

Callers 3

JsonPreviewFunction · 0.90
CodeViewerFunction · 0.90
CodeEditorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected