forked from DARIAH-ERIC/dariah-campus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
153 lines (150 loc) · 4.16 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/* @ts-expect-error Missing module declaration. */
const colors = require('tailwindcss/colors')
const config = {
mode: 'jit',
purge: ['src/**/*.@(ts|tsx)'],
darkMode: false,
theme: {
extend: {
strokeWidth: {
3: '3',
},
boxShadow: {
sm: 'rgba(0, 0, 0, 0.08) 0px 2px 8px 0px',
md: 'rgba(0, 0, 0, 0.08) 0px 5px 15px 0px',
lg: 'rgba(0, 0, 0, 0.12) 0px 10px 35px 0px',
},
colors: {
error: colors.red,
neutral: {
...colors.trueGray,
150: '#ebecee',
},
primary: {
600: '#006699',
700: '#005580',
},
secondary: {
800: '#2c3547',
},
event: {
violet1: '#1e396c',
violet2: '#0870ac',
orange: '#ed6f59',
pink1: '#d5d8dc',
pink2: '#eaecee',
gray: '#f8f9f9',
darkgray: '#2c3547',
red: '#de1f4e',
},
},
fontFamily: {
sans: ['Roboto', 'system-ui', 'sans-serif'],
},
fontSize: {
'4.5xl': [px(40), { lineHeight: 1 }],
},
gridTemplateColumns: {
'content-layout': '1fr 720px 1fr',
'cards-layout': 'repeat(auto-fill, minmax(320px, 1fr))',
content: '1fr 80ch 1fr',
},
maxWidth: {
/** Character units `ch` change with font size, we just want a fixed width container. */
'80ch': '720px',
},
padding: {
'10vmin': '10vmin',
},
ringOffsetWidth: {
DEFAULT: '2px',
},
typography(/** @type {(key: string) => string} */ theme) {
return {
DEFAULT: {
css: {
/** Don't add quotes around `blockquote`. */
'blockquote p:first-of-type::before': null,
'blockquote p:last-of-type::after': null,
/** Don't add backticks around inline `code`. */
'code::before': null,
'code::after': null,
'overflow-wrap': 'break-word',
a: {
'&:focus': {
outline: 'none',
},
'&:focus-visible': {
borderRadius: theme('borderRadius.DEFAULT'),
color: theme('colors.primary.600'),
boxShadow: `white 0px 0px 0px 2px, ${theme(
'colors.primary.600',
)} 0px 0px 0px 5px`,
},
},
pre: {
/** Match `poimandres` theme. */
backgroundColor: '#1b1e28',
},
strong: {
color: 'inherit',
},
h2: {
fontSize: theme('fontSize.2xl')[0],
fontWeight: theme('fontWeight.bold'),
},
h3: {
fontSize: theme('fontSize.xl')[0],
fontWeight: theme('fontWeight.bold'),
},
h4: {
fontSize: theme('fontSize.lg')[0],
fontWeight: theme('fontWeight.bold'),
},
h5: {
fontSize: theme('fontSize.base')[0],
fontWeight: theme('fontWeight.bold'),
},
h6: {
fontSize: theme('fontSize.base')[0],
fontStyle: 'italic',
},
},
},
}
},
},
screens: {
'2xs': '360px',
xs: '480px',
sm: '640px',
md: '840px',
lg: '1048px',
xl: '1280px',
'2xl': '1440px',
'event-md': '55.125em',
'event-lg': '63.25em',
},
},
variants: {
extend: {
backgroundColor: ['focus-visible'],
ringColor: ['focus-visible'],
ringOffsetColor: ['focus-visible'],
ringOffsetWidth: ['focus-visible'],
ringWidth: ['focus-visible'],
textColor: ['focus-visible'],
},
},
plugins: [
/* @ts-expect-error Missing module declaration. */
require('@tailwindcss/typography'),
/** @ts-expect-error Missing module declaration. */
require('@tailwindcss/aspect-ratio'),
],
}
/** @type {(px: number) => string} */
function px(pixel) {
return `${pixel / 16}rem`
}
module.exports = config