-
Notifications
You must be signed in to change notification settings - Fork 265
/
Copy pathtailwind.config.ts
87 lines (77 loc) · 2.45 KB
/
tailwind.config.ts
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
import type { Config } from 'tailwindcss';
import colors from 'tailwindcss/colors';
const sidebarWidth = '2.5rem'; // 40px
const config: Config = {
content: ['./src/**/*.js', './src/**/*.ts', './src/**/*.tsx'],
darkMode: ['class', '[data-color-mode="dark"]'], // GitHub Primer Theme Provider color mode custom selector
theme: {
extend: {
fontSize: {
xxs: '0.625rem', // 10px
},
spacing: {
sidebar: sidebarWidth,
},
width: {
sidebar: sidebarWidth,
},
colors: {
gitify: {
font: 'var(--fgColor-default)',
background: 'var(--bgColor-muted)',
sidebar: '#24292e',
footer: 'var(--bgColor-neutral-muted)',
caution: colors.orange[600],
error: 'var(--fgColor-danger)',
link: 'var(--fgColor-link)',
input: {
rest: 'var(--control-bgColor-rest)',
focus: 'var(--control-bgColor-active)',
},
icon: {
attention: 'var(--fgColor-attention)',
closed: 'var(--fgColor-closed)',
done: 'var(--fgColor-done)',
muted: 'var(--fgColor-muted)',
open: 'var(--fgColor-open)',
},
accounts: 'var(--bgColor-neutral-muted)',
account: {
rest: 'var(--control-bgColor-active)',
error: 'var(--bgColor-danger-emphasis)',
},
repository: 'var(--control-bgColor-disabled)',
notification: {
border: 'var(--borderColor-disabled)',
hover: 'var(--control-bgColor-hover)',
pill: {
hover: 'var(--control-bgColor-active)',
},
},
tooltip: {
icon: 'var(--fgColor-accent)',
popout: 'var(--bgColor-disabled)',
},
},
},
},
},
plugins: [
({ addBase }) => {
// TODO - ideally we would use GitHub Primer Design Tokens instead of TailwindCSS
addBase({
'[data-color-mode="light"]': {
'--gitify-scrollbar-track': colors.gray[100],
'--gitify-scrollbar-thumb': colors.gray[300],
'--gitify-scrollbar-thumb-hover': colors.gray[400],
},
'[data-color-mode="dark"]': {
'--gitify-scrollbar-track': colors.gray[900],
'--gitify-scrollbar-thumb': colors.gray[700],
'--gitify-scrollbar-thumb-hover': colors.gray[600],
},
});
},
],
};
export default config;