md/tailwind.config.js

90 lines
2.5 KiB
JavaScript
Raw Normal View History

2024-08-20 12:39:32 +08:00
const animate = require(`tailwindcss-animate`)
2024-08-18 19:49:16 +08:00
/** @type {import('tailwindcss').Config} */
module.exports = {
2024-08-20 12:39:32 +08:00
darkMode: [`class`],
safelist: [`dark`],
prefix: ``,
2024-08-18 19:49:16 +08:00
experimental: {
optimizeUniversalDefaults: true,
},
content: [
2024-08-20 12:39:32 +08:00
`./pages/**/*.{ts,tsx,vue}`,
`./components/**/*.{ts,tsx,vue}`,
`./app/**/*.{ts,tsx,vue}`,
`./src/**/*.{ts,tsx,vue}`,
],
2024-08-18 19:49:16 +08:00
theme: {
extend: {
colors: {
2024-08-20 12:39:32 +08:00
border: `hsl(var(--border))`,
input: `hsl(var(--input))`,
ring: `hsl(var(--ring))`,
background: `hsl(var(--background))`,
foreground: `hsl(var(--foreground))`,
2024-08-18 19:49:16 +08:00
primary: {
2024-08-20 12:39:32 +08:00
DEFAULT: `hsl(var(--primary))`,
foreground: `hsl(var(--primary-foreground))`,
2024-08-18 19:49:16 +08:00
},
secondary: {
2024-08-20 12:39:32 +08:00
DEFAULT: `hsl(var(--secondary))`,
foreground: `hsl(var(--secondary-foreground))`,
2024-08-18 19:49:16 +08:00
},
destructive: {
2024-08-20 12:39:32 +08:00
DEFAULT: `hsl(var(--destructive))`,
foreground: `hsl(var(--destructive-foreground))`,
2024-08-18 19:49:16 +08:00
},
muted: {
2024-08-20 12:39:32 +08:00
DEFAULT: `hsl(var(--muted))`,
foreground: `hsl(var(--muted-foreground))`,
2024-08-18 19:49:16 +08:00
},
accent: {
2024-08-20 12:39:32 +08:00
DEFAULT: `hsl(var(--accent))`,
foreground: `hsl(var(--accent-foreground))`,
2024-08-18 19:49:16 +08:00
},
popover: {
2024-08-20 12:39:32 +08:00
DEFAULT: `hsl(var(--popover))`,
foreground: `hsl(var(--popover-foreground))`,
2024-08-18 19:49:16 +08:00
},
card: {
2024-08-20 12:39:32 +08:00
DEFAULT: `hsl(var(--card))`,
foreground: `hsl(var(--card-foreground))`,
2024-08-18 19:49:16 +08:00
},
},
borderRadius: {
2024-08-20 12:39:32 +08:00
xl: `calc(var(--radius) + 4px)`,
lg: `var(--radius)`,
md: `calc(var(--radius) - 2px)`,
sm: `calc(var(--radius) - 4px)`,
2024-08-18 19:49:16 +08:00
},
keyframes: {
2024-08-20 12:39:32 +08:00
'accordion-down': {
2024-08-18 19:49:16 +08:00
from: { height: 0 },
2024-08-20 12:39:32 +08:00
to: { height: `var(--radix-accordion-content-height)` },
2024-08-18 19:49:16 +08:00
},
2024-08-20 12:39:32 +08:00
'accordion-up': {
from: { height: `var(--radix-accordion-content-height)` },
2024-08-18 19:49:16 +08:00
to: { height: 0 },
},
2024-08-20 12:39:32 +08:00
'collapsible-down': {
2024-08-18 19:49:16 +08:00
from: { height: 0 },
2024-08-20 12:39:32 +08:00
to: { height: `var(--radix-collapsible-content-height)` },
2024-08-18 19:49:16 +08:00
},
2024-08-20 12:39:32 +08:00
'collapsible-up': {
from: { height: `var(--radix-collapsible-content-height)` },
2024-08-18 19:49:16 +08:00
to: { height: 0 },
},
},
animation: {
2024-08-20 12:39:32 +08:00
'accordion-down': `accordion-down 0.2s ease-out`,
'accordion-up': `accordion-up 0.2s ease-out`,
'collapsible-down': `collapsible-down 0.2s ease-in-out`,
'collapsible-up': `collapsible-up 0.2s ease-in-out`,
2024-08-18 19:49:16 +08:00
},
},
},
plugins: [animate],
}