generated from deco-sites/fashion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
twind.config.ts
223 lines (214 loc) · 6.18 KB
/
twind.config.ts
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
/**
* WARNING: DO NOT USE ANY TWIND FUNCTIONS in here otherwise the
* vscode-twind-intellisense plugin may stop working. To overcome
* this issue, use animations and keyframes intead of twind's animation
* function.
*/
import type { Options } from "$fresh/plugins/twind.ts";
const gridCols = ([arg]: string[]) => {
const template = Number.isInteger(Number(arg))
? `repeat(${arg}, minmax(0, 1fr))`
: arg
? arg.replace(/(^\[)|(\])$/g, "").replace(/_/g, " ")
: arg;
return {
"grid-template-columns": template,
};
};
const gridRows = ([arg]: string[]) => {
const template = Number.isInteger(Number(arg))
? `repeat(${arg}, minmax(0, 1fr))`
: arg
? arg.replace(/(^\[)|(\])$/g, "").replace(/_/g, " ")
: arg;
return {
"grid-template-rows": template,
};
};
const options: Omit<Options, "selfURL"> = {
theme: {
extend: {
colors: {
"default": "rgb(242, 242, 242);",
"header": "#FFFFFF",
"badge": "#af0102", // shopping cart tem isso tambem
"footer": "#f2f2f2",
"newsletter": "rgb(175, 1, 0)",
"cookie": "#90052c",
"interactive": "#858585",
"interactive-inverse": "#FFFFFF",
"primary": "#AF0100",
"hover": "rgba(0, 0, 0, 0.04)",
"hover-inverse": "rgba(255, 255, 255, 0.4)",
},
textColor: {
"default": "#858585",
"default-inverse": "#FFFFFF",
"subdued": "#66736C",
"subdued-inverse": "#C6C6C6",
"price": "#af0102",
"positive": "#1A7346",
"critical": "#B44125",
"section-title": "#858585",
"strong-title": "#AF0100",
"product-title": "#615D56",
"product-text": "#787878",
"whatsapp": "#25D366",
"copyright": "#797676",
},
borderColor: {
"primary": "#AF0100",
"default": "#D4DBD7",
"default-inverse": "#FFFFFF",
"interactive": "#858585",
"focus": "#3379EF",
"positive": "#1A7346",
"critical": "#B44125",
"lightgray": "lightgray",
},
outline: {
interactive: ["2px solid #3379EF", "2px"],
},
fontSize: {
"heading-1": ["56px", "67.2px"],
"heading-2": ["24px", "28.8px"],
"heading-3": ["20px", "24px"],
"heading-4": ["18px", "22px"],
"heading-footer": ["14px", "18px"],
"text-footer": ["11px", "15px"],
"menu": ["16px", "20px"],
"button": ["14px", "18px"],
"body": ["16px", "20px"],
"caption": ["13px", "16px"],
"list-price": ["10px", "20px"],
"menu-desktop": ["15px", "15px"],
"newsletter": ["17px", "20px"],
},
fontWeight: {
"heading-1": "700",
"heading-2": "700",
"heading-3": "700",
"heading-4": "400",
"menu": "500",
"button": "700",
"regular": "400",
"body": "500",
"caption": "500",
"list-price": "400",
},
animation: {
"slide-left": "slide-left-frame 0.4s ease normal",
"slide-right": "slide-right-frame 0.4s ease normal",
"slide-bottom": "slide-bottom-frame 0.4s ease normal",
"fade-in": "fade-in-frame 0.4s ease normal",
"fade-out": "fade-out-frame 0.4s ease normal",
},
keyframes: {
"slide-left-frame": {
from: { transform: "translateX(100%)" },
to: { transform: "translateX(0)" },
},
"slide-right-frame": {
from: { transform: "translateX(-100%)" },
to: { transform: "translateX(0)" },
},
"slide-bottom-frame": {
from: { transform: "translateY(100%)" },
to: { transform: "translateY(0)" },
},
"fade-in-frame": {
from: { opacity: 0, visibility: "hidden" },
to: { opacity: 1, visibility: "visible" },
},
"fade-out-frame": {
from: { opacity: 1, visibility: "visible" },
to: { opacity: 0, visibility: "hidden" },
},
},
boxShadow: {
section: "rgb(0, 0, 0) 0px 3px 10px -5px;",
sm: "0px 1px 3px 0px #00000014",
default: "0px 1px 4px 0px #0000001F",
md: "0px 1px 5px 0px #00000024",
lg: "0px 4px 10px 0px #0000001F",
notfound: "0px 3px 10px -5px rgb(0, 0, 0)",
cookie: "0px 1px 5px 0px rgba(0, 0, 0, 0.7)",
header: "rgb(183, 183, 183) 0px 6px 10px -5px",
newsletter: "rgba(0, 0, 0, 0.2) 0px 1px 3px 0px",
},
},
fontFamily: {
sans: ["Open Sans", "sans-serif"],
serif: ["inherit", "serif"],
},
screens: {
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
"2xl": "1536px",
},
},
preflight: (preflight) => ({
...preflight,
// Stick footer to the bottom of the page
body: {
display: "flex",
flexDirection: "column",
minHeight: "100vh",
backgroundColor: "rgb(242, 242, 242)", // cor padrão do background do body
},
'section[data-manifest-key="./sections/Footer.tsx"]': {
marginTop: "auto",
},
// Prevent scroll when modal is open
"body[no-scroll]": {
overflow: "hidden",
height: "100vh",
},
".footer-advanced-item a": {
color: "rgb(35, 69, 150)",
},
}),
plugins: {
backdrop: {
"&::backdrop": {
background: "rgba(0, 0, 0, 0.5)",
},
},
"scroll-snap-center": {
"scroll-snap-align": "center",
},
"scroll-x-mandatory": {
"scroll-snap-type": "x mandatory",
},
"snap-x": {
"scroll-snap-type": "x var(--tw-scroll-snap-strictness)",
},
"snap-mandatory": {
"--tw-scroll-snap-strictness": "mandatory",
},
"fill": (parts) => ({ "fill": parts.join("-") }),
"max-h-min": {
"max-height": "min-content",
},
"snap": ([mod]) => ({ "scroll-snap-align": mod }),
"grid-cols": gridCols,
"grid-rows": gridRows,
"scroll-smooth": {
"scroll-behavior": "smooth",
"-webkit-overflow-scrolling": "touch",
},
"scrollbar-none": {
"scrollbar-width": "none",
"-ms-overflow-style": "none",
"&::-webkit-scrollbar": {
display: "none",
},
},
"no-action-button": {
display: "none",
},
},
};
export default options;