-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
28 lines (25 loc) · 870 Bytes
/
tailwind.config.js
File metadata and controls
28 lines (25 loc) · 870 Bytes
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
/** @type {import('tailwindcss').Config} */
/**
* NOTE:
* If you use string interpolation or concatenate partial class names together,
* Tailwind will not find them and therefore will not generate the corresponding CSS.
* https://tailwindcss.com/docs/content-configuration#class-detection-in-depth
* https://tailwindcss.com/docs/content-configuration#dynamic-class-names
*/
const colors = require('tailwindcss/colors');
const colorSafeList = [];
for (const key in colors) {
[50, 100, 200, 300, 400, 500, 600, 700, 800, 900].forEach(colorValue => {
colorSafeList.push(`text-${key}-${colorValue}`);
colorSafeList.push(`bg-${key}-${colorValue}`);
colorSafeList.push(`border-${key}-${colorValue}`);
});
}
module.exports = {
content: ["./src/**/*.{js,jsx,ts,tsx}"],
safelist: colorSafeList,
theme: {
extend: {},
},
plugins: [],
}