-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
53 lines (48 loc) · 1.18 KB
/
tailwind.config.js
File metadata and controls
53 lines (48 loc) · 1.18 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
51
52
53
const fs = require('fs');
const path = require('path');
// Path to the generated JSON file
const colorsPath = path.resolve(__dirname, 'tailwind-color.json');
// Read and parse the JSON file
let customColorsArray = [];
if (fs.existsSync(colorsPath)) {
customColorsArray = JSON.parse(fs.readFileSync(colorsPath, 'utf8'));
}
// Transform the JSON data into an object with slug as key and color as value
const customColors = customColorsArray.reduce((acc, color) => {
acc[color.slug] = color.color;
return acc;
}, {});
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./template-parts/*.php',
'*.php',
"./blocks/**/*.php", "./css/*.css",
"css/safelist.txt",
"./scripts/*.js",
"./tailwind.safelist.json",
"./functions/*.php",
],
theme: {
fontFamily: {
'display': ['"Krona One"', 'sans-serif'],
},
container: {
center: true,
},
screens: {
'sm': '100%',
'md': '960px',
'lg': '1140px',
'xl': '1440px',
'2xl': '1640px',
},
extend: {
colors: customColors,
},
},
plugins: [],
corePlugins: {
//preflight: false, // This disables Preflight completely
},
}