skillhub/web/tailwind.config.ts
XiaoSeS 195d1bded4 feat(frontend): refine shadcn UI foundations
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-10-14 19:53:39 +08:00

107 lines
3.4 KiB
TypeScript

import type { Config } from 'tailwindcss'
const config: Config = {
darkMode: ['class'],
content: ['./index.html', './src/**/*.{ts,tsx}'],
theme: {
extend: {
fontFamily: {
display: ['var(--font-sans)'],
heading: ['var(--font-sans)'],
sans: ['var(--font-sans)'],
mono: ['var(--font-mono)'],
},
borderRadius: {
lg: 'var(--radius)',
md: 'var(--radius)',
sm: 'calc(var(--radius) - 2px)',
xl: 'calc(var(--radius) + 4px)',
'2xl': 'calc(var(--radius) + 8px)',
},
colors: {
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
},
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
info: {
DEFAULT: 'hsl(var(--info))',
foreground: 'hsl(var(--info-foreground))',
},
success: {
DEFAULT: 'hsl(var(--success))',
foreground: 'hsl(var(--success-foreground))',
},
warning: {
DEFAULT: 'hsl(var(--warning))',
foreground: 'hsl(var(--warning-foreground))',
},
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
},
boxShadow: {
glow: '0 0 20px -5px hsl(var(--primary) / 0.3)',
'glow-lg': '0 0 40px -10px hsl(var(--primary) / 0.25)',
'card': '0 4px 24px -4px hsl(0 0% 0% / 0.15)',
'card-hover': '0 20px 40px -12px hsl(var(--primary) / 0.1), 0 8px 16px -8px hsl(0 0% 0% / 0.2)',
},
animation: {
'fade-up': 'fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both',
'fade-in': 'fade-in 0.5s ease both',
'slide-in-right': 'slide-in-right 0.5s cubic-bezier(0.16, 1, 0.3, 1) both',
'shimmer': 'shimmer 1.8s ease-in-out infinite',
'float': 'float 6s ease-in-out infinite',
},
keyframes: {
'fade-up': {
from: { opacity: '0', transform: 'translateY(20px)' },
to: { opacity: '1', transform: 'translateY(0)' },
},
'fade-in': {
from: { opacity: '0' },
to: { opacity: '1' },
},
'slide-in-right': {
from: { opacity: '0', transform: 'translateX(16px)' },
to: { opacity: '1', transform: 'translateX(0)' },
},
shimmer: {
'0%': { backgroundPosition: '-200% 0' },
'100%': { backgroundPosition: '200% 0' },
},
float: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-8px)' },
},
},
},
},
plugins: [],
}
export default config