-
Notifications
You must be signed in to change notification settings - Fork 19
/
tailwind.config.js
133 lines (132 loc) · 4.36 KB
/
tailwind.config.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
const colors = require('tailwindcss/colors');
module.exports = {
darkMode: ['class', '[data-jp-theme-light="false"]'],
content: [
'./src/**/*.{js,ts,jsx,tsx}',
'node_modules/myst-to-react/dist/**/*.{js,ts,jsx,tsx}',
'node_modules/@myst-theme/frontmatter/dist/**/*.{js,ts,jsx,tsx}',
// Occasionally look to these folders as well in development only
'.yalc/myst-to-react/dist/**/*.{js,ts,jsx,tsx}',
'.yalc/@myst-theme/frontmatter/dist/**/*.{js,ts,jsx,tsx}'
],
theme: {
extend: {
colors: {
primary: colors.blue,
success: colors.green[500]
},
// See https://github.com/tailwindlabs/tailwindcss-typography/blob/master/src/styles.js
typography: theme => ({
DEFAULT: {
css: {
fontSize: 'var(--jp-content-font-size1)',
color: 'var(--jp-content-font-color1)',
fontFamily: 'var(--jp-content-font-family)',
lineHeight: 'var(--jp-content-line-height)',
p: {
marginTop: 0,
marginBottom: '1em'
},
'h1,h2,h3,h4,h5,h6': {
lineHeight: 'var(--jp-content-heading-line-height, 1)',
fontWeight: 'var(--jp-content-heading-font-weight, 500)',
fontStyle: 'normal',
marginTop: 'var(--jp-content-heading-margin-top, 1.2em)',
marginBottom: 'var(--jp-content-heading-margin-bottom, 0.8em)'
},
'h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child,h6:first-child':
{
marginTop: 'calc(0.5 * var(--jp-content-heading-margin-top))'
},
'h1:last-child,h2:last-child,h3:last-child,h4:last-child,h5:last-child,h6:last-child':
{
marginBottom:
'calc(0.5 * var(--jp-content-heading-margin-bottom))'
},
h1: {
fontSize: 'var(--jp-content-font-size5)'
},
h2: {
fontSize: 'var(--jp-content-font-size4)'
},
h3: {
fontSize: 'var(--jp-content-font-size3)'
},
h4: {
fontSize: 'var(--jp-content-font-size2)'
},
h5: {
fontSize: 'var(--jp-content-font-size1)'
},
h6: {
fontSize: 'var(--jp-content-font-size0)'
},
code: {
fontWeight: 'inherit',
color: 'var(--jp-content-font-color1)',
fontFamily: 'var(--jp-code-font-family)',
fontSize: 'inherit',
lineHeight: 'var(--jp-code-line-height)',
padding: 0,
whiteSpace: 'pre-wrap',
backgroundColor: 'var(--jp-layout-color2)',
padding: '1px 5px'
},
'code::before': {
content: ''
},
'code::after': {
content: ''
},
'blockquote p:first-of-type::before': { content: 'none' },
'blockquote p:first-of-type::after': { content: 'none' },
li: {
marginTop: '0.25rem',
marginBottom: '0.25rem'
},
a: {
textDecoration: 'none',
color: 'var(--jp-content-link-color, #1976d2)', // --md-blue-700
fontWeight: 400,
'&:hover': {
color: 'var(--jp-content-link-color, #1976d2)', // --md-blue-700
textDecoration: 'underline',
fontWeight: 400
}
},
'li > p, dd > p, header > p, footer > p': {
marginTop: '0.25rem',
marginBottom: '0.25rem'
}
}
},
stone: {
css: {
'--tw-prose-bullets': 'var(--jp-content-font-color1)'
}
}
}),
keyframes: {
load: {
'0%': { width: '0%' },
'100%': { width: '50%' }
},
fadeIn: {
'0%': { opacity: 0.0 },
'25%': { opacity: 0.25 },
'50%': { opacity: 0.5 },
'75%': { opacity: 0.75 },
'100%': { opacity: 1 }
}
},
animation: {
load: 'load 2.5s ease-out',
'fadein-fast': 'fadeIn 1s ease-out'
}
}
},
corePlugins: {
preflight: false
},
plugins: [require('@tailwindcss/typography')]
};