This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtailwind.config.js
76 lines (75 loc) · 1.96 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
const defaultTheme = require("tailwindcss/defaultTheme");
const plugin = require("tailwindcss/plugin");
/** @type {import('tailwindcss').Config} */
module.exports = {
mode: "jit",
content: [
"./src/pages/**/*.{js,ts,jsx,tsx}",
"./src/components/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
fontFamily: {
// sans: ["Inter var", ...defaultTheme.fontFamily.sans],
sans: ["Inter var", ...defaultTheme.fontFamily.serif],
chinese: ["Ma Shan Zheng", ...defaultTheme.fontFamily.serif],
},
keyframes: {
gshift: {
"0%": {
backgroundPosition: "0% 50%",
rotateZ: "rotateX(0deg)",
},
"100%": {
backgroundPosition: "0% 50%",
rotateZ: "rotateX(180deg)",
},
"50%": {
backgroundPosition: "100% 50%",
transform: "rotateX(0deg)",
},
},
shine: {
"0%": {
opacity: "0",
left: "-100%",
},
"50%": {
opacity: "0.5",
left: "0%",
},
"100%": {
opacity: "0",
left: "100%",
},
},
},
animation: {
gshift: "gshift 7.5s ease-in-out infinite",
shine: "shine 0.75s linear 1",
},
backgroundSize: {
500: "300%",
},
},
},
plugins: [
plugin(function ({ addVariant, e, postcss }) {
addVariant("firefox", ({ container, separator }) => {
const isFirefoxRule = postcss.atRule({
name: "-moz-document",
params: "url-prefix()",
});
isFirefoxRule.append(container.nodes);
container.append(isFirefoxRule);
isFirefoxRule.walkRules((rule) => {
rule.selector = `.${e(
`firefox${separator}${rule.selector.slice(1)}`
)}`;
});
});
}),
require("@tailwindcss/forms"),
require("@tailwindcss/typography"),
],
};