-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
50 lines (46 loc) · 1.45 KB
/
tailwind.config.ts
File metadata and controls
50 lines (46 loc) · 1.45 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
49
50
import catppuccin from '@catppuccin/tailwindcss';
import typography from '@tailwindcss/typography';
import type { Config } from 'tailwindcss';
import type { PluginAPI } from 'tailwindcss/types/config';
import { GUESTBOOK_VALID_COLORS } from './src/utils/constants';
import typographyConfig from './src/utils/typography';
const unsafeBorderContent = GUESTBOOK_VALID_COLORS.map((color) => `border-ctp-${color}`);
const unsafeTextContent = GUESTBOOK_VALID_COLORS.map((color) => `text-ctp-${color}`);
const unsafeFocusContent = GUESTBOOK_VALID_COLORS.map((color) => `focus:bg-ctp-${color}`);
const unsafeHoverContent = GUESTBOOK_VALID_COLORS.map((color) => `hover:bg-ctp-${color}`);
export default {
safelist: [
...unsafeBorderContent,
...unsafeTextContent,
...unsafeHoverContent,
...unsafeFocusContent,
],
content: ['./src/**/*.{astro,html,js,md,mdx,ts,tsx}'],
theme: {
fontFamily: {
body: ['Atkinson Hyperlegible', 'Inter', 'sans-serif'],
mono: ['Iosevka', 'monospace'],
},
colors: {
current: 'currentColor',
transparent: 'transparent',
},
extend: {
typography: typographyConfig,
},
},
plugins: [
catppuccin({ prefix: 'ctp' }),
typography,
({ addComponents }: PluginAPI) => {
addComponents({
'.title': {
'@apply text-3xl font-bold': {},
},
'.pixelated': {
imageRendering: 'pixelated',
},
});
},
],
} satisfies Config;