crayon-css 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +47 -0
- package/src/_accessibility.scss +22 -0
- package/src/_colors.scss +80 -0
- package/src/_config.scss +379 -0
- package/src/_display.scss +74 -0
- package/src/_flex.scss +38 -0
- package/src/_grid.scss +52 -0
- package/src/_mixins.scss +24 -0
- package/src/_reset.scss +159 -0
- package/src/_sizes.scss +437 -0
- package/src/_typography.scss +84 -0
- package/src/_utility.scss +18 -0
- package/src/crayon.scss +11 -0
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "crayon-css",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "A Sass utility CSS toolkit.",
|
|
5
|
+
"sass": "src/crayon.scss",
|
|
6
|
+
"files": [
|
|
7
|
+
"src"
|
|
8
|
+
],
|
|
9
|
+
"keywords": [
|
|
10
|
+
"css",
|
|
11
|
+
"sass",
|
|
12
|
+
"utility",
|
|
13
|
+
"tailwind"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/TeriyakiBomb/crayon.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/TeriyakiBomb/crayon/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/TeriyakiBomb/crayon#readme",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "vite",
|
|
27
|
+
"build": "vite build",
|
|
28
|
+
"preview": "vite preview"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"sass": ">=1.79.0",
|
|
32
|
+
"sass-embedded": ">=1.79.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"sass": {
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
"sass-embedded": {
|
|
39
|
+
"optional": true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@fullhuman/postcss-purgecss": "^8.0.0",
|
|
44
|
+
"sass-embedded": "^1.98.0",
|
|
45
|
+
"vite": "^8.0.0"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.sr-only {
|
|
2
|
+
position: absolute;
|
|
3
|
+
width: 1px;
|
|
4
|
+
height: 1px;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: -1px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
clip: rect(0, 0, 0, 0);
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
border-width: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.not-sr-only {
|
|
14
|
+
position: static;
|
|
15
|
+
width: auto;
|
|
16
|
+
height: auto;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
overflow: visible;
|
|
20
|
+
clip: auto;
|
|
21
|
+
white-space: normal;
|
|
22
|
+
}
|
package/src/_colors.scss
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@use "config";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
@use "sass:color" as sasscolor;
|
|
4
|
+
|
|
5
|
+
// ─── lookup ───────────────────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
@function color($name) {
|
|
8
|
+
@return map.get(config.$colors, $name);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// ─── Colour space conversion ──────────────────────────────────────────────────
|
|
12
|
+
|
|
13
|
+
@function convert($color, $space: config.$output-colorspace) {
|
|
14
|
+
@if config.$convert-colorspace {
|
|
15
|
+
@return sasscolor.to-space($color, $space);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@return $color;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@function to-oklch($color) {
|
|
22
|
+
@if config.$convert-colorspace {
|
|
23
|
+
@return sasscolor.to-space($color, oklch);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@return $color;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@function to-oklab($color) {
|
|
30
|
+
@if config.$convert-colorspace {
|
|
31
|
+
@return sasscolor.to-space($color, oklab);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@return $color;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@function to-hsl($color) {
|
|
38
|
+
@if config.$convert-colorspace {
|
|
39
|
+
@return sasscolor.to-space($color, hsl);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@return $color;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@function to-rgb($color) {
|
|
46
|
+
@if config.$convert-colorspace {
|
|
47
|
+
@return sasscolor.to-space($color, srgb);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@return $color;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@function to-p3($color) {
|
|
54
|
+
@if config.$convert-colorspace {
|
|
55
|
+
@return sasscolor.to-space($color, display-p3);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@return $color;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// generate them colours ------------------------------------------------------------
|
|
62
|
+
:root {
|
|
63
|
+
@each $name, $value in config.$colors {
|
|
64
|
+
--color-#{$name}: #{convert($value)};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@each $name, $value in config.$colors {
|
|
69
|
+
.bg-#{$name} {
|
|
70
|
+
background-color: convert($value);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.text-#{$name} {
|
|
74
|
+
color: convert($value);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.border-#{$name} {
|
|
78
|
+
border-color: convert($value);
|
|
79
|
+
}
|
|
80
|
+
}
|
package/src/_config.scss
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
3
|
+
// Colour output space — used by colors.convert() and to-<space>()
|
|
4
|
+
// Options: srgb, hsl, oklch, oklab, display-p3
|
|
5
|
+
$convert-colorspace: true;
|
|
6
|
+
$output-colorspace: oklch;
|
|
7
|
+
|
|
8
|
+
// Layout divisions — used to generate fractional width/height classes like w-1/3, h-3/4 etc
|
|
9
|
+
$layout-divisions: (
|
|
10
|
+
2,
|
|
11
|
+
3,
|
|
12
|
+
4,
|
|
13
|
+
5,
|
|
14
|
+
6,
|
|
15
|
+
12
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
// Layout columns — used to generate grid-cols-* and col/row-span-* classes
|
|
19
|
+
$layout-columns: 12;
|
|
20
|
+
|
|
21
|
+
// Breakpoints
|
|
22
|
+
$breakpoints: (
|
|
23
|
+
"sm": 640px,
|
|
24
|
+
"md": 768px,
|
|
25
|
+
"lg": 1024px,
|
|
26
|
+
"xl": 1280px,
|
|
27
|
+
"2xl": 1536px,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
//Typography
|
|
31
|
+
$font-family: sans-serif;
|
|
32
|
+
$base-font-size: 16px;
|
|
33
|
+
|
|
34
|
+
$font-sizes: (
|
|
35
|
+
"xs": ($base-font-size * 0.75, 1rem),
|
|
36
|
+
"sm": ($base-font-size * 0.875, 1.25rem),
|
|
37
|
+
"base": ($base-font-size * 1, 1.5rem),
|
|
38
|
+
"lg": ($base-font-size * 1.125, 1.75rem),
|
|
39
|
+
"xl": ($base-font-size * 1.25, 1.75rem),
|
|
40
|
+
"2xl": ($base-font-size * 1.5, 2rem),
|
|
41
|
+
"3xl": ($base-font-size * 1.875, 2.25rem),
|
|
42
|
+
"4xl": ($base-font-size * 2.25, 2.5rem),
|
|
43
|
+
"5xl": ($base-font-size * 3, 1),
|
|
44
|
+
"6xl": ($base-font-size * 3.75, 1),
|
|
45
|
+
"7xl": ($base-font-size * 4.5, 1),
|
|
46
|
+
"8xl": ($base-font-size * 6, 1),
|
|
47
|
+
"9xl": ($base-font-size * 8, 1),
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
$font-weights: (
|
|
51
|
+
"thin": 100,
|
|
52
|
+
"extralight": 200,
|
|
53
|
+
"light": 300,
|
|
54
|
+
"normal": 400,
|
|
55
|
+
"medium": 500,
|
|
56
|
+
"semibold": 600,
|
|
57
|
+
"bold": 700,
|
|
58
|
+
"extrabold": 800,
|
|
59
|
+
"black": 900,
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
$base-size: 4px;
|
|
63
|
+
$highest-multiplier: 96;
|
|
64
|
+
|
|
65
|
+
/* Base sizes can be whatever you want, the multiplier just fills it the rest of the way to that number, so you can go beyond 96. Bases can have any name or multiplier you want for greater granularity */
|
|
66
|
+
$base-sizes: (
|
|
67
|
+
0.5 : math.div($base-size, 2),
|
|
68
|
+
1 : $base-size,
|
|
69
|
+
1.5 : $base-size * 1.5,
|
|
70
|
+
2 : $base-size * 2,
|
|
71
|
+
2.5 : $base-size * 2.5,
|
|
72
|
+
3 : $base-size * 3,
|
|
73
|
+
3.5 : $base-size * 3.5,
|
|
74
|
+
4 : $base-size * 4,
|
|
75
|
+
4.5 : $base-size * 4.5,
|
|
76
|
+
5 : $base-size * 5,
|
|
77
|
+
5.5 : $base-size * 5.5,
|
|
78
|
+
6 : $base-size * 6,
|
|
79
|
+
6.5 : $base-size * 6.5,
|
|
80
|
+
7 : $base-size * 7,
|
|
81
|
+
7.5 : $base-size * 7.5,
|
|
82
|
+
8 : $base-size * 8,
|
|
83
|
+
8.5 : $base-size * 8.5,
|
|
84
|
+
9 : $base-size * 9,
|
|
85
|
+
9.5 : $base-size * 9.5
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
/* The base color are the same as tailwind - it's all on you to extend etc */
|
|
89
|
+
$colors: (
|
|
90
|
+
// Slate
|
|
91
|
+
"slate-50": #f8fafc,
|
|
92
|
+
"slate-100": #f1f5f9,
|
|
93
|
+
"slate-200": #e2e8f0,
|
|
94
|
+
"slate-300": #cbd5e1,
|
|
95
|
+
"slate-400": #94a3b8,
|
|
96
|
+
"slate-500": #64748b,
|
|
97
|
+
"slate-600": #475569,
|
|
98
|
+
"slate-700": #334155,
|
|
99
|
+
"slate-800": #1e293b,
|
|
100
|
+
"slate-900": #0f172a,
|
|
101
|
+
"slate-950": #020617,
|
|
102
|
+
|
|
103
|
+
// Gray
|
|
104
|
+
"gray-50": #f9fafb,
|
|
105
|
+
"gray-100": #f3f4f6,
|
|
106
|
+
"gray-200": #e5e7eb,
|
|
107
|
+
"gray-300": #d1d5db,
|
|
108
|
+
"gray-400": #9ca3af,
|
|
109
|
+
"gray-500": #6b7280,
|
|
110
|
+
"gray-600": #4b5563,
|
|
111
|
+
"gray-700": #374151,
|
|
112
|
+
"gray-800": #1f2937,
|
|
113
|
+
"gray-900": #111827,
|
|
114
|
+
"gray-950": #030712,
|
|
115
|
+
|
|
116
|
+
// Zinc
|
|
117
|
+
"zinc-50": #fafafa,
|
|
118
|
+
"zinc-100": #f4f4f5,
|
|
119
|
+
"zinc-200": #e4e4e7,
|
|
120
|
+
"zinc-300": #d4d4d8,
|
|
121
|
+
"zinc-400": #a1a1aa,
|
|
122
|
+
"zinc-500": #71717a,
|
|
123
|
+
"zinc-600": #52525b,
|
|
124
|
+
"zinc-700": #3f3f46,
|
|
125
|
+
"zinc-800": #27272a,
|
|
126
|
+
"zinc-900": #18181b,
|
|
127
|
+
"zinc-950": #09090b,
|
|
128
|
+
|
|
129
|
+
// Neutral
|
|
130
|
+
"neutral-50": #fafafa,
|
|
131
|
+
"neutral-100": #f5f5f5,
|
|
132
|
+
"neutral-200": #e5e5e5,
|
|
133
|
+
"neutral-300": #d4d4d4,
|
|
134
|
+
"neutral-400": #a3a3a3,
|
|
135
|
+
"neutral-500": #737373,
|
|
136
|
+
"neutral-600": #525252,
|
|
137
|
+
"neutral-700": #404040,
|
|
138
|
+
"neutral-800": #262626,
|
|
139
|
+
"neutral-900": #171717,
|
|
140
|
+
"neutral-950": #0a0a0a,
|
|
141
|
+
|
|
142
|
+
// Stone
|
|
143
|
+
"stone-50": #fafaf9,
|
|
144
|
+
"stone-100": #f5f5f4,
|
|
145
|
+
"stone-200": #e7e5e4,
|
|
146
|
+
"stone-300": #d6d3d1,
|
|
147
|
+
"stone-400": #a8a29e,
|
|
148
|
+
"stone-500": #78716c,
|
|
149
|
+
"stone-600": #57534e,
|
|
150
|
+
"stone-700": #44403c,
|
|
151
|
+
"stone-800": #292524,
|
|
152
|
+
"stone-900": #1c1917,
|
|
153
|
+
"stone-950": #0c0a09,
|
|
154
|
+
|
|
155
|
+
// Red
|
|
156
|
+
"red-50": #fef2f2,
|
|
157
|
+
"red-100": #fee2e2,
|
|
158
|
+
"red-200": #fecaca,
|
|
159
|
+
"red-300": #fca5a5,
|
|
160
|
+
"red-400": #f87171,
|
|
161
|
+
"red-500": #ef4444,
|
|
162
|
+
"red-600": #dc2626,
|
|
163
|
+
"red-700": #b91c1c,
|
|
164
|
+
"red-800": #991b1b,
|
|
165
|
+
"red-900": #7f1d1d,
|
|
166
|
+
"red-950": #450a0a,
|
|
167
|
+
|
|
168
|
+
// Orange
|
|
169
|
+
"orange-50": #fff7ed,
|
|
170
|
+
"orange-100": #ffedd5,
|
|
171
|
+
"orange-200": #fed7aa,
|
|
172
|
+
"orange-300": #fdba74,
|
|
173
|
+
"orange-400": #fb923c,
|
|
174
|
+
"orange-500": #f97316,
|
|
175
|
+
"orange-600": #ea580c,
|
|
176
|
+
"orange-700": #c2410c,
|
|
177
|
+
"orange-800": #9a3412,
|
|
178
|
+
"orange-900": #7c2d12,
|
|
179
|
+
"orange-950": #431407,
|
|
180
|
+
|
|
181
|
+
// Amber
|
|
182
|
+
"amber-50": #fffbeb,
|
|
183
|
+
"amber-100": #fef3c7,
|
|
184
|
+
"amber-200": #fde68a,
|
|
185
|
+
"amber-300": #fcd34d,
|
|
186
|
+
"amber-400": #fbbf24,
|
|
187
|
+
"amber-500": #f59e0b,
|
|
188
|
+
"amber-600": #d97706,
|
|
189
|
+
"amber-700": #b45309,
|
|
190
|
+
"amber-800": #92400e,
|
|
191
|
+
"amber-900": #78350f,
|
|
192
|
+
"amber-950": #451a03,
|
|
193
|
+
|
|
194
|
+
// Yellow
|
|
195
|
+
"yellow-50": #fefce8,
|
|
196
|
+
"yellow-100": #fef9c3,
|
|
197
|
+
"yellow-200": #fef08a,
|
|
198
|
+
"yellow-300": #fde047,
|
|
199
|
+
"yellow-400": #facc15,
|
|
200
|
+
"yellow-500": #eab308,
|
|
201
|
+
"yellow-600": #ca8a04,
|
|
202
|
+
"yellow-700": #a16207,
|
|
203
|
+
"yellow-800": #854d0e,
|
|
204
|
+
"yellow-900": #713f12,
|
|
205
|
+
"yellow-950": #422006,
|
|
206
|
+
|
|
207
|
+
// Lime
|
|
208
|
+
"lime-50": #f7fee7,
|
|
209
|
+
"lime-100": #ecfccb,
|
|
210
|
+
"lime-200": #d9f99d,
|
|
211
|
+
"lime-300": #bef264,
|
|
212
|
+
"lime-400": #a3e635,
|
|
213
|
+
"lime-500": #84cc16,
|
|
214
|
+
"lime-600": #65a30d,
|
|
215
|
+
"lime-700": #4d7c0f,
|
|
216
|
+
"lime-800": #3f6212,
|
|
217
|
+
"lime-900": #365314,
|
|
218
|
+
"lime-950": #1a2e05,
|
|
219
|
+
|
|
220
|
+
// Green
|
|
221
|
+
"green-50": #f0fdf4,
|
|
222
|
+
"green-100": #dcfce7,
|
|
223
|
+
"green-200": #bbf7d0,
|
|
224
|
+
"green-300": #86efac,
|
|
225
|
+
"green-400": #4ade80,
|
|
226
|
+
"green-500": #22c55e,
|
|
227
|
+
"green-600": #16a34a,
|
|
228
|
+
"green-700": #15803d,
|
|
229
|
+
"green-800": #166534,
|
|
230
|
+
"green-900": #14532d,
|
|
231
|
+
"green-950": #052e16,
|
|
232
|
+
|
|
233
|
+
// Emerald
|
|
234
|
+
"emerald-50": #ecfdf5,
|
|
235
|
+
"emerald-100": #d1fae5,
|
|
236
|
+
"emerald-200": #a7f3d0,
|
|
237
|
+
"emerald-300": #6ee7b7,
|
|
238
|
+
"emerald-400": #34d399,
|
|
239
|
+
"emerald-500": #10b981,
|
|
240
|
+
"emerald-600": #059669,
|
|
241
|
+
"emerald-700": #047857,
|
|
242
|
+
"emerald-800": #065f46,
|
|
243
|
+
"emerald-900": #064e3b,
|
|
244
|
+
"emerald-950": #022c22,
|
|
245
|
+
|
|
246
|
+
// Teal
|
|
247
|
+
"teal-50": #f0fdfa,
|
|
248
|
+
"teal-100": #ccfbf1,
|
|
249
|
+
"teal-200": #99f6e4,
|
|
250
|
+
"teal-300": #5eead4,
|
|
251
|
+
"teal-400": #2dd4bf,
|
|
252
|
+
"teal-500": #14b8a6,
|
|
253
|
+
"teal-600": #0d9488,
|
|
254
|
+
"teal-700": #0f766e,
|
|
255
|
+
"teal-800": #115e59,
|
|
256
|
+
"teal-900": #134e4a,
|
|
257
|
+
"teal-950": #042f2e,
|
|
258
|
+
|
|
259
|
+
// Cyan
|
|
260
|
+
"cyan-50": #ecfeff,
|
|
261
|
+
"cyan-100": #cffafe,
|
|
262
|
+
"cyan-200": #a5f3fc,
|
|
263
|
+
"cyan-300": #67e8f9,
|
|
264
|
+
"cyan-400": #22d3ee,
|
|
265
|
+
"cyan-500": #06b6d4,
|
|
266
|
+
"cyan-600": #0891b2,
|
|
267
|
+
"cyan-700": #0e7490,
|
|
268
|
+
"cyan-800": #155e75,
|
|
269
|
+
"cyan-900": #164e63,
|
|
270
|
+
"cyan-950": #083344,
|
|
271
|
+
|
|
272
|
+
// Sky
|
|
273
|
+
"sky-50": #f0f9ff,
|
|
274
|
+
"sky-100": #e0f2fe,
|
|
275
|
+
"sky-200": #bae6fd,
|
|
276
|
+
"sky-300": #7dd3fc,
|
|
277
|
+
"sky-400": #38bdf8,
|
|
278
|
+
"sky-500": #0ea5e9,
|
|
279
|
+
"sky-600": #0284c7,
|
|
280
|
+
"sky-700": #0369a1,
|
|
281
|
+
"sky-800": #075985,
|
|
282
|
+
"sky-900": #0c4a6e,
|
|
283
|
+
"sky-950": #082f49,
|
|
284
|
+
|
|
285
|
+
// Blue
|
|
286
|
+
"blue-50": #eff6ff,
|
|
287
|
+
"blue-100": #dbeafe,
|
|
288
|
+
"blue-200": #bfdbfe,
|
|
289
|
+
"blue-300": #93c5fd,
|
|
290
|
+
"blue-400": #60a5fa,
|
|
291
|
+
"blue-500": #3b82f6,
|
|
292
|
+
"blue-600": #2563eb,
|
|
293
|
+
"blue-700": #1d4ed8,
|
|
294
|
+
"blue-800": #1e40af,
|
|
295
|
+
"blue-900": #1e3a8a,
|
|
296
|
+
"blue-950": #172554,
|
|
297
|
+
|
|
298
|
+
// Indigo
|
|
299
|
+
"indigo-50": #eef2ff,
|
|
300
|
+
"indigo-100": #e0e7ff,
|
|
301
|
+
"indigo-200": #c7d2fe,
|
|
302
|
+
"indigo-300": #a5b4fc,
|
|
303
|
+
"indigo-400": #818cf8,
|
|
304
|
+
"indigo-500": #6366f1,
|
|
305
|
+
"indigo-600": #4f46e5,
|
|
306
|
+
"indigo-700": #4338ca,
|
|
307
|
+
"indigo-800": #3730a3,
|
|
308
|
+
"indigo-900": #312e81,
|
|
309
|
+
"indigo-950": #1e1b4b,
|
|
310
|
+
|
|
311
|
+
// Violet
|
|
312
|
+
"violet-50": #f5f3ff,
|
|
313
|
+
"violet-100": #ede9fe,
|
|
314
|
+
"violet-200": #ddd6fe,
|
|
315
|
+
"violet-300": #c4b5fd,
|
|
316
|
+
"violet-400": #a78bfa,
|
|
317
|
+
"violet-500": #8b5cf6,
|
|
318
|
+
"violet-600": #7c3aed,
|
|
319
|
+
"violet-700": #6d28d9,
|
|
320
|
+
"violet-800": #5b21b6,
|
|
321
|
+
"violet-900": #4c1d95,
|
|
322
|
+
"violet-950": #2e1065,
|
|
323
|
+
|
|
324
|
+
// Purple
|
|
325
|
+
"purple-50": #faf5ff,
|
|
326
|
+
"purple-100": #f3e8ff,
|
|
327
|
+
"purple-200": #e9d5ff,
|
|
328
|
+
"purple-300": #d8b4fe,
|
|
329
|
+
"purple-400": #c084fc,
|
|
330
|
+
"purple-500": #a855f7,
|
|
331
|
+
"purple-600": #9333ea,
|
|
332
|
+
"purple-700": #7e22ce,
|
|
333
|
+
"purple-800": #6b21a8,
|
|
334
|
+
"purple-900": #581c87,
|
|
335
|
+
"purple-950": #3b0764,
|
|
336
|
+
|
|
337
|
+
// Fuchsia
|
|
338
|
+
"fuchsia-50": #fdf4ff,
|
|
339
|
+
"fuchsia-100": #fae8ff,
|
|
340
|
+
"fuchsia-200": #f5d0fe,
|
|
341
|
+
"fuchsia-300": #f0abfc,
|
|
342
|
+
"fuchsia-400": #e879f9,
|
|
343
|
+
"fuchsia-500": #d946ef,
|
|
344
|
+
"fuchsia-600": #c026d3,
|
|
345
|
+
"fuchsia-700": #a21caf,
|
|
346
|
+
"fuchsia-800": #86198f,
|
|
347
|
+
"fuchsia-900": #701a75,
|
|
348
|
+
"fuchsia-950": #4a044e,
|
|
349
|
+
|
|
350
|
+
// Pink
|
|
351
|
+
"pink-50": #fdf2f8,
|
|
352
|
+
"pink-100": #fce7f3,
|
|
353
|
+
"pink-200": #fbcfe8,
|
|
354
|
+
"pink-300": #f9a8d4,
|
|
355
|
+
"pink-400": #f472b6,
|
|
356
|
+
"pink-500": #ec4899,
|
|
357
|
+
"pink-600": #db2777,
|
|
358
|
+
"pink-700": #be185d,
|
|
359
|
+
"pink-800": #9d174d,
|
|
360
|
+
"pink-900": #831843,
|
|
361
|
+
"pink-950": #500724,
|
|
362
|
+
|
|
363
|
+
// Rose
|
|
364
|
+
"rose-50": #fff1f2,
|
|
365
|
+
"rose-100": #ffe4e6,
|
|
366
|
+
"rose-200": #fecdd3,
|
|
367
|
+
"rose-300": #fda4af,
|
|
368
|
+
"rose-400": #fb7185,
|
|
369
|
+
"rose-500": #f43f5e,
|
|
370
|
+
"rose-600": #e11d48,
|
|
371
|
+
"rose-700": #be123c,
|
|
372
|
+
"rose-800": #9f1239,
|
|
373
|
+
"rose-900": #881337,
|
|
374
|
+
"rose-950": #4c0519,
|
|
375
|
+
|
|
376
|
+
// Base
|
|
377
|
+
"white": #ffffff,
|
|
378
|
+
"black": #000000,
|
|
379
|
+
);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@use "flex";
|
|
2
|
+
@use "config";
|
|
3
|
+
@use "utility";
|
|
4
|
+
|
|
5
|
+
// ─── Gap ──────────────────────────────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
@mixin gap-classes($size-name, $value) {
|
|
8
|
+
$converted-value: utility.px-to-rem($value);
|
|
9
|
+
$escaped: utility.str-replace($size-name, ".", "\\.");
|
|
10
|
+
|
|
11
|
+
.gap-#{$escaped}, .gap#{$escaped} { gap: $converted-value; }
|
|
12
|
+
.gap-x-#{$escaped}, .gapx#{$escaped} { column-gap: $converted-value; }
|
|
13
|
+
.gap-y-#{$escaped}, .gapy#{$escaped} { row-gap: $converted-value; }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@each $size, $value in config.$base-sizes {
|
|
17
|
+
@include gap-classes($size, $value);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
$gap-size: 10;
|
|
21
|
+
@while $gap-size <= config.$highest-multiplier {
|
|
22
|
+
@include gap-classes($gap-size, config.$base-size * $gap-size);
|
|
23
|
+
$gap-size: $gap-size + 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// ─── Display ──────────────────────────────────────────────────────────────────
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
.block {
|
|
30
|
+
display: block;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.inline-block {
|
|
34
|
+
display: inline-block
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.inline {
|
|
38
|
+
display: inline;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.flex {
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.inline-flex {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.grid {
|
|
50
|
+
display: grid;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.inline-grid {
|
|
54
|
+
display: inline-grid;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.hidden,
|
|
58
|
+
.hide {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ─── Container ────────────────────────────────────────────────────────────────
|
|
63
|
+
|
|
64
|
+
.container {
|
|
65
|
+
width: 100%;
|
|
66
|
+
margin-left: auto;
|
|
67
|
+
margin-right: auto;
|
|
68
|
+
|
|
69
|
+
@each $name, $breakpoint in config.$breakpoints {
|
|
70
|
+
@media (min-width: #{$breakpoint}) {
|
|
71
|
+
max-width: $breakpoint;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/_flex.scss
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
$flex: (
|
|
2
|
+
'row': row,
|
|
3
|
+
'col': column,
|
|
4
|
+
'row-reverse': row-reverse,
|
|
5
|
+
'col-reverse': column-reverse
|
|
6
|
+
);
|
|
7
|
+
|
|
8
|
+
@each $name, $dir in $flex {
|
|
9
|
+
.flex-#{$name} {
|
|
10
|
+
flex-direction: $dir;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.f-#{$name} {
|
|
14
|
+
@extend .flex-#{$name};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.grow {
|
|
19
|
+
flex-grow: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.no-grow,
|
|
23
|
+
.grow-0 {
|
|
24
|
+
flex-grow: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.shrink {
|
|
28
|
+
flex-shrink: 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.no-shrink,
|
|
32
|
+
.shrink-0 {
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.flex-wrap { flex-wrap: wrap; }
|
|
37
|
+
.flex-wrap-reverse { flex-wrap: wrap-reverse; }
|
|
38
|
+
.flex-nowrap { flex-wrap: nowrap; }
|
package/src/_grid.scss
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@use "config";
|
|
2
|
+
|
|
3
|
+
// ─── Grid template columns ────────────────────────────────────────────────────
|
|
4
|
+
|
|
5
|
+
@for $column from 1 through config.$layout-columns {
|
|
6
|
+
.grid-cols-#{$column} {
|
|
7
|
+
grid-template-columns: repeat(#{$column}, minmax(0, 1fr));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.grid-cols-none { grid-template-columns: none; }
|
|
12
|
+
|
|
13
|
+
// ─── Column & row span ────────────────────────────────────────────────────────
|
|
14
|
+
|
|
15
|
+
@for $columns from 1 through config.$layout-columns {
|
|
16
|
+
.col-span-#{$columns} { grid-column: span #{$columns} / span #{$columns}; }
|
|
17
|
+
.row-span-#{$columns} { grid-row: span #{$columns} / span #{$columns}; }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.col-span-full { grid-column: 1 / -1; }
|
|
21
|
+
.row-span-full { grid-row: 1 / -1; }
|
|
22
|
+
|
|
23
|
+
// ─── Grid template rows ───────────────────────────────────────────────────────
|
|
24
|
+
|
|
25
|
+
@for $row from 1 through config.$layout-columns {
|
|
26
|
+
.grid-rows-#{$row} {
|
|
27
|
+
grid-template-rows: repeat(#{$row}, minmax(0, 1fr));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.grid-rows-none { grid-template-rows: none; }
|
|
32
|
+
|
|
33
|
+
// ─── Auto columns & rows ──────────────────────────────────────────────────────
|
|
34
|
+
|
|
35
|
+
.auto-cols-auto { grid-auto-columns: auto; }
|
|
36
|
+
.auto-cols-min { grid-auto-columns: min-content; }
|
|
37
|
+
.auto-cols-max { grid-auto-columns: max-content; }
|
|
38
|
+
.auto-cols-fr { grid-auto-columns: minmax(0, 1fr); }
|
|
39
|
+
|
|
40
|
+
.auto-rows-auto { grid-auto-rows: auto; }
|
|
41
|
+
.auto-rows-min { grid-auto-rows: min-content; }
|
|
42
|
+
.auto-rows-max { grid-auto-rows: max-content; }
|
|
43
|
+
.auto-rows-fr { grid-auto-rows: minmax(0, 1fr); }
|
|
44
|
+
|
|
45
|
+
// ─── Grid auto flow ───────────────────────────────────────────────────────────
|
|
46
|
+
|
|
47
|
+
.grid-flow-row { grid-auto-flow: row; }
|
|
48
|
+
.grid-flow-col { grid-auto-flow: column; }
|
|
49
|
+
.grid-flow-dense { grid-auto-flow: dense; }
|
|
50
|
+
.grid-flow-row-dense { grid-auto-flow: row dense; }
|
|
51
|
+
.grid-flow-col-dense { grid-auto-flow: column dense; }
|
|
52
|
+
|
package/src/_mixins.scss
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "config";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
// Custom media — for use in plain CSS / ERB <style> blocks
|
|
5
|
+
// Requires postcss-custom-media in your pipeline for browser support
|
|
6
|
+
@each $name, $value in config.$breakpoints {
|
|
7
|
+
@custom-media --#{$name} (min-width: #{$value});
|
|
8
|
+
}
|
|
9
|
+
@custom-media --dark (prefers-color-scheme: dark);
|
|
10
|
+
|
|
11
|
+
// Responsive
|
|
12
|
+
@mixin screen($name) {
|
|
13
|
+
@media (min-width: map.get(config.$breakpoints, $name)) {
|
|
14
|
+
@content;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// States
|
|
19
|
+
@mixin hover { &:hover { @content; } }
|
|
20
|
+
@mixin focus { &:focus { @content; } }
|
|
21
|
+
@mixin active { &:active { @content; } }
|
|
22
|
+
|
|
23
|
+
// Dark
|
|
24
|
+
@mixin dark { @media (prefers-color-scheme: dark) { @content; } }
|
package/src/_reset.scss
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
@use "config";
|
|
2
|
+
@use "typography";
|
|
3
|
+
|
|
4
|
+
/* Box sizing rules */
|
|
5
|
+
*,
|
|
6
|
+
*::before,
|
|
7
|
+
*::after {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Prevent font size inflation */
|
|
12
|
+
html {
|
|
13
|
+
-moz-text-size-adjust: none;
|
|
14
|
+
-webkit-text-size-adjust: none;
|
|
15
|
+
text-size-adjust: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Remove default margin in favour of better control in authored CSS */
|
|
19
|
+
body,
|
|
20
|
+
h1,
|
|
21
|
+
h2,
|
|
22
|
+
h3,
|
|
23
|
+
h4,
|
|
24
|
+
p,
|
|
25
|
+
figure,
|
|
26
|
+
blockquote,
|
|
27
|
+
dl,
|
|
28
|
+
dd {
|
|
29
|
+
margin-block-end: 0;
|
|
30
|
+
font-size: config.$base-font-size;
|
|
31
|
+
font-weight: typography.font-weight("normal");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
|
35
|
+
ul[role='list'],
|
|
36
|
+
ol[role='list'] {
|
|
37
|
+
list-style: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Set core body defaults */
|
|
41
|
+
body {
|
|
42
|
+
min-height: 100vh;
|
|
43
|
+
line-height: 1.5;
|
|
44
|
+
margin: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Set shorter line heights on headings and interactive elements */
|
|
48
|
+
h1,
|
|
49
|
+
h2,
|
|
50
|
+
h3,
|
|
51
|
+
h4,
|
|
52
|
+
button,
|
|
53
|
+
input,
|
|
54
|
+
label {
|
|
55
|
+
line-height: 1.1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Balance text wrapping on headings */
|
|
59
|
+
h1,
|
|
60
|
+
h2,
|
|
61
|
+
h3,
|
|
62
|
+
h4 {
|
|
63
|
+
text-wrap: balance;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
Text-level semantics
|
|
68
|
+
====================
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
Add the correct font weight in Chrome and Safari.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
b,
|
|
76
|
+
strong {
|
|
77
|
+
font-weight: bolder;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3)
|
|
82
|
+
2. Correct the odd 'em' font sizing in all browsers.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
code,
|
|
86
|
+
kbd,
|
|
87
|
+
samp,
|
|
88
|
+
pre {
|
|
89
|
+
font-family:
|
|
90
|
+
ui-monospace,
|
|
91
|
+
SFMono-Regular,
|
|
92
|
+
Consolas,
|
|
93
|
+
'Liberation Mono',
|
|
94
|
+
Menlo,
|
|
95
|
+
monospace;
|
|
96
|
+
/* 1 */
|
|
97
|
+
font-size: 1em;
|
|
98
|
+
/* 2 */
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
Add the correct font size in all browsers.
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
small {
|
|
106
|
+
font-size: 80%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
Prevent 'sub' and 'sup' elements from affecting the line height in all browsers.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
sub,
|
|
114
|
+
sup {
|
|
115
|
+
font-size: 75%;
|
|
116
|
+
line-height: 0;
|
|
117
|
+
position: relative;
|
|
118
|
+
vertical-align: baseline;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
sub {
|
|
122
|
+
bottom: -0.25em;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
sup {
|
|
126
|
+
top: -0.5em;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* A elements that don't have a class get default styles */
|
|
130
|
+
a:not([class]) {
|
|
131
|
+
text-decoration-skip-ink: auto;
|
|
132
|
+
color: currentColor;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Make images easier to work with */
|
|
136
|
+
img,
|
|
137
|
+
picture {
|
|
138
|
+
max-width: 100%;
|
|
139
|
+
display: block;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Inherit fonts for inputs and buttons */
|
|
143
|
+
input,
|
|
144
|
+
button,
|
|
145
|
+
textarea,
|
|
146
|
+
select {
|
|
147
|
+
font-family: inherit;
|
|
148
|
+
font-size: inherit;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Make sure textareas without a rows attribute are not tiny */
|
|
152
|
+
textarea:not([rows]) {
|
|
153
|
+
min-height: 10em;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Anything that has been anchored to should have extra scroll margin */
|
|
157
|
+
:target {
|
|
158
|
+
scroll-margin-block: 5ex;
|
|
159
|
+
}
|
package/src/_sizes.scss
ADDED
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
@use "config";
|
|
2
|
+
@use "utility";
|
|
3
|
+
@use "sass:math";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
|
|
6
|
+
// ─── Lookup ───────────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
// Returns a rem value for a size key. Covers $base-sizes (fractional) and
|
|
9
|
+
// any integer from 1–$highest-multiplier via $base-size * $key.
|
|
10
|
+
@function size($key) {
|
|
11
|
+
$from-map: map.get(config.$base-sizes, $key);
|
|
12
|
+
|
|
13
|
+
@if $from-map {
|
|
14
|
+
@return utility.px-to-rem($from-map);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@return utility.px-to-rem(config.$base-size * $key);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin padding-classes($size-name, $value) {
|
|
21
|
+
$converted-value: utility.px-to-rem($value);
|
|
22
|
+
$escaped: utility.str-replace($size-name, ".", "\\.");
|
|
23
|
+
|
|
24
|
+
.p-#{$escaped},
|
|
25
|
+
.p#{$escaped} {
|
|
26
|
+
padding: $converted-value;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pr-#{$escaped},
|
|
30
|
+
.pr#{$escaped} {
|
|
31
|
+
padding-right: $converted-value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.pl-#{$escaped},
|
|
35
|
+
.pl#{$escaped} {
|
|
36
|
+
padding-left: $converted-value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pt-#{$escaped},
|
|
40
|
+
.pt#{$escaped} {
|
|
41
|
+
padding-top: $converted-value;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pb-#{$escaped},
|
|
45
|
+
.pb#{$escaped} {
|
|
46
|
+
padding-bottom: $converted-value;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.px-#{$escaped},
|
|
50
|
+
.px#{$escaped} {
|
|
51
|
+
padding-left: $converted-value;
|
|
52
|
+
padding-right: $converted-value;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.py-#{$escaped},
|
|
56
|
+
.py#{$escaped} {
|
|
57
|
+
padding-top: $converted-value;
|
|
58
|
+
padding-bottom: $converted-value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@mixin margin-classes($size-name, $value) {
|
|
63
|
+
$converted-value: utility.px-to-rem($value);
|
|
64
|
+
$escaped: utility.str-replace($size-name, ".", "\\.");
|
|
65
|
+
|
|
66
|
+
.m-#{$escaped},
|
|
67
|
+
.m#{$escaped} {
|
|
68
|
+
margin: $converted-value;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mr-#{$escaped},
|
|
72
|
+
.mr#{$escaped} {
|
|
73
|
+
margin-right: $converted-value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ml-#{$escaped},
|
|
77
|
+
.ml#{$escaped} {
|
|
78
|
+
margin-left: $converted-value;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.mt-#{$escaped},
|
|
82
|
+
.mt#{$escaped} {
|
|
83
|
+
margin-top: $converted-value;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.mb-#{$escaped},
|
|
87
|
+
.mb#{$escaped} {
|
|
88
|
+
margin-bottom: $converted-value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.mx-#{$escaped},
|
|
92
|
+
.mx#{$escaped} {
|
|
93
|
+
margin-left: $converted-value;
|
|
94
|
+
margin-right: $converted-value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.my-#{$escaped},
|
|
98
|
+
.my#{$escaped} {
|
|
99
|
+
margin-top: $converted-value;
|
|
100
|
+
margin-bottom: $converted-value;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.-m-#{$escaped},
|
|
104
|
+
.-m#{$escaped} {
|
|
105
|
+
margin: -$converted-value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.-mr-#{$escaped},
|
|
109
|
+
.-mr#{$escaped} {
|
|
110
|
+
margin-right: -$converted-value;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.-ml-#{$escaped},
|
|
114
|
+
.-ml#{$escaped} {
|
|
115
|
+
margin-left: -$converted-value;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.-mt-#{$escaped},
|
|
119
|
+
.-mt#{$escaped} {
|
|
120
|
+
margin-top: -$converted-value;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.-mb-#{$escaped},
|
|
124
|
+
.-mb#{$escaped} {
|
|
125
|
+
margin-bottom: -$converted-value;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.-mx-#{$escaped},
|
|
129
|
+
.-mx#{$escaped} {
|
|
130
|
+
margin-left: -$converted-value;
|
|
131
|
+
margin-right: -$converted-value;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.-my-#{$escaped},
|
|
135
|
+
.-my#{$escaped} {
|
|
136
|
+
margin-top: -$converted-value;
|
|
137
|
+
margin-bottom: -$converted-value;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@mixin width-classes($size-name, $value) {
|
|
142
|
+
$converted-value: utility.px-to-rem($value);
|
|
143
|
+
$escaped: utility.str-replace($size-name, ".", "\\.");
|
|
144
|
+
|
|
145
|
+
.w-#{$escaped},
|
|
146
|
+
.w#{$escaped} {
|
|
147
|
+
width: $converted-value;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.min-w-#{$escaped},
|
|
151
|
+
.minw#{$escaped} {
|
|
152
|
+
min-width: $converted-value;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.max-w-#{$escaped},
|
|
156
|
+
.maxw#{$escaped} {
|
|
157
|
+
max-width: $converted-value;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@mixin height-classes($size-name, $value) {
|
|
162
|
+
$converted-value: utility.px-to-rem($value);
|
|
163
|
+
$escaped: utility.str-replace($size-name, ".", "\\.");
|
|
164
|
+
|
|
165
|
+
.h-#{$escaped},
|
|
166
|
+
.h#{$escaped} {
|
|
167
|
+
height: $converted-value;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.min-h-#{$escaped},
|
|
171
|
+
.minh#{$escaped} {
|
|
172
|
+
min-height: $converted-value;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.max-h-#{$escaped},
|
|
176
|
+
.maxh#{$escaped} {
|
|
177
|
+
max-height: $converted-value;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@mixin size-classes($size-name, $value) {
|
|
182
|
+
$converted-value: utility.px-to-rem($value);
|
|
183
|
+
$escaped: utility.str-replace($size-name, ".", "\\.");
|
|
184
|
+
|
|
185
|
+
.size-#{$escaped},
|
|
186
|
+
.size#{$escaped} {
|
|
187
|
+
width: $converted-value;
|
|
188
|
+
height: $converted-value;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:root {
|
|
193
|
+
@each $size, $value in config.$base-sizes {
|
|
194
|
+
$name: utility.str-replace("#{$size}", ".", "_");
|
|
195
|
+
--size-#{$name}: #{utility.px-to-rem($value)};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
$size: 10;
|
|
199
|
+
|
|
200
|
+
@while $size <= config.$highest-multiplier {
|
|
201
|
+
--size-#{$size}: #{utility.px-to-rem(config.$base-size * $size)};
|
|
202
|
+
$size: $size + 1;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@each $size, $value in config.$base-sizes {
|
|
207
|
+
@include padding-classes($size, $value);
|
|
208
|
+
@include margin-classes($size, $value);
|
|
209
|
+
@include width-classes($size, $value);
|
|
210
|
+
@include height-classes($size, $value);
|
|
211
|
+
@include size-classes($size, $value);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
//extended sizes
|
|
215
|
+
$size: 10;
|
|
216
|
+
|
|
217
|
+
@while $size <=config.$highest-multiplier {
|
|
218
|
+
@include padding-classes($size, config.$base-size * $size);
|
|
219
|
+
@include margin-classes($size, config.$base-size * $size);
|
|
220
|
+
@include width-classes($size, config.$base-size * $size);
|
|
221
|
+
@include height-classes($size, config.$base-size * $size);
|
|
222
|
+
@include size-classes($size, config.$base-size * $size);
|
|
223
|
+
$size: $size + 1;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.m-auto {
|
|
227
|
+
margin: auto;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.mx-auto {
|
|
231
|
+
margin-left: auto;
|
|
232
|
+
margin-right: auto;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.my-auto {
|
|
236
|
+
margin-top: auto;
|
|
237
|
+
margin-bottom: auto;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.mt-auto {
|
|
241
|
+
margin-top: auto;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.mb-auto {
|
|
245
|
+
margin-bottom: auto;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.ml-auto {
|
|
249
|
+
margin-left: auto;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.mr-auto {
|
|
253
|
+
margin-right: auto;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.w-auto {
|
|
257
|
+
width: auto;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Fractional widths and heights
|
|
261
|
+
@each $columns in config.$layout-divisions {
|
|
262
|
+
@for $span from 1 through ($columns - 1) {
|
|
263
|
+
$size: math.percentage(math.div($span, $columns));
|
|
264
|
+
|
|
265
|
+
.w-#{$span}\/#{$columns} {
|
|
266
|
+
width: $size;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.h-#{$span}\/#{$columns} {
|
|
270
|
+
height: $size;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.w-full {
|
|
276
|
+
width: 100%;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.w-screen {
|
|
280
|
+
width: 100vw;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.w-svw {
|
|
284
|
+
width: 100svw;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.w-lvw {
|
|
288
|
+
width: 100lvw;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.w-dvw {
|
|
292
|
+
width: 100dvw;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.w-min {
|
|
296
|
+
width: min-content;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.w-max {
|
|
300
|
+
width: max-content;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.w-fit {
|
|
304
|
+
width: fit-content;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.h-full {
|
|
308
|
+
height: 100%;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.h-screen {
|
|
312
|
+
height: 100vh;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.h-svh {
|
|
316
|
+
height: 100svh;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.h-lvh {
|
|
320
|
+
height: 100lvh;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.h-dvh {
|
|
324
|
+
height: 100dvh;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.h-min {
|
|
328
|
+
height: min-content;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.h-max {
|
|
332
|
+
height: max-content;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.h-fit {
|
|
336
|
+
height: fit-content;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.h-auto {
|
|
340
|
+
height: auto;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Min/max widths
|
|
344
|
+
.min-w-full {
|
|
345
|
+
min-width: 100%;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.min-w-screen {
|
|
349
|
+
min-width: 100vw;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.min-w-min {
|
|
353
|
+
min-width: min-content;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.min-w-max {
|
|
357
|
+
min-width: max-content;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.min-w-fit {
|
|
361
|
+
min-width: fit-content;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.max-w-full {
|
|
365
|
+
max-width: 100%;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.max-w-screen {
|
|
369
|
+
max-width: 100vw;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.max-w-none {
|
|
373
|
+
max-width: none;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.max-w-min {
|
|
377
|
+
max-width: min-content;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.max-w-max {
|
|
381
|
+
max-width: max-content;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.max-w-fit {
|
|
385
|
+
max-width: fit-content;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Min/max heights
|
|
389
|
+
.min-h-full {
|
|
390
|
+
min-height: 100%;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.min-h-screen {
|
|
394
|
+
min-height: 100vh;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.min-h-svh {
|
|
398
|
+
min-height: 100svh;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.min-h-dvh {
|
|
402
|
+
min-height: 100dvh;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.min-h-0 {
|
|
406
|
+
min-height: 0;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.max-h-full {
|
|
410
|
+
max-height: 100%;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.max-h-screen {
|
|
414
|
+
max-height: 100vh;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.max-h-svh {
|
|
418
|
+
max-height: 100svh;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.max-h-dvh {
|
|
422
|
+
max-height: 100dvh;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.max-h-none {
|
|
426
|
+
max-height: none;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.size-full {
|
|
430
|
+
width: 100%;
|
|
431
|
+
height: 100%;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.size-auto {
|
|
435
|
+
width: auto;
|
|
436
|
+
height: auto;
|
|
437
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use "config";
|
|
2
|
+
@use "utility";
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
|
|
6
|
+
// ─── Lookups ──────────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
@function font-size($name) {
|
|
9
|
+
@return utility.px-to-rem(list.nth(map.get(config.$font-sizes, $name), 1));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@function font-weight($name) {
|
|
13
|
+
@return map.get(config.$font-weights, $name);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:root {
|
|
17
|
+
--font-family: #{config.$font-family};
|
|
18
|
+
|
|
19
|
+
@each $name, $value in config.$font-weights {
|
|
20
|
+
--font-weight-#{$name}: #{$value};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@each $name, $values in config.$font-sizes {
|
|
24
|
+
--text-#{$name}: #{utility.px-to-rem(list.nth($values, 1))};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
body {
|
|
29
|
+
font-family: config.$font-family;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
h1,
|
|
33
|
+
h2,
|
|
34
|
+
h3,
|
|
35
|
+
h4,
|
|
36
|
+
h5,
|
|
37
|
+
h6,
|
|
38
|
+
p,
|
|
39
|
+
a,
|
|
40
|
+
span,
|
|
41
|
+
li,
|
|
42
|
+
button,
|
|
43
|
+
label,
|
|
44
|
+
td,
|
|
45
|
+
th,
|
|
46
|
+
blockquote,
|
|
47
|
+
figcaption,
|
|
48
|
+
caption,
|
|
49
|
+
small,
|
|
50
|
+
code {
|
|
51
|
+
|
|
52
|
+
//weights
|
|
53
|
+
@each $name, $value in config.$font-weights {
|
|
54
|
+
$escaped: utility.str-replace($name, ".", "\\.");
|
|
55
|
+
|
|
56
|
+
.#{$escaped} {
|
|
57
|
+
font-weight: $value;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
//style
|
|
62
|
+
.italic {
|
|
63
|
+
font-style: italic;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.not-italic {
|
|
67
|
+
font-style: normal;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Font sizes
|
|
72
|
+
@each $name, $values in config.$font-sizes {
|
|
73
|
+
.text-#{$name} {
|
|
74
|
+
font-size: utility.px-to-rem(list.nth($values, 1));
|
|
75
|
+
line-height: list.nth($values, 2);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
//TW weights
|
|
80
|
+
@each $name, $value in config.$font-weights {
|
|
81
|
+
.font-#{$name} {
|
|
82
|
+
font-weight: $value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@use "config";
|
|
2
|
+
@use "sass:string";
|
|
3
|
+
@use "sass:math";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
|
|
6
|
+
@function px-to-rem($px) { @return math.div($px, config.$base-font-size) * 1rem; }
|
|
7
|
+
|
|
8
|
+
@function str-replace($string, $search, $replace: "") {
|
|
9
|
+
// Coerce the input to a string, just in case it is a raw number like 2.5
|
|
10
|
+
$string: $string + "";
|
|
11
|
+
$index: string.index($string, $search);
|
|
12
|
+
|
|
13
|
+
@if $index {
|
|
14
|
+
@return string.slice($string, 1, $index - 1)+$replace +str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@return $string;
|
|
18
|
+
}
|
package/src/crayon.scss
ADDED