-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
32 lines (29 loc) · 1.02 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
import { tailwindConfig } from '@ranger-theme/tailwind-config'
import type { Config } from 'tailwindcss'
const matcher = /(?<=composes:.*)(\S+)(?=.*from global;)/g
const config: Config = {
mode: 'jit',
presets: [tailwindConfig as any],
content: {
files: ['./pages/**/*.{js,ts,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
// Extract Tailwind classnames from source files.
// Our default matcher only matches targets of CSS Modules' `composes`,
// not classnames included directly in HTML or JS!
extract: {
css: (content: string) => content.match(matcher) || []
}
},
// Set the character Tailwind uses when prefixing classnames with variants.
// CSS Modules doesn't like Tailwind's default `:`, so we use `_`.
separator: '_',
theme: {
extend: {
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))'
}
}
},
plugins: []
}
export default config