-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
129 lines (124 loc) · 3.03 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
124
125
126
127
128
/** @type {import('tailwindcss').Config} */
import plugin from 'tailwindcss/plugin';
// https://stackoverflow.com/a/77121542
const radialGradientPlugin = plugin(
function ({ matchUtilities, theme }) {
matchUtilities(
{
// map to bg-radient-[*]
'bg-radient': value => ({
'background-image': `radial-gradient(${value},var(--tw-gradient-stops))`,
}),
},
{ values: theme('radialGradients') }
)
},
{
theme: {
radialGradients: _presets(),
},
}
)
/**
* utility class presets
*/
function _presets() {
const shapes = ['circle', 'ellipse'];
const pos = {
c: 'center',
t: 'top',
b: 'bottom',
l: 'left',
r: 'right',
tl: 'top left',
tr: 'top right',
bl: 'bottom left',
br: 'bottom right',
};
let result = {};
for (const shape of shapes)
for (const [posName, posValue] of Object.entries(pos))
result[`${shape}-${posName}`] = `${shape} at ${posValue}`;
return result;
}
export default {
prefix: "tw-",
darkMode: 'class',
content: [
"./resources/**/*.blade.php",
"./resources/**/*.js",
],
theme: {
extend: {},
},
safelist: [
// This is on the safelist because it is used in the markdown editor
// Include text sizes
'tw-text-xs',
'tw-text-sm',
'tw-text-base',
'tw-text-lg',
'tw-text-xl',
'tw-text-2xl',
'tw-text-3xl',
'tw-text-4xl',
'tw-text-5xl',
'tw-text-6xl',
'tw-text-7xl',
'tw-text-8xl',
'tw-text-9xl',
'tw-text-h1',
'tw-text-h2',
'tw-text-h3',
'tw-text-h4',
'tw-text-h5',
// Include text positions
'tw-text-center',
// Include list styles
'tw-list-none',
'tw-list-disc',
'tw-list-decimal',
'tw-list-inside',
'tw-list-outside',
// Include display styles
'tw-block',
'tw-inline-block',
'tw-inline',
'tw-flex',
// Include margin styles
'tw-pl-4',
// Include font weights
'tw-font-thin',
'tw-font-extralight',
'tw-font-light',
'tw-font-normal',
'tw-font-medium',
'tw-font-semibold',
'tw-font-bold',
'tw-font-extrabold',
// Include some padding lefts for the file trees
'tw-pl-2',
'tw-pl-4',
'tw-pl-6',
'tw-pl-8',
'tw-pl-10',
// Include some padding tops for the file trees
'tw-mt-2',
'tw-mb-4',
'tw-my-4',
'tw-pb-2',
// Aspect ratio
'tw-aspect-w-16',
'tw-aspect-h-9',
//
'md:tw-w-4/5',
'lg:tw-w-3/5',
'xl:tw-w-2/5',
'tw-mx-auto',
],
plugins: [
// Plugin for aspect ratio
require('@tailwindcss/aspect-ratio'),
radialGradientPlugin,
],
}