-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtailwind.config.cjs
98 lines (94 loc) · 3.02 KB
/
tailwind.config.cjs
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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const radixColors = require('@radix-ui/colors');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { fontFamily } = require('tailwindcss/defaultTheme');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { createPlugin } = require('windy-radix-palette');
// -----------------------------------------------------------------------------
// Radix colors
// -----------------------------------------------------------------------------
const colors = createPlugin({
colors: {
gray: radixColors.grayDark,
red: radixColors.redDark,
yellow: radixColors.yellowDark,
green: radixColors.greenDark,
blue: radixColors.blueDark,
orange: radixColors.orangeDark,
},
opacitySupport: true,
});
// -----------------------------------------------------------------------------
// Tailwind configuration
// -----------------------------------------------------------------------------
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
'bg-pulse': 'bg-pulse 2.5s cubic-bezier(.23,.68,.36,.96)',
},
fontFamily: {
sans: ['var(--font-inter)', ...fontFamily.sans],
mono: ['var(--font-fira-code)', ...fontFamily.mono],
},
gridTemplateRows: {
1: 'repeat(1, minmax(0, 1fr))',
2: 'repeat(2, minmax(0, 1fr))',
3: 'repeat(3, minmax(0, 1fr))',
4: 'repeat(4, minmax(0, 1fr))',
5: 'repeat(5, minmax(0, 1fr))',
6: 'repeat(6, minmax(0, 1fr))',
7: 'repeat(7, minmax(0, 1fr))',
9: 'repeat(9, minmax(0, 1fr))',
10: 'repeat(10, minmax(0, 1fr))',
11: 'repeat(11, minmax(0, 1fr))',
12: 'repeat(12, minmax(0, 1fr))',
},
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' },
},
'bg-pulse': {
'0%': {
// `blue-3`
backgroundColor: '#0d2847',
// `blue-6`
outline: '1px solid #104d87',
},
'100%': {
backgroundColor: 'rgba(0, 0, 0, 0)',
outline: '1px solid rgba(0, 0, 0, 0)',
},
},
},
zIndex: {
base: '0',
dropdown: '80',
overlay: '90',
popover: '100',
},
},
},
plugins: [
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/typography'),
require('tailwindcss-percentage-width'),
require('tailwindcss-animate'),
colors.plugin,
],
presets: [require('windy-radix-typography')],
};