-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtailwind.config.js
104 lines (103 loc) · 2.83 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
/** @type {import('tailwindcss').Config | null} */
import DSFRColors from "./dsfr_hacks/colors"
import usedColors from "./dsfr_hacks/used_colors"
module.exports = {
content: [
"jinja2/**/*.html",
"templates/**/*.html",
"static/to_compile/**/*.{js,ts,svg}",
"./**/forms.py",
"./dsfr_hacks/used_icons.js",
],
prefix: "qf-",
corePlugins: {
preflight: false,
},
safelist: [
"sm:qf-max-w-[596px]",
"sm:qf-min-w-[600px]",
"sm:qf-w-[250px]",
"sm:qf-w-[400px]",
"qf-scale-115",
{
pattern: new RegExp(`qf-(border|bg)-(${usedColors.join("|")})`),
},
],
theme: {
colors: {
// https://www.systeme-de-design.gouv.fr/elements-d-interface/fondamentaux-de-l-identite-de-l-etat/couleurs-palette
info: {
"975-active": "#c2cfff",
},
black: "black",
white: "white",
...DSFRColors,
},
spacing: {
// https://www.systeme-de-design.gouv.fr/elements-d-interface/fondamentaux-techniques/espacements
0: 0,
"1v": "0.25rem",
"1w": "0.5rem",
"3v": "0.75rem",
"2w": "1rem",
"3w": "1.5rem",
"4w": "2rem",
"5w": "2.5rem",
"6w": "3rem",
"7w": "3.5rem",
"8w": "4rem",
"9w": "4.5rem",
"12w": "6rem",
"15w": "7.5rem",
},
extend: {
height: {
header: "var(--header-height)",
"main-svh": "calc(100svh - var(--header-height))",
"main-vh": "calc(100vh - var(--header-height))",
},
spacing: {
header: "var(--header-height)",
footer: "var(--footer-height)",
},
maxWidth: {
readable: "80ch",
"120w": "60rem",
},
screens: {
xs: "320px",
xsm: "360px",
},
minWidth: ({ theme }) => ({ ...theme("spacing") }),
keyframes: {
blink: {
"0%": { opacity: 0},
"40%": { opacity: 1},
"60%": { opacity: 1},
"100%": { opacity: 0}
},
wave: {
"0%": { transform: "rotate(0.0deg) scale3d(0.75, 0.75, 1) translateZ(0)" },
"10%": { transform: "rotate(6deg) scale3d(1, 1, 1)" },
"20%": { transform: "rotate(0deg) scale3d(0.9, 0.9, 1)" },
"30%": { transform: "rotate(1deg) scale3d(0.9, 0.9, 1)" },
"40%": { transform: "rotate(0deg) scale3d(0.9, 0.9, 1)" },
"100%": { transform: "rotate(0) scale3d(0.9, 0.9, 1) translateZ(0)" },
},
"modal-appear": {
"0%": { opacity: 0, transform: "translateY(0px) scale(0.98)" },
"50%": { opacity: 1 },
"100%": {
transform: "translateY(0px) scale(1)",
},
},
},
animation: {
wave: "wave 1.5s linear",
blink: "blink 1s infinite",
"modal-appear": "modal-appear 0.2s",
},
},
},
plugins: [require("tailwindcss-animate")],
}