-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.config.cjs
50 lines (45 loc) · 1.17 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
/**
* Function to extract classes from the text of matching content files.
* The regex-based search matches class names preceeded by a period.
* Class names are alpha-numerica, but may include dashes, underscores,
* or colons.
*/
const extract = (content) => {
return content.match(/(?<=\.)[-\w:]+/g) || []
}
const config = {
// The content array must be expanded into an object.
content: {
// Files in this list should be checked for tailwind classes.
files: [
"./src/**/*.{html,js,svelte,ts}",
"./src/lib/sveltecms.config.{json,yml}",
"./src/content/**/*.{md,yml,json}",
],
// The content.extract configuration tells Tailwind to use
// the function defined above for .json, .yml, and .md files.
extract: {
json: extract,
yml: extract,
md: extract,
},
},
theme: {
extend: {
fontFamily: {
bellefair: 'bellefair',
bevan: 'bevan',
roboto: 'roboto',
}
},
},
corePlugins: {
aspectRatio: false,
},
plugins: [
require('@tailwindcss/typography'),
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/line-clamp'),
],
};
module.exports = config;