-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.config.js
92 lines (92 loc) · 2.03 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
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./index.html", "./src/**/*.tsx"],
theme: {
fontFamily: {
"sweet-sans": ["Sweet Sans Pro", "system-ui", "sans-serif"],
},
fontMetrics: {
"Sweet Sans Pro": {
capHeight: 653,
ascent: 770,
descent: -230,
unitsPerEm: 1000,
},
},
fontWeight: {
normal: 400,
medium: 500,
bold: 700,
},
colors: {
transparent: "transparent",
current: "currentColor",
matcha: {
DEFAULT: "#00473A",
80: "#336C61",
60: "#669189",
40: "#99B5B0",
20: "#CCDAD8",
},
pepper: {
DEFAULT: "#0D170F",
80: "#3D453F",
60: "#6E746F",
40: "#9EA29F",
20: "#CFD1CF",
},
walnut: {
DEFAULT: "#42312B",
80: "#685A55",
60: "#8E8380",
40: "#B4ADAA",
20: "#D9D6D5",
},
grain: "#EFE3D7",
},
// This needs to be specified manually, not in `extends`, or else `xs` will be sorted after `2xl and therefore
// take precedence in the generated CSS file.
screens: {
"xs": "385px",
"sm": "640px",
"md": "768px",
"lg": "1024px",
"xl": "1280px",
"2xl": "1536px",
"tall": { raw: "(min-height: 900px)" },
},
extend: {
spacing: {
unset: "unset",
},
typography: ({ theme }) => ({
DEFAULT: {
css: {
"--tw-prose-body": theme("colors.walnut.DEFAULT"),
"--tw-prose-headings": theme("colors.matcha.DEFAULT"),
"--tw-prose-lead": theme("colors.matcha.DEFAULT"),
"--tw-prose-links": theme("colors.matcha.DEFAULT"),
"--tw-prose-bullets": theme("colors.matcha.DEFAULT"),
"h4": {
// prose-h4:leading-10
"lineHeight": "2.5rem",
"--leading-offset": "calc((2.5rem - 1em) / -2)",
},
},
},
}),
},
},
safelist: [
{
pattern: /[a-zA-Z]+-(matcha|pepper|walnut|grain)(-[0-9]+)*/,
variants: ["hover", "focus", "active", "disabled"],
},
],
plugins: [
require("@tailwindcss/typography"),
require("@tailwindcss/forms"),
require("@tailwindcss/line-clamp"),
require("tailwindcss-leading-trim"),
],
};