-
Notifications
You must be signed in to change notification settings - Fork 486
/
tailwind.config.js
110 lines (105 loc) · 3.57 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
const colors = require("tailwindcss/colors")
// from tailwind youtube channel https://youtu.be/MAtaT8BZEAo?t=1023
const colorWithOpacity = (variableName) => {
return ({ opacityValue }) => {
if (opacityValue !== undefined) {
// use standard syntax rgb (color / alpha) rgba is legacy
// check https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb
return `rgb(var(${variableName}) / ${opacityValue})`
}
return `rgb(var(${variableName}))`
}
}
module.exports = {
important: true,
content: [
"./assets/**/*.{js,vue}",
"./public/main/**/*.{php,twig}",
"./src/CoreBundle/Resources/views/**/*.html.twig",
],
theme: {
colors: {
primary: {
DEFAULT: colorWithOpacity("--color-primary-base"),
gradient: colorWithOpacity("--color-primary-gradient"),
bgdisabled: "#fafafa",
borderdisabled: "#e4e9ed",
"button-text": colorWithOpacity("--color-primary-button-text"),
"button-alternative-text": colorWithOpacity("--color-primary-button-alternative-text"),
},
secondary: {
DEFAULT: colorWithOpacity("--color-secondary-base"),
gradient: colorWithOpacity("--color-secondary-gradient"),
bgdisabled: "#e4e9ed",
hover: "#d35e0f",
"button-text": colorWithOpacity("--color-secondary-button-text"),
},
tertiary: {
DEFAULT: colorWithOpacity("--color-tertiary-base"),
gradient: colorWithOpacity("--color-tertiary-gradient"),
"button-text": colorWithOpacity("--color-tertiary-button-text"),
},
gray: {
5: "rgba(250, 250, 250, 0.5)",
10: "#fafafa",
15: "#f7f8f9",
20: "#edf0f2",
25: "#e4e9ed",
30: "rgba(0, 0, 0, 0.12)",
50: "#a2a6b0",
90: "#333333",
},
support: {
1: "rgba(46, 117, 163, 0.08)",
2: "#f5f8fa",
3: "rgba(46, 117, 163, 0.5)",
4: "#244d67",
5: "#e06410",
6: "#faf7f5",
},
success: {
DEFAULT: colorWithOpacity("--color-success-base"),
gradient: colorWithOpacity("--color-success-gradient"),
"button-text": colorWithOpacity("--color-success-button-text"),
},
info: {
DEFAULT: colorWithOpacity("--color-info-base"),
gradient: colorWithOpacity("--color-info-gradient"),
"button-text": colorWithOpacity("--color-info-button-text"),
},
warning: {
DEFAULT: colorWithOpacity("--color-warning-base"),
gradient: colorWithOpacity("--color-warning-gradient"),
"button-text": colorWithOpacity("--color-warning-button-text"),
},
danger: {
DEFAULT: colorWithOpacity("--color-danger-base"),
gradient: colorWithOpacity("--color-danger-gradient"),
"button-text": colorWithOpacity("--color-danger-button-text"),
},
// error is used in some places in css to this is the same color as danger DEFAULT
error: colorWithOpacity("--color-danger-base"),
form: colorWithOpacity("--color-form-base"),
white: colors.white,
black: colors.black,
transparent: colors.transparent,
current: colors.current,
fontdisabled: "#a2a6b0",
},
extend: {
fontFamily: {
sans: ["Helvetica Neue", "Helvetica", "Arial", "sans-serif"],
},
fontSize: {
"body-1": ["16px", "24px"],
"body-2": ["14px", "16px"],
caption: ["13px", "16px"],
tiny: ["11px", "16px"],
},
},
},
corePlugins: {
aspectRatio: true,
},
plugins: [require("@tailwindcss/forms"), require("@tailwindcss/typography")],
}