-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
51 lines (49 loc) · 1.75 KB
/
tailwind.config.ts
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
import type { Config } from "tailwindcss";
import plugin from "tailwindcss/plugin";
const config: Config = {
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
theme: {
extend: {
colors: {
// Define colors so e.g. you can use "text-primary" in your CSS
primary: "var(--primary)",
secondary: "var(--secondary)",
primaryActive: "var(--primary-active)",
secondaryActive: "var(--secondary-active)",
body1: "var(--body1)",
body2: "var(--body2)",
headings: "var(--headings)",
},
},
},
plugins: [
plugin(function ({ addBase, addUtilities }) {
addBase({
/**
* BASE TEXT STYLES
*/
h1: { fontSize: "32px", fontWeight: "bold" },
h2: { fontSize: "24px", fontWeight: "bold" },
h3: { fontSize: "20px", fontWeight: "bold" },
h4: { fontSize: "16px", fontWeight: "bold" },
p: { fontSize: "14px", color: "var(--body1)" },
}),
addUtilities({
/**
* CUSTOM TEXT STYLES
*/
".body1": {
fontSize: "14px",
color: "var(--body1)",
},
".body2": {
// Not necessary here, just demonstrating how to use custom font loaded in fonts.ts
fontFamily: "var(--font-open-sans)",
fontSize: "12px",
color: "var(--body2)",
},
});
}),
],
};
export default config;