-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
48 lines (45 loc) · 1.53 KB
/
tailwind.config.js
File metadata and controls
48 lines (45 loc) · 1.53 KB
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
41
42
43
44
45
46
47
48
import flattenColorPaletteModule from "tailwindcss/lib/util/flattenColorPalette.js"
const flattenColorPalette = flattenColorPaletteModule.default || flattenColorPaletteModule
// Adds each Tailwind color as a CSS variable (e.g. var(--amber-500))
function addVariablesForColors({ addBase, theme }) {
const allColors = flattenColorPalette(theme("colors"))
const newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
)
addBase({ ":root": newVars })
}
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
fontFamily: {
sans: ['"Cormorant Garamond"', 'Georgia', 'serif'],
mono: ['JetBrains Mono', 'Fira Code', 'monospace'],
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
'flow': 'flow 2s ease-in-out infinite',
'fade-in': 'fade-in-up 0.5s ease-out both',
'border-beam': 'border-beam calc(var(--duration)*1s) infinite linear',
},
keyframes: {
'border-beam': {
'100%': { 'offset-distance': '100%' },
},
flow: {
'0%, 100%': { opacity: '0.4', transform: 'scale(1)' },
'50%': { opacity: '1', transform: 'scale(1.08)' },
},
'fade-in-up': {
from: { opacity: '0', transform: 'translateY(8px)' },
to: { opacity: '1', transform: 'translateY(0)' },
},
},
},
},
plugins: [addVariablesForColors],
}