Skip to content

Commit 865f2f0

Browse files
krsntnkitten
andcommitted
Update github.js (#100)
more closer match to github theme Co-authored-by: Phil Pluckthun <[email protected]>
1 parent 8ddafda commit 865f2f0

File tree

1 file changed

+121
-30
lines changed

1 file changed

+121
-30
lines changed

src/themes/github.js

Lines changed: 121 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,76 +3,167 @@
33

44
import type { PrismTheme } from "../types";
55

6-
var theme: PrismTheme = {
6+
var theme = {
77
plain: {
8-
color: "#393A34",
8+
color: "rgb(36, 41, 46)",
99
backgroundColor: "#f6f8fa",
1010
},
1111
styles: [
1212
{
13-
types: ["comment", "prolog", "doctype", "cdata"],
13+
types: ["prolog"],
1414
style: {
15-
color: "#999988",
16-
fontStyle: "italic",
15+
color: "rgb(0, 0, 128)",
1716
},
1817
},
1918
{
20-
types: ["namespace"],
19+
types: ["comment"],
2120
style: {
22-
opacity: 0.7,
21+
color: "rgb(106, 153, 85)",
2322
},
2423
},
2524
{
26-
types: ["string", "attr-value"],
25+
types: ["builtin", "changed", "keyword"],
2726
style: {
27+
color: "rgb(215, 58, 73)",
2828
color: "#e3116c",
2929
},
3030
},
31+
{
32+
types: ["inserted-sign", "inserted"],
33+
style: {
34+
backgroundColor: "rgb(240, 255, 244)",
35+
color: "rgb(34, 134, 58)",
36+
},
37+
},
38+
{
39+
types: ["constant"],
40+
style: {
41+
color: "rgb(100, 102, 149)",
42+
},
43+
},
44+
{
45+
types: ["attr-name", "variable"],
46+
style: {
47+
color: "rgb(156, 220, 254)",
48+
},
49+
},
50+
{
51+
types: ["deleted-sign", "deleted"],
52+
style: {
53+
backgroundColor: "rgb(255, 238, 240)",
54+
color: "rgb(179, 29, 40)",
55+
},
56+
},
57+
{
58+
types: ["selector"],
59+
style: {
60+
color: "rgb(215, 186, 125)",
61+
},
62+
},
63+
{
64+
// Fix tag color
65+
types: ["tag"],
66+
style: {
67+
color: "rgb(78, 201, 176)",
68+
},
69+
},
70+
{
71+
// Fix tag color for HTML
72+
types: ["tag"],
73+
languages: ["markup"],
74+
style: {
75+
color: "rgb(86, 156, 214)",
76+
},
77+
},
3178
{
3279
types: ["punctuation", "operator"],
3380
style: {
34-
color: "#393A34",
81+
color: "rgb(36, 41, 46)",
82+
},
83+
},
84+
{
85+
types: ["operator"],
86+
style: {
87+
color: "rgb(0, 92, 197)",
88+
},
89+
},
90+
{
91+
types: ["boolean"],
92+
style: {
93+
color: "rgb(0, 92, 197)",
94+
},
95+
},
96+
{
97+
// Fix punctuation color for HTML
98+
types: ["punctuation"],
99+
languages: ["markup"],
100+
style: {
101+
color: "#808080",
102+
},
103+
},
104+
{
105+
types: ["function"],
106+
style: {
107+
color: "rgb(111, 66, 193)",
108+
},
109+
},
110+
{
111+
types: ["class-name"],
112+
style: {
113+
color: "rgb(78, 201, 176)",
114+
},
115+
},
116+
{
117+
types: ["known-class-name", "class-name"],
118+
style: {
119+
color: "rgb(227, 98, 9)",
120+
},
121+
},
122+
{
123+
types: ["char"],
124+
style: {
125+
color: "rgb(209, 105, 105)",
126+
},
127+
},
128+
{
129+
types: ["property-access"],
130+
style: {
131+
color: "rgb(0, 92, 197)",
35132
},
36133
},
37134
{
38-
types: [
39-
"entity",
40-
"url",
41-
"symbol",
42-
"number",
43-
"boolean",
44-
"variable",
45-
"constant",
46-
"property",
47-
"regex",
48-
"inserted",
49-
],
135+
types: ["method", "function", "property-access"],
50136
style: {
51-
color: "#36acaa",
137+
color: "rgb(111, 66, 193)",
52138
},
53139
},
54140
{
55-
types: ["atrule", "keyword", "attr-name", "selector"],
141+
languages: ["json"],
142+
types: ["property"],
56143
style: {
57-
color: "#00a4db",
144+
color: "rgb(3, 47, 98)",
58145
},
59146
},
60147
{
61-
types: ["function", "deleted", "tag"],
148+
languages: ["json"],
149+
types: ["string"],
62150
style: {
63-
color: "#d73a49",
151+
color: "rgb(3, 47, 98)",
64152
},
65153
},
66154
{
67-
types: ["function-variable"],
155+
languages: ["json"],
156+
types: ["number"],
68157
style: {
69-
color: "#6f42c1",
158+
color: "rgb(0, 92, 197)",
70159
},
71160
},
72161
{
73-
types: ["tag", "selector", "keyword"],
162+
languages: ["json"],
163+
types: ["comment"],
74164
style: {
75-
color: "#00009f",
165+
backgroundColor: "rgb(179, 29, 40)",
166+
color: "rgb(250, 251, 252)",
76167
},
77168
},
78169
],

0 commit comments

Comments
 (0)