-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
45 lines (44 loc) · 1.24 KB
/
tailwind.config.js
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
import colors from 'tailwindcss/colors';
const withOpacity = (colorVariable) => {
return ({ opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(${colorVariable}), ${opacityValue})`;
}
return `rgba(var(${colorVariable}))`;
};
};
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
fontFamily: {
sans: ['Poppins', 'sans-serif']
},
extend: {
textColor: {
base: withOpacity('--color-text-base'),
inverted: withOpacity('--color-text-inverted')
},
colors: {
primary: {
50: withOpacity('--color-primary-50'),
100: withOpacity('--color-primary-100'),
200: withOpacity('--color-primary-200'),
300: withOpacity('--color-primary-300'),
400: withOpacity('--color-primary-400'),
500: withOpacity('--color-primary-500'),
600: withOpacity('--color-primary-600'),
700: withOpacity('--color-primary-700'),
800: withOpacity('--color-primary-800'),
900: withOpacity('--color-primary-900'),
950: withOpacity('--color-primary-950')
},
neutral: colors.slate,
base: withOpacity('--base'),
inverted: withOpacity('--inverted'),
transparent: colors.transparent
}
}
}
};