-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.cjs
51 lines (46 loc) · 1.1 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
/** @type {import('tailwindcss').Config} */
const defaultTheme = require("tailwindcss/defaultTheme");
function remToEm(str) {
return `${str.split("rem").shift()}em`;
}
const spacing_em = Object.fromEntries(
Object.entries(defaultTheme.spacing)
.filter(([_, v]) => {
return v.includes("rem");
})
.map(([k, v]) => {
return [`${k}-em`, remToEm(v)];
})
);
const fontSize_em = Object.fromEntries(
Object.entries(defaultTheme.fontSize).map(([k, v]) => {
return [
`${k}-em`,
[
remToEm(v[0]),
v[1].lineHeight.includes("rem")
? { lineHeight: remToEm(v[1].lineHeight) }
: v[1],
],
];
})
);
module.exports = {
content: ["./index.html", "./src/**/*.{js,ts,svelte}"],
theme: {
extend: {
colors: {
"zinc-950": "rgb(12, 12, 13)",
"zinc-850": "rgb(32, 32, 34)",
"zinc-750": "rgb(51, 51, 56)",
"zinc-650": "rgb(73, 73, 81)",
},
boxShadow: {
xs: "0 1px 1px 0 rgb(0 0 0 / 0.05)",
},
spacing: spacing_em,
fontSize: fontSize_em,
},
},
plugins: [],
};