-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
106 lines (101 loc) · 2.32 KB
/
tailwind.config.ts
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
const defaultTheme = require("tailwindcss/defaultTheme");
const colors = require("tailwindcss/colors");
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./src/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {
colors: {
gray: {
100: '#EBF1F5',
200: '#D9E3EA',
300: '#C5D2DC',
400: '#9BA9B4',
500: '#707D86',
600: '#55595F',
700: '#33363A',
800: '#25282C',
900: '#151719',
},
purple: {
100: '#F4F4FF',
200: '#E2E1FF',
300: '#CBCCFF',
400: '#ABABFF',
500: '#8D8DFF',
600: '#5D5DFF',
700: '#4B4ACF',
800: '#38379C',
900: '#262668',
},
},
spacing: {
'9/16': '56.25%',
'3/4': '75%',
'1/1': '100%',
},
fontFamily: {
inter: ['var(--font-inter)', 'sans-serif'],
'poiret-one': ['var(--font-poiret-one)', 'sans-serif']
},
fontSize: {
xs: '0.75rem',
sm: '0.875rem',
base: '1rem',
lg: '1.125rem',
xl: '1.25rem',
'2xl': '1.5rem',
'3xl': '2rem',
'4xl': '2.5rem',
'5xl': '3.25rem',
'6xl': '4rem',
},
inset: {
'full': '100%',
},
letterSpacing: {
tighter: '-0.02em',
tight: '-0.01em',
normal: '0',
wide: '0.01em',
wider: '0.02em',
widest: '0.4em',
},
minWidth: {
'10': '2.5rem',
},
scale: {
'98': '.98'
},
animation: {
scroll:
"scroll var(--animation-duration, 40s) var(--animation-direction, forwards) linear infinite",
},
keyframes: {
scroll: {
to: {
transform: "translate(calc(-50% - 0.5rem))",
},
},
},
},
},
plugins: [
require('@tailwindcss/forms'),
addVariablesForColors
],
}
function addVariablesForColors({ addBase, theme }: any) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
":root": newVars,
});
}