Skip to content

Commit f5e607c

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

File tree

1 file changed

+123
-32
lines changed

1 file changed

+123
-32
lines changed

src/themes/github.js

Lines changed: 123 additions & 32 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",
9-
backgroundColor: "#f6f8fa",
8+
color: 'rgb(36, 41, 46)',
9+
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
},
3131
{
32-
types: ["punctuation", "operator"],
32+
types: ['inserted-sign', 'inserted'],
3333
style: {
34-
color: "#393A34",
34+
backgroundColor: 'rgb(240, 255, 244)',
35+
color: 'rgb(34, 134, 58)',
3536
},
3637
},
3738
{
38-
types: [
39-
"entity",
40-
"url",
41-
"symbol",
42-
"number",
43-
"boolean",
44-
"variable",
45-
"constant",
46-
"property",
47-
"regex",
48-
"inserted",
49-
],
39+
types: ['constant'],
5040
style: {
51-
color: "#36acaa",
41+
color: 'rgb(100, 102, 149)',
5242
},
5343
},
5444
{
55-
types: ["atrule", "keyword", "attr-name", "selector"],
45+
types: ['attr-name', 'variable'],
5646
style: {
57-
color: "#00a4db",
47+
color: 'rgb(156, 220, 254)',
5848
},
5949
},
6050
{
61-
types: ["function", "deleted", "tag"],
51+
types: ['deleted-sign', 'deleted'],
6252
style: {
63-
color: "#d73a49",
53+
backgroundColor: 'rgb(255, 238, 240)',
54+
color: 'rgb(179, 29, 40)',
6455
},
6556
},
6657
{
67-
types: ["function-variable"],
58+
types: ['selector'],
6859
style: {
69-
color: "#6f42c1",
60+
color: 'rgb(215, 186, 125)',
7061
},
7162
},
7263
{
73-
types: ["tag", "selector", "keyword"],
64+
// Fix tag color
65+
types: ['tag'],
7466
style: {
75-
color: "#00009f",
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+
},
78+
{
79+
types: ['punctuation', 'operator'],
80+
style: {
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)',
132+
},
133+
},
134+
{
135+
types: ['method', 'function', 'property-access'],
136+
style: {
137+
color: 'rgb(111, 66, 193)',
138+
},
139+
},
140+
{
141+
languages: ['json'],
142+
types: ['property'],
143+
style: {
144+
color: 'rgb(3, 47, 98)',
145+
},
146+
},
147+
{
148+
languages: ['json'],
149+
types: ['string'],
150+
style: {
151+
color: 'rgb(3, 47, 98)',
152+
},
153+
},
154+
{
155+
languages: ['json'],
156+
types: ['number'],
157+
style: {
158+
color: 'rgb(0, 92, 197)',
159+
},
160+
},
161+
{
162+
languages: ['json'],
163+
types: ['comment'],
164+
style: {
165+
backgroundColor: 'rgb(179, 29, 40)',
166+
color: 'rgb(250, 251, 252)',
76167
},
77168
},
78169
],

0 commit comments

Comments
 (0)