-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgalleyTheme.js
More file actions
87 lines (85 loc) · 2.59 KB
/
Copy pathgalleyTheme.js
File metadata and controls
87 lines (85 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
const base = {
fontFamily:
'"IBM Plex Mono", "JetBrains Mono", Consolas, Monaco, monospace',
textAlign: 'left',
whiteSpace: 'pre',
wordSpacing: 'normal',
wordBreak: 'normal',
wordWrap: 'normal',
lineHeight: '1.65',
MozTabSize: '4',
OTabSize: '4',
tabSize: '4',
WebkitHyphens: 'none',
MozHyphens: 'none',
msHyphens: 'none',
hyphens: 'none',
};
const INK = '#1A1613';
const INK_SOFT = '#3A302A';
const COMMENT = '#8A7C68';
const KEYWORD = '#5C3A87';
const STRING = '#556B2F';
const NUMBER = '#8A3E1C';
const FUNCTION = '#1F4A78';
const CLASS = '#8A4A1B';
const CONSTANT = '#8A3E1C';
const OPERATOR = '#7A3020';
const TAG = '#5C3A87';
const BG = '#EDE3D2';
const SELECTION = 'rgba(201,100,66,0.28)';
export const galleyTheme = {
'code[class*="language-"]': {
...base,
color: INK,
background: 'none',
fontSize: '0.92em',
},
'pre[class*="language-"]': {
...base,
color: INK,
background: BG,
padding: '1em',
margin: '0.5em 0',
overflow: 'auto',
fontSize: '0.92em',
},
'pre[class*="language-"]::selection': { background: SELECTION },
'code[class*="language-"]::selection': { background: SELECTION },
'pre[class*="language-"] ::selection': { background: SELECTION },
'code[class*="language-"] ::selection': { background: SELECTION },
comment: { color: COMMENT, fontStyle: 'italic' },
prolog: { color: COMMENT, fontStyle: 'italic' },
doctype: { color: COMMENT, fontStyle: 'italic' },
cdata: { color: COMMENT, fontStyle: 'italic' },
punctuation: { color: INK_SOFT },
namespace: { opacity: '0.75' },
property: { color: CLASS },
tag: { color: TAG, fontWeight: '600' },
boolean: { color: NUMBER, fontWeight: '600' },
number: { color: NUMBER },
constant: { color: CONSTANT },
symbol: { color: CONSTANT },
deleted: { color: '#B14B2F' },
selector: { color: STRING },
'attr-name': { color: STRING },
string: { color: STRING },
char: { color: STRING },
builtin: { color: FUNCTION, fontWeight: '600' },
inserted: { color: STRING },
operator: { color: OPERATOR },
entity: { color: OPERATOR, cursor: 'help' },
url: { color: OPERATOR },
'.language-css .token.string': { color: STRING },
'.style .token.string': { color: STRING },
atrule: { color: KEYWORD },
'attr-value': { color: STRING },
keyword: { color: KEYWORD, fontWeight: '600' },
function: { color: FUNCTION, fontWeight: '600' },
'class-name': { color: CLASS, fontWeight: '600' },
regex: { color: KEYWORD },
important: { color: OPERATOR, fontWeight: 'bold' },
variable: { color: INK },
bold: { fontWeight: 'bold' },
italic: { fontStyle: 'italic' },
};