26 lines
854 B
TypeScript
26 lines
854 B
TypeScript
// File: frontend/tailwind.config.ts
|
|
// Description: Tailwind CSS 配置文件,启用基于系统偏好的暗色模式
|
|
|
|
import type { Config } from "tailwindcss";
|
|
|
|
const config: Config = {
|
|
content: [
|
|
"./pages/**/*.{js,ts,jsx,tsx,mdx}", // 如果有 pages 目录
|
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
"./app/**/*.{js,ts,jsx,tsx,mdx}", // 主要关注 app 目录
|
|
],
|
|
darkMode: "media", // <--- 关键:设置为 'media' 以跟随系统设置
|
|
theme: {
|
|
extend: {
|
|
// 你可以在这里扩展你的主题,例如添加自定义颜色、字体等
|
|
// backgroundImage: {
|
|
// "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
|
// "gradient-conic":
|
|
// "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
|
|
// },
|
|
},
|
|
},
|
|
plugins: [],
|
|
};
|
|
export default config;
|