forked from outline/rich-markdown-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.js
94 lines (82 loc) · 2.32 KB
/
theme.js
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
88
89
90
91
92
93
94
// @flow
import type { Theme } from "./types";
const colors = {
almostBlack: "#181A1B",
lightBlack: "#2F3336",
almostWhite: "#E6E6E6",
white: "#FFF",
white10: "rgba(255, 255, 255, 0.1)",
black: "#000",
black10: "rgba(0, 0, 0, 0.1)",
primary: "#1AB6FF",
greyLight: "#F4F7FA",
grey: "#E8EBED",
greyMid: "#9BA6B2",
greyDark: "#DAE1E9",
};
export const base = {
...colors,
fontFamily:
"-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen, Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif",
fontFamilyMono:
"'SFMono-Regular',Consolas,'Liberation Mono', Menlo, Courier,monospace",
fontWeight: 400,
link: colors.primary,
placeholder: "#B1BECC",
textSecondary: "#4E5C6E",
textLight: colors.white,
selected: colors.primary,
codeComment: "#6a737d",
codePunctuation: "#5e6687",
codeNumber: "#d73a49",
codeProperty: "#c08b30",
codeTag: "#3d8fd1",
codeString: "#032f62",
codeSelector: "#6679cc",
codeAttr: "#c76b29",
codeEntity: "#22a2c9",
codeKeyword: "#d73a49",
codeFunction: "#6f42c1",
codeStatement: "#22a2c9",
codePlaceholder: "#3d8fd1",
codeInserted: "#202746",
codeImportant: "#c94922",
};
export const light: Theme = {
...base,
background: "transparent",
text: colors.almostBlack,
code: colors.lightBlack,
toolbarBackground: colors.lightBlack,
toolbarInput: colors.white10,
toolbarItem: colors.white,
blockToolbarBackground: colors.greyLight,
blockToolbarTrigger: colors.greyMid,
blockToolbarTriggerIcon: colors.white,
blockToolbarItem: colors.almostBlack,
quote: colors.greyDark,
codeBackground: colors.greyLight,
codeBorder: colors.grey,
horizontalRule: colors.grey,
imageErrorBackground: colors.greyLight,
};
export const dark: Theme = {
...base,
background: colors.almostBlack,
text: colors.almostWhite,
code: colors.almostWhite,
toolbarBackground: colors.white,
toolbarInput: colors.black10,
toolbarItem: colors.lightBlack,
blockToolbarBackground: colors.white,
blockToolbarTrigger: colors.almostWhite,
blockToolbarTriggerIcon: colors.almostBlack,
blockToolbarItem: colors.lightBlack,
quote: colors.almostWhite,
codeBackground: colors.almostBlack,
codeBorder: colors.lightBlack,
codeString: "#3d8fd1",
horizontalRule: colors.almostWhite,
imageErrorBackground: "rgba(0, 0, 0, 0.5)",
};
export default light;