-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
123 lines (118 loc) · 3.06 KB
/
tailwind.config.js
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
const defaultTheme = require("tailwindcss/defaultTheme");
// Custom color with css variable color in __theme_color.scss
function customColors(cssVar) {
return ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(${cssVar}), ${opacityValue})`;
}
if (opacityVariable !== undefined) {
return `rgba(var(${cssVar}), var(${opacityVariable}, 1))`;
}
return `rgb(var(${cssVar}))`;
};
}
const safelist = [
{
pattern: /grid-cols-(1|2|3|4|5|6|7|8|12)/,
variants: ["sm", "md", "lg", "xl", "2xl"],
},
{
pattern: /m-(1|2|3|4|5|6|7|8|10|11|12|13|14)/,
variants: ["sm", "md", "lg", "xl", "2xl"],
},
{
pattern: /mt-(0|16|24)/,
variants: ["sm", "md", "lg", "xl", "2xl"],
},
{
pattern: /space-y-(7|16|28)/,
variants: ["sm", "md", "lg", "xl", "2xl"],
},
{
pattern: /w-(2\/5|3\/5|1\/3|2\/3)/,
variants: ["sm", "md", "lg", "xl", "2xl"],
},
{
pattern: /container/,
variants: ["sm", "md", "lg", "xl", "2xl"],
},
//
"sm:container",
"md:container",
//
"lg:pl-10",
"xl:pl-0",
"xl:pr-14",
"flex-1",
];
module.exports = {
important: true,
content: [
"./index.html",
"./src/**/*.{js,jsx,ts,tsx}",
"./*.php",
"./**/*.php",
],
safelist,
darkMode: "class", // or 'media' or 'class',
theme: {
container: {
center: true,
padding: {
DEFAULT: "1rem",
"2xl": "128px",
},
},
fontFamily: {
display: ["var(--font-display)", ...defaultTheme.fontFamily.sans],
body: ["var(--font-body)", ...defaultTheme.fontFamily.sans],
},
extend: {
colors: {
primary: {
50: customColors("--c-primary-50"),
100: customColors("--c-primary-100"),
200: customColors("--c-primary-200"),
300: customColors("--c-primary-300"),
400: customColors("--c-primary-400"),
500: customColors("--c-primary-500"),
6000: customColors("--c-primary-600"),
700: customColors("--c-primary-700"),
800: customColors("--c-primary-800"),
900: customColors("--c-primary-900"),
},
secondary: {
50: customColors("--c-secondary-50"),
100: customColors("--c-secondary-100"),
200: customColors("--c-secondary-200"),
300: customColors("--c-secondary-300"),
400: customColors("--c-secondary-400"),
500: customColors("--c-secondary-500"),
6000: customColors("--c-secondary-600"),
700: customColors("--c-secondary-700"),
800: customColors("--c-secondary-800"),
900: customColors("--c-secondary-900"),
},
neutral: {
50: customColors("--c-neutral-50"),
100: customColors("--c-neutral-100"),
200: customColors("--c-neutral-200"),
300: customColors("--c-neutral-300"),
400: customColors("--c-neutral-400"),
500: customColors("--c-neutral-500"),
6000: customColors("--c-neutral-600"),
700: customColors("--c-neutral-700"),
800: customColors("--c-neutral-800"),
900: customColors("--c-neutral-900"),
},
},
},
},
variants: {},
plugins: [
require("@tailwindcss/typography"),
require("@tailwindcss/forms"),
require("@tailwindcss/line-clamp"),
require("@tailwindcss/aspect-ratio"),
],
};