forked from neokry/noun-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
109 lines (107 loc) · 4.52 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
const defaultTheme = require("tailwindcss/defaultTheme");
function withOpacity(variableName) {
return ({ opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(${variableName}), ${opacityValue})`;
}
return `rgb(var(${variableName}))`;
};
}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
colors: {
skin: {
base: withOpacity("--color-text-base"),
muted: withOpacity("--color-text-muted"),
inverted: withOpacity("--color-text-inverted"),
},
},
textColor: {
skin: {
base: withOpacity("--color-text-base"),
muted: withOpacity("--color-text-muted"),
inverted: withOpacity("--color-text-inverted"),
highlighted: withOpacity("--color-text-highlighted"),
"proposal-success": withOpacity("--color-proposal-success"),
"proposal-danger": withOpacity("--color-proposal-danger"),
"proposal-muted": withOpacity("--color-proposal-muted"),
"proposal-highlighted": withOpacity("--color-proposal-highlighted"),
},
},
backgroundColor: {
skin: {
fill: withOpacity("--color-fill"),
muted: withOpacity("--color-muted"),
backdrop: withOpacity("--color-backdrop"),
"button-accent": withOpacity("--color-button-accent"),
"button-accent-hover": withOpacity("--color-button-accent-hover"),
"button-muted": withOpacity("--color-button-muted"),
"proposal-success": withOpacity("--color-proposal-success"),
"proposal-danger": withOpacity("--color-proposal-danger"),
"proposal-muted": withOpacity("--color-proposal-muted"),
"proposal-highlighted": withOpacity("--color-proposal-highlighted"),
},
},
borderColor: {
skin: {
stroke: withOpacity("--color-stroke"),
},
},
gradientColorStops: {
skin: {
hue: withOpacity("--color-fill"),
},
},
fontFamily: {
heading: ["var(--font-heading)", ...defaultTheme.fontFamily.sans],
body: ["var(--font-body)", ...defaultTheme.fontFamily.sans],
},
typography: ({ theme }) => ({
skin: {
css: {
"--tw-prose-body": theme("colors.skin.muted"),
"--tw-prose-headings": theme("colors.skin.base"),
"--tw-prose-lead": theme("colors.skin.muted"),
"--tw-prose-links": theme("colors.skin.muted"),
"--tw-prose-bold": theme("colors.skin.base"),
"--tw-prose-counters": theme("colors.skin.muted"),
"--tw-prose-counters": theme("colors.skin.muted"),
"--tw-prose-bullets": theme("colors.skin.muted"),
"--tw-prose-hr": theme("colors.skin.muted"),
"--tw-prose-quotes": theme("colors.skin.muted"),
"--tw-prose-quote-borders": theme("colors.skin.muted"),
"--tw-prose-captions": theme("colors.skin.muted"),
"--tw-prose-code": theme("colors.skin.muted"),
"--tw-prose-pre-code": theme("colors.skin.muted"),
"--tw-prose-pre-bg": theme("colors.skin.muted"),
"--tw-prose-th-borders": theme("colors.skin.muted"),
"--tw-prose-td-borders": theme("colors.skin.muted"),
"--tw-prose-invert-body": theme("colors.skin.muted"),
"--tw-prose-invert-headings": theme("colors.skin.muted"),
"--tw-prose-invert-lead": theme("colors.skin.muted"),
"--tw-prose-invert-links": theme("colors.skin.muted"),
"--tw-prose-invert-bold": theme("colors.skin.muted"),
"--tw-prose-invert-counters": theme("colors.skin.muted"),
"--tw-prose-invert-bullets": theme("colors.skin.muted"),
"--tw-prose-invert-hr": theme("colors.skin.muted"),
"--tw-prose-invert-quotes": theme("ccolors.skin.muted"),
"--tw-prose-invert-quote-borders": theme("colors.skin.muted"),
"--tw-prose-invert-captions": theme("colors.skin.muted"),
"--tw-prose-invert-code": theme("colors.skin.muted"),
"--tw-prose-invert-pre-code": theme("colors.skin.muted"),
"--tw-prose-invert-pre-bg": "rgb(0 0 0 / 50%)",
"--tw-prose-invert-th-borders": theme("colors.skin.muted"),
"--tw-prose-invert-td-borders": theme("colors.skin.muted"),
},
},
}),
},
},
plugins: [require("@tailwindcss/typography")],
};