-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.mjs
141 lines (134 loc) · 3.48 KB
/
tailwind.config.mjs
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/* eslint-disable @typescript-eslint/no-var-requires */
const { fontFamily } = require('tailwindcss/defaultTheme');
const colors = require('tailwindcss/colors');
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
/** @type {import('tailwindcss').Config} */
export default {
mode: 'jit',
purge: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {
fontFamily: {
primary: ['AlbertSans', ...fontFamily.sans],
display: ['PlayfairBold', ...fontFamily.sans],
code: ['DMMono', ...fontFamily.sans],
},
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
colors: {
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
border: 'hsl(var(--border))',
'accent-blue': 'hsl(210, 100%, 75%)',
},
keyframes: {
slide: {
'0%, 13.33%': {
transform: 'translateY(0%)',
},
'16.66%, 30%': {
transform: 'translateY(-14.28%)',
},
'33.33%, 46.66%': {
transform: 'translateY(-28.57%)',
},
'50%, 63.33%': {
transform: 'translateY(-42.85%)',
},
'66.66%, 80%': {
transform: 'translateY(-57.14%)',
},
'83.33%, 96.66%': {
transform: 'translateY(-71.42%)',
},
'100%': {
transform: 'translateY(-85.71%)',
},
},
flicker: {
'0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100%': {
opacity: 0.99,
filter:
'drop-shadow(0 0 1px rgba(252, 211, 77)) drop-shadow(0 0 15px rgba(245, 158, 11)) drop-shadow(0 0 1px rgba(252, 211, 77))',
},
'20%, 21.999%, 63%, 63.999%, 65%, 69.999%': {
opacity: 0.4,
filter: 'none',
},
},
tilt: {
'0%, 50%, 100%': {
transform: 'rotate(0deg)',
},
'25%': {
transform: 'rotate(0.5deg)',
},
'75%': {
transform: 'rotate(-0.5deg)',
},
},
flip: {
to: {
transform: "rotate(360deg)",
},
},
rotate: {
to: {
transform: "rotate(90deg)",
},
},
spotlight: {
"0%": {
opacity: 0,
transform: "translate(-72%, -62%) scale(0.5)",
},
"100%": {
opacity: 1,
transform: "translate(-50%,-40%) scale(1)",
},
},
},
animation: {
flicker: 'flicker 3s linear infinite',
tilt: 'tilt 10s infinite linear',
flip: "flip 6s infinite steps(2, end)",
rotate: "rotate 3s linear infinite both",
spotlight: "spotlight 2s ease .75s 1 forwards",
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
require('tailwindcss-text-fill-stroke'),
addVariablesForColors,
],
}
// This plugin adds each Tailwind color as a global CSS variable, e.g. var(--gray-200).
function addVariablesForColors({ addBase, theme }) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
":root": newVars,
});
}