forked from urlaubsverwaltung/urlaubsverwaltung
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
85 lines (83 loc) · 2.52 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
const plugin = require("tailwindcss/plugin");
const defaultConfig = require("tailwindcss/defaultConfig.js");
function withOpacity(variable) {
return ({ opacityValue }) => (opacityValue ? `rgba(var(${variable}), ${opacityValue})` : `rgb(var(${variable}))`);
}
module.exports = {
content: [
"./src/main/webapp/**/*.jsp",
"./src/main/webapp/**/*.tag",
"./src/main/javascript/**/*.js",
"./src/main/resources/templates/**/*.html",
],
// use a prefix to not conflict with bootstrap
prefix: "tw-",
darkMode: "class",
// use important keyword for tailwind utility classes to override bootstrap selectors
important: true,
corePlugins: {
// disable tailwind base/reset styles. we're still using bootstrap
preflight: false,
},
theme: {
extend: {
borderWidth: {
3: "3px",
},
lineHeight: {
normal: "normal",
},
fontSize: {
"10rem": "10rem",
},
margin: {
25: "6.25rem",
},
colors: {
"black-almost": "#444444",
"bootstrap-green": "#5cb85c",
"bootstrap-green-dark": "#449d44",
},
borderColor: {
calendar: {
DEFAULT: withOpacity("--uv-cal-border-color"),
today: withOpacity("--uv-cal-today-border-color"),
},
},
textColor: {
calendar: {
DEFAULT: withOpacity("--uv-cal-default-color"),
past: withOpacity("--uv-cal-past-color"),
weekend: withOpacity("--uv-cal-weekend-color"),
"public-holiday": withOpacity("--uv-cal-public-holiday-color"),
},
},
backgroundColor: {
calendar: {
DEFAULT: withOpacity("--uv-cal-default-bg"),
past: withOpacity("--uv-cal-past-bg"),
weekend: withOpacity("--uv-cal-weekend-bg"),
// ----
"sick-note": withOpacity("--uv-cal-sick-note-bg"),
"public-holiday": withOpacity("--uv-cal-public-holiday-bg"),
"personal-holiday": withOpacity("--uv-cal-personal-holiday-bg"),
"personal-holiday-approved": withOpacity("--uv-cal-personal-holiday-approved-bg"),
},
},
},
screens: {
// cannot use 'extend' as `xs` would override other screens
// since it's added to the bottom of the css file
xs: "480px",
...defaultConfig.theme.screens,
},
},
plugins: [
plugin(function ({ addVariant }) {
addVariant(
"supports-backdrop-blur",
"@supports (backdrop-filter: blur(0)) or (-webkit-backdrop-filter: blur(0))",
);
}),
],
};