-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtailwind.config.cjs
More file actions
40 lines (38 loc) · 907 Bytes
/
tailwind.config.cjs
File metadata and controls
40 lines (38 loc) · 907 Bytes
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
/** @type {import('tailwindcss').Config} */
const defaultTheme = require("tailwindcss/defaultTheme");
// 从 config.ts 导入屏幕断点配置
const screensConfig = {
sm: "568px",
md2: "726px",
md: "924px",
lg: "1400px",
xl: "1536px",
};
module.exports = {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue,mjs}"],
darkMode: "class", // allows toggling dark mode manually
safelist: [
// 确保动态生成的网格类名被包含在CSS中
"grid-cols-1",
"grid-cols-2",
"grid-cols-3",
"md2:grid-cols-1",
"md2:grid-cols-2",
"md2:grid-cols-3",
"md:grid-cols-1",
"md:grid-cols-2",
"md:grid-cols-3",
"lg:grid-cols-1",
"lg:grid-cols-2",
"lg:grid-cols-3",
],
theme: {
extend: {
fontFamily: {
sans: ["Roboto", "sans-serif", ...defaultTheme.fontFamily.sans],
},
screens: screensConfig,
},
},
plugins: [require("@tailwindcss/typography")],
};