Files
kami_apple_exchage/frontend/tailwind.config.js
danial 1cc36f49df refactor: update PostCSS and Tailwind CSS configuration for improved module exports
- Changed PostCSS configuration to use default export syntax.
- Updated layout to import global CSS and main SASS files.
- Added new global CSS file for Tailwind directives.
- Created main SASS file with Apple design guidelines and Tailwind integration.
- Modified Tailwind configuration to use ES module export.
2025-09-10 20:51:43 +08:00

139 lines
5.2 KiB
JavaScript

/** @type {import('tailwindcss').Config} */
import animate from "tailwindcss-animate";
export default {
darkMode: ["class"],
content: [
"./src/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
container: {
center: true,
padding: "1rem",
screens: {
"2xl": "1600px",
"3xl": "1920px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
hover: "hsl(var(--primary-hover))",
active: "hsl(var(--primary-active))",
focus: "hsl(var(--primary-focus))",
disabled: "hsl(var(--primary-disabled))",
text: "hsl(var(--primary-text))",
border: "hsl(var(--primary-border))",
background: "hsl(var(--primary-background))",
shadow: "hsl(var(--primary-shadow))",
gradient: "hsl(var(--primary-gradient))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
// 苹果风格色彩
apple: {
blue: "#007AFF",
indigo: "#5856D6",
purple: "#AF52DE",
teal: "#5AC8FA",
green: "#34C759",
yellow: "#FFCC00",
orange: "#FF9500",
red: "#FF3B30",
gray: {
50: "#F2F2F7",
100: "#E5E5EA",
200: "#D1D1D6",
300: "#C7C7CC",
400: "#AEAEB2",
500: "#8E8E93",
600: "#636366",
700: "#48484A",
800: "#3A3A3C",
900: "#1C1C1E",
},
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
xs: "calc(var(--radius) - 6px)",
},
radius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
xs: "calc(var(--radius) - 6px)",
},
// 苹果风格阴影系统
boxShadow: {
'apple-sm': '0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)',
'apple': '0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23)',
'apple-lg': '0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22)',
'apple-xl': '0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22)',
},
// 背景模糊效果
backdropBlur: {
'xs': '2px',
'apple': '12px',
'apple-lg': '20px',
},
keyframes: {
"accordion-down": {
from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 },
},
// 苹果风格动画
"apple-bounce": {
"0%, 100%": { transform: "translateY(0)" },
"50%": { transform: "translateY(-4px)" },
},
"apple-scale": {
"0%, 100%": { transform: "scale(1)" },
"50%": { transform: "scale(1.05)" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
"apple-bounce": "apple-bounce 2s ease-in-out infinite",
"apple-scale": "apple-scale 0.3s ease-in-out",
},
},
},
plugins: [animate],
}