-
Notifications
You must be signed in to change notification settings - Fork 19
/
tailwind.config.cjs
102 lines (102 loc) · 2.98 KB
/
tailwind.config.cjs
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
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [
require('@tailwindcss/container-queries'),
require('@tailwindcss/forms'),
function ({ addBase, theme }) {
addBase({
html: {
scrollBehavior: 'smooth',
},
// Basic links
a: {
textDecoration: 'underline',
textDecorationColor: theme('textColor.sky.500'),
textUnderlineOffset: theme('textUnderlineOffset.2'),
'&:hover': {
textDecoration: 'underline',
textDecorationColor: theme('textColor.sky.900'),
},
},
// Inverted links
'a.link-inverted, .box-inverted a': {
textDecorationColor: theme('textColor.sky.300'),
'&:hover': {
textDecorationColor: theme('textColor.sky.100'),
},
},
// Plain links - no underline or other decorations
'a.link-plain': {
textDecoration: 'inherit',
},
'.markdown': {
// Headings must match those in src/components/Heading.astro
'h2, h3': {
fontWeight: theme('fontWeight.black'),
marginBottom: theme('margin.1'),
'&:first-child': {
marginTop: 0,
},
},
h2: {
fontSize: theme('fontSize.2xl'),
lineHeight: theme('fontSize.2xl.1.lineHeight'),
marginTop: theme('margin.8.'),
},
h3: {
fontSize: theme('fontSize.xl'),
lineHeight: theme('fontSize.xl.1.lineHeight'),
marginTop: theme('margin.4'),
},
'p, blockquote, ul, ol': {
marginBottom: theme('margin.4'),
'&:last-child': {
marginBottom: 0,
},
},
ul: {
listStyleType: 'disc',
},
ol: {
listStyleType: 'decimal',
},
'ul, ol': {
listStylePosition: 'outside',
li: {
marginLeft: theme('margin.8'),
},
},
blockquote: {
borderLeft: `${theme('borderWidth.4')} solid ${theme(
'borderColor.sky.200',
)}`,
paddingTop: theme('padding.1'),
paddingBottom: theme('padding.1'),
paddingLeft: theme('padding.4'),
paddingRight: theme('padding.4'),
},
},
'.box-inverted': {
blockquote: {
borderLeftColor: theme('borderColor.sky.800'),
},
},
[`@media (min-width: ${theme('screens.md')})`]: {
// Headings must match those in src/components/Heading.astro
'.markdown': {
h2: {
fontSize: theme('fontSize.3xl'),
},
h3: {
fontSize: theme('fontSize.2xl'),
},
},
},
});
},
],
};