eva-css-fluid 1.0.1
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/README.md +248 -0
- package/dist/eva.css +5689 -0
- package/dist/eva.css.map +1 -0
- package/dist/eva.min.css +1 -0
- package/dist/eva.min.css.map +1 -0
- package/package.json +54 -0
- package/src/_colors.scss +198 -0
- package/src/_components.scss +434 -0
- package/src/_config.scss +70 -0
- package/src/_eva.scss +334 -0
- package/src/_flex.scss +296 -0
- package/src/_font.scss +63 -0
- package/src/_gradients.scss +128 -0
- package/src/_grid.scss +137 -0
- package/src/_reset.scss +83 -0
- package/src/_theme.scss +99 -0
- package/src/_utils.scss +114 -0
- package/src/index.scss +60 -0
package/src/_eva.scss
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
// START FRAMEWORK
|
|
2
|
+
// EVA-CSS v1.0
|
|
3
|
+
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
@use "sass:map";
|
|
6
|
+
@use "sass:list";
|
|
7
|
+
@use "sass:meta";
|
|
8
|
+
|
|
9
|
+
$max: 1rem;
|
|
10
|
+
$Φ: 1.61803398875;
|
|
11
|
+
$min: 0.5rem;
|
|
12
|
+
$ez: 142.4;
|
|
13
|
+
$unit: 1rem;
|
|
14
|
+
$unit-fluid: 1vw;
|
|
15
|
+
|
|
16
|
+
$screen: 1440;
|
|
17
|
+
|
|
18
|
+
$eva: 0;
|
|
19
|
+
|
|
20
|
+
// CONFIGURATION ENVIRONNEMENT
|
|
21
|
+
// =============================================================================
|
|
22
|
+
// Variables pour contrôler le mode de génération selon l'environnement
|
|
23
|
+
|
|
24
|
+
// DÉVELOPPEMENT (serveur MCP Figma + IA)
|
|
25
|
+
// $px-rem-suffix: true → Ajoute valeurs statiques -px et -rem pour debug uniquement
|
|
26
|
+
// $build-class: false → Utilise uniquement les variables CSS (pas de classes générées)
|
|
27
|
+
// $build-color-classes: false → Pas de génération des classes de couleurs
|
|
28
|
+
|
|
29
|
+
// PRODUCTION (avec script de purge CSS)
|
|
30
|
+
// $px-rem-suffix: false → Supprime les valeurs debug -px et -rem
|
|
31
|
+
// $build-class: true → Génère toutes les classes CSS
|
|
32
|
+
// $build-color-classes: true → Génère les classes de couleurs
|
|
33
|
+
|
|
34
|
+
// Configuration arrays
|
|
35
|
+
$sizes: 4, 8, 12, 16, 24, 32, 48, 64, 96, 128 !default;
|
|
36
|
+
$font-sizes: 12, 14, 16, 18, 20, 24, 32, 48 !default;
|
|
37
|
+
|
|
38
|
+
// Configuration flags
|
|
39
|
+
$px-rem-suffix: true !default; // Valeurs statiques de debug uniquement
|
|
40
|
+
$build-class: false !default; // DEV: false | PROD: true
|
|
41
|
+
$custom-class: false !default; // true pour filtrage personnalisé des classes
|
|
42
|
+
$name-by-size: true !default; // true = utilise les valeurs, false = utilise l'index
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
$setters-type: "__", "_", "", "-", "-px", "-rem";
|
|
47
|
+
|
|
48
|
+
$sizing-class: "__", "_", "", "-";
|
|
49
|
+
@if $px-rem-suffix {
|
|
50
|
+
$sizing-class: list.append($sizing-class, "-px");
|
|
51
|
+
$sizing-class: list.append($sizing-class, "-rem");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
$font-size-class: "__", "_", "";
|
|
55
|
+
@if $px-rem-suffix {
|
|
56
|
+
$font-size-class: list.append($font-size-class, "-px");
|
|
57
|
+
$font-size-class: list.append($font-size-class, "-rem");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
$properties: (
|
|
61
|
+
w: width,
|
|
62
|
+
mw: max-width,
|
|
63
|
+
h: height,
|
|
64
|
+
p: padding,
|
|
65
|
+
px: padding-inline,
|
|
66
|
+
pr: padding-right,
|
|
67
|
+
py: padding-block,
|
|
68
|
+
br: border-radius,
|
|
69
|
+
mb: margin-bottom,
|
|
70
|
+
mr: margin-right,
|
|
71
|
+
ml: margin-left,
|
|
72
|
+
mt: margin-top,
|
|
73
|
+
pt: padding-top,
|
|
74
|
+
pb: padding-bottom,
|
|
75
|
+
g: gap,
|
|
76
|
+
gap: gap,
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
$font-properties: (
|
|
81
|
+
fs: font-size,
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@function round2($number) {
|
|
87
|
+
@return math.div(math.round($number * 100), 100);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@function getPercent($size, $ratio: 100) {
|
|
91
|
+
@return round2((math.div($size, $screen)) * $ratio);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@function toPx($size) {
|
|
95
|
+
@return $size * 1px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@function toRem($size) {
|
|
99
|
+
@return math.div($size, 16) * 1rem;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@function getMinRem($percent) {
|
|
103
|
+
@return round2($percent * $min);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@function getMaxRem($percent) {
|
|
107
|
+
@return round2($percent * $max);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@function getVW($percent) {
|
|
111
|
+
@return round2($percent * $unit-fluid);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@function getFinalMinDiv($size, $ratio) {
|
|
115
|
+
@return round2(math.div($size, $ratio));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@function getFinalMinMulti($size, $ratio) {
|
|
119
|
+
@return round2($size * $ratio);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@mixin getAllSizingClass($prop, $key, $eva) {
|
|
125
|
+
@each $class in $sizing-class {
|
|
126
|
+
.#{$key}-#{$eva}#{$class} {
|
|
127
|
+
#{$prop}: var(--#{$eva}#{$class});
|
|
128
|
+
@if $key =='gap' {
|
|
129
|
+
--current-gap: var(--#{$eva}-px);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@mixin getAllFontSizeClass($prop, $key, $eva) {
|
|
136
|
+
@each $class in $font-size-class {
|
|
137
|
+
.#{$key}-#{$eva}#{$class} {
|
|
138
|
+
#{$prop}: var(--#{$key}-#{$eva}#{$class});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@function is-map($var) {
|
|
144
|
+
@return meta.type-of($var) == "map";
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// GÉNÉRATION DES VARIABLES CSS PERSONNALISÉES
|
|
148
|
+
// =============================================================================
|
|
149
|
+
// Génère toujours les variables CSS (mode dev et prod)
|
|
150
|
+
:root {
|
|
151
|
+
// Variables pour les tailles de spacing/layout
|
|
152
|
+
@each $size in $sizes {
|
|
153
|
+
$eva: $eva + 1;
|
|
154
|
+
@if $name-by-size {
|
|
155
|
+
$eva: $size;
|
|
156
|
+
}
|
|
157
|
+
$calc-percent: getPercent($size);
|
|
158
|
+
$calc-percent_: getPercent($size, $ez);
|
|
159
|
+
|
|
160
|
+
$size-px: toPx($size);
|
|
161
|
+
$size-rem: toRem($size);
|
|
162
|
+
|
|
163
|
+
$rem-min: getMinRem($calc-percent);
|
|
164
|
+
$rem-max: getMaxRem($calc-percent);
|
|
165
|
+
|
|
166
|
+
$vw-light: #{round2(math.div(getVW($calc-percent), 4))} "+" #{round2(math.div($size-rem, 1.33))};
|
|
167
|
+
$vw-medium: #{round2(math.div(getVW($calc-percent), 2))} "+" #{round2(math.div($size-rem, 2))};
|
|
168
|
+
$vw-strong: #{round2(math.div(getVW($calc-percent), 1.33))} "+" #{round2(math.div($size-rem, 4))};
|
|
169
|
+
$vw-extrem: #{getVW($calc-percent_)} "-" #{$rem-min};
|
|
170
|
+
|
|
171
|
+
$final-min__: $min;
|
|
172
|
+
$final-min_: getFinalMinDiv($rem-min, $Φ);
|
|
173
|
+
$final-min: getFinalMinMulti($rem-min, $Φ);
|
|
174
|
+
|
|
175
|
+
$css-vars: (
|
|
176
|
+
"__": (
|
|
177
|
+
min: $final-min__,
|
|
178
|
+
fluid: $vw-extrem,
|
|
179
|
+
max: $rem-max,
|
|
180
|
+
),
|
|
181
|
+
"_": (
|
|
182
|
+
min: $final-min_,
|
|
183
|
+
fluid: $vw-strong,
|
|
184
|
+
max: $rem-max,
|
|
185
|
+
),
|
|
186
|
+
"": (
|
|
187
|
+
min: $rem-min,
|
|
188
|
+
fluid: $vw-medium,
|
|
189
|
+
max: $rem-max,
|
|
190
|
+
),
|
|
191
|
+
"-": (
|
|
192
|
+
min: $final-min,
|
|
193
|
+
fluid: $vw-light,
|
|
194
|
+
max: $rem-max,
|
|
195
|
+
),
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
// Ajout des variables de debug en mode développement
|
|
199
|
+
@if $px-rem-suffix {
|
|
200
|
+
$css-vars-dev: (
|
|
201
|
+
"-px": $size-px,
|
|
202
|
+
"-rem": $size-rem,
|
|
203
|
+
);
|
|
204
|
+
$css-vars: map.merge($css-vars, $css-vars-dev);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@each $key, $prop in $css-vars {
|
|
208
|
+
@if (is-map($prop)) {
|
|
209
|
+
--#{$eva}#{$key}: clamp(#{map.get($prop, min)}, #{map.get($prop, fluid)}, #{map.get($prop, max)});
|
|
210
|
+
} @else {
|
|
211
|
+
--#{$eva}#{$key}: #{$prop};
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// Variables pour les font-sizes
|
|
217
|
+
$eva: 0;
|
|
218
|
+
$min: 0.6rem;
|
|
219
|
+
$Φ: 1.3;
|
|
220
|
+
$fs: "fs";
|
|
221
|
+
|
|
222
|
+
@each $size in $font-sizes {
|
|
223
|
+
$eva: $eva + 1;
|
|
224
|
+
@if $name-by-size {
|
|
225
|
+
$eva: $size;
|
|
226
|
+
}
|
|
227
|
+
$calc-percent: getPercent($size);
|
|
228
|
+
|
|
229
|
+
$size-px: toPx($size);
|
|
230
|
+
$size-rem: toRem($size);
|
|
231
|
+
|
|
232
|
+
$rem-min: getMinRem($calc-percent);
|
|
233
|
+
|
|
234
|
+
$vw-light: #{round2(math.div(getVW($calc-percent), 4))} "+" #{round2(math.div($size-rem, 1.33))};
|
|
235
|
+
$vw-medium: #{round2(math.div(getVW($calc-percent), 2))} "+" #{round2(math.div($size-rem, 2))};
|
|
236
|
+
$vw-strong: #{round2(math.div(getVW($calc-percent), 1.33))} "+" #{round2(math.div($size-rem, 4))};
|
|
237
|
+
|
|
238
|
+
$rem-max: getMaxRem($calc-percent);
|
|
239
|
+
|
|
240
|
+
$final-min__: getFinalMinDiv($rem-min, $Φ);
|
|
241
|
+
$final-min: getFinalMinMulti($rem-min, $Φ);
|
|
242
|
+
|
|
243
|
+
$css-fs-vars: (
|
|
244
|
+
"__": (
|
|
245
|
+
min: $final-min__,
|
|
246
|
+
fluid: $vw-strong,
|
|
247
|
+
max: $rem-max
|
|
248
|
+
),
|
|
249
|
+
"_": (
|
|
250
|
+
min: $rem-min,
|
|
251
|
+
fluid: $vw-medium,
|
|
252
|
+
max: $rem-max
|
|
253
|
+
),
|
|
254
|
+
"": (
|
|
255
|
+
min: $final-min,
|
|
256
|
+
fluid: $vw-light,
|
|
257
|
+
max: $rem-max
|
|
258
|
+
),
|
|
259
|
+
);
|
|
260
|
+
|
|
261
|
+
// Ajout des variables de debug pour les font-sizes en mode développement
|
|
262
|
+
@if $px-rem-suffix {
|
|
263
|
+
$css-vars-dev: (
|
|
264
|
+
"-px": $size-px,
|
|
265
|
+
"-rem": $size-rem,
|
|
266
|
+
);
|
|
267
|
+
$css-fs-vars: map.merge($css-fs-vars, $css-vars-dev);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@each $key, $prop in $css-fs-vars {
|
|
271
|
+
@if (is-map($prop)) {
|
|
272
|
+
|
|
273
|
+
--#{$fs}-#{$eva}#{$key}: clamp(#{map.get($prop, min)}, #{map.get($prop, fluid)}, #{map.get($prop, max)});
|
|
274
|
+
|
|
275
|
+
} @else {
|
|
276
|
+
--#{$fs}-#{$eva}#{$key}: #{$prop};
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@if $build-class {
|
|
283
|
+
// GÉNÉRATION DES CLASSES CSS (MODE PRODUCTION)
|
|
284
|
+
// Génère les classes utilitaires pour toutes les propriétés
|
|
285
|
+
$eva: 0;
|
|
286
|
+
@each $size in $sizes {
|
|
287
|
+
$eva: $eva + 1;
|
|
288
|
+
@if $name-by-size {
|
|
289
|
+
$eva: $size;
|
|
290
|
+
}
|
|
291
|
+
@each $key, $prop in $properties {
|
|
292
|
+
// Vérifier si cette propriété doit être générée pour cette taille
|
|
293
|
+
$should-generate: false;
|
|
294
|
+
@if $custom-class {
|
|
295
|
+
// Si custom-class est true, utiliser le filtrage par $class-config
|
|
296
|
+
$allowed-sizes: map.get($class-config, $key);
|
|
297
|
+
@if $allowed-sizes {
|
|
298
|
+
@each $allowed-size in $allowed-sizes {
|
|
299
|
+
@if $allowed-size == $size {
|
|
300
|
+
$should-generate: true;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
} @else {
|
|
305
|
+
// Si custom-class est false, générer toutes les classes
|
|
306
|
+
$should-generate: true;
|
|
307
|
+
}
|
|
308
|
+
@if $should-generate {
|
|
309
|
+
@include getAllSizingClass($prop, $key, $eva);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
$eva: 0;
|
|
316
|
+
$min: 0.6rem;
|
|
317
|
+
//$ez : 110;
|
|
318
|
+
|
|
319
|
+
$Φ: 1.3;
|
|
320
|
+
$fs: "fs";
|
|
321
|
+
|
|
322
|
+
// GÉNÉRATION DES CLASSES FONT-SIZE (MODE PRODUCTION)
|
|
323
|
+
@if ($build-class) {
|
|
324
|
+
$eva: 0;
|
|
325
|
+
@each $size in $font-sizes {
|
|
326
|
+
$eva: $eva + 1;
|
|
327
|
+
@if $name-by-size {
|
|
328
|
+
$eva: $size;
|
|
329
|
+
}
|
|
330
|
+
@each $key, $prop in $font-properties {
|
|
331
|
+
@include getAllFontSizeClass($prop, $key, $eva);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
package/src/_flex.scss
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
// ===========================================
|
|
2
|
+
// EVA CSS FLEXBOX SYSTEM
|
|
3
|
+
// ===========================================
|
|
4
|
+
// Enhanced flexbox utility system with comprehensive layout controls
|
|
5
|
+
// Unique selectors with hyphens to avoid CSS conflicts
|
|
6
|
+
|
|
7
|
+
// ===========================================
|
|
8
|
+
// CORE FLEX CONTAINER
|
|
9
|
+
// ===========================================
|
|
10
|
+
|
|
11
|
+
.flex {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row; // Default to row
|
|
14
|
+
|
|
15
|
+
// ===========================================
|
|
16
|
+
// FALLBACK MODIFIERS (when no .x or .y specified)
|
|
17
|
+
// ===========================================
|
|
18
|
+
|
|
19
|
+
&.center {
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.start {
|
|
25
|
+
align-items: flex-start;
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.end {
|
|
30
|
+
align-items: flex-end;
|
|
31
|
+
justify-content: flex-end;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.space {
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
align-items: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.around {
|
|
40
|
+
justify-content: space-around;
|
|
41
|
+
align-items: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.evenly {
|
|
45
|
+
justify-content: space-evenly;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// ===========================================
|
|
50
|
+
// FLEX Y DIRECTION - UNIQUE SELECTORS
|
|
51
|
+
// ===========================================
|
|
52
|
+
|
|
53
|
+
&.y {
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
justify-content: flex-start;
|
|
56
|
+
align-items: flex-start;
|
|
57
|
+
|
|
58
|
+
// SIMPLE combinations (justify-content only)
|
|
59
|
+
&.start { justify-content: flex-start; }
|
|
60
|
+
&.center { justify-content: center; align-items: center; }
|
|
61
|
+
&.end { justify-content: flex-end; }
|
|
62
|
+
&.space { justify-content: space-between; }
|
|
63
|
+
&.around { justify-content: space-around; }
|
|
64
|
+
&.evenly { justify-content: space-evenly; }
|
|
65
|
+
|
|
66
|
+
// START combinations (justify-content: flex-start)
|
|
67
|
+
&.start-start { justify-content: flex-start; align-items: flex-start; }
|
|
68
|
+
&.start-center { justify-content: flex-start; align-items: center; }
|
|
69
|
+
&.start-end { justify-content: flex-start; align-items: flex-end; }
|
|
70
|
+
&.start-stretch { justify-content: flex-start; align-items: stretch; }
|
|
71
|
+
&.start-baseline { justify-content: flex-start; align-items: baseline; }
|
|
72
|
+
|
|
73
|
+
// CENTER combinations (justify-content: center)
|
|
74
|
+
&.center-start { justify-content: center; align-items: flex-start; }
|
|
75
|
+
&.center-center { justify-content: center; align-items: center; }
|
|
76
|
+
&.center-end { justify-content: center; align-items: flex-end; }
|
|
77
|
+
&.center-stretch { justify-content: center; align-items: stretch; }
|
|
78
|
+
&.center-baseline { justify-content: center; align-items: baseline; }
|
|
79
|
+
|
|
80
|
+
// END combinations (justify-content: flex-end)
|
|
81
|
+
&.end-start { justify-content: flex-end; align-items: flex-start; }
|
|
82
|
+
&.end-center { justify-content: flex-end; align-items: center; }
|
|
83
|
+
&.end-end { justify-content: flex-end; align-items: flex-end; }
|
|
84
|
+
&.end-stretch { justify-content: flex-end; align-items: stretch; }
|
|
85
|
+
&.end-baseline { justify-content: flex-end; align-items: baseline; }
|
|
86
|
+
|
|
87
|
+
// SPACE combinations (justify-content: space-between)
|
|
88
|
+
&.space-start { justify-content: space-between; align-items: flex-start; }
|
|
89
|
+
&.space-center { justify-content: space-between; align-items: center; }
|
|
90
|
+
&.space-end { justify-content: space-between; align-items: flex-end; }
|
|
91
|
+
&.space-stretch { justify-content: space-between; align-items: stretch; }
|
|
92
|
+
&.space-baseline { justify-content: space-between; align-items: baseline; }
|
|
93
|
+
|
|
94
|
+
// AROUND combinations (justify-content: space-around)
|
|
95
|
+
&.around-start { justify-content: space-around; align-items: flex-start; }
|
|
96
|
+
&.around-center { justify-content: space-around; align-items: center; }
|
|
97
|
+
&.around-end { justify-content: space-around; align-items: flex-end; }
|
|
98
|
+
&.around-stretch { justify-content: space-around; align-items: stretch; }
|
|
99
|
+
&.around-baseline { justify-content: space-around; align-items: baseline; }
|
|
100
|
+
|
|
101
|
+
// EVENLY combinations (justify-content: space-evenly)
|
|
102
|
+
&.evenly-start { justify-content: space-evenly; align-items: flex-start; }
|
|
103
|
+
&.evenly-center { justify-content: space-evenly; align-items: center; }
|
|
104
|
+
&.evenly-end { justify-content: space-evenly; align-items: flex-end; }
|
|
105
|
+
&.evenly-stretch { justify-content: space-evenly; align-items: stretch; }
|
|
106
|
+
&.evenly-baseline { justify-content: space-evenly; align-items: baseline; }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ===========================================
|
|
110
|
+
// FLEX X DIRECTION - UNIQUE SELECTORS
|
|
111
|
+
// ===========================================
|
|
112
|
+
|
|
113
|
+
&.x {
|
|
114
|
+
flex-direction: row;
|
|
115
|
+
justify-content: flex-start;
|
|
116
|
+
align-items: flex-start;
|
|
117
|
+
|
|
118
|
+
// SIMPLE combinations (justify-content only)
|
|
119
|
+
&.start { justify-content: flex-start; }
|
|
120
|
+
&.center { justify-content: center; align-items: center; }
|
|
121
|
+
&.end { justify-content: flex-end; }
|
|
122
|
+
&.space { justify-content: space-between; }
|
|
123
|
+
&.around { justify-content: space-around; }
|
|
124
|
+
&.evenly { justify-content: space-evenly; }
|
|
125
|
+
|
|
126
|
+
// START combinations (justify-content: flex-start)
|
|
127
|
+
&.start-start { justify-content: flex-start; align-items: flex-start; }
|
|
128
|
+
&.start-center { justify-content: flex-start; align-items: center; }
|
|
129
|
+
&.start-end { justify-content: flex-start; align-items: flex-end; }
|
|
130
|
+
&.start-stretch { justify-content: flex-start; align-items: stretch; }
|
|
131
|
+
&.start-baseline { justify-content: flex-start; align-items: baseline; }
|
|
132
|
+
|
|
133
|
+
// CENTER combinations (justify-content: center)
|
|
134
|
+
&.center-start { justify-content: center; align-items: flex-start; }
|
|
135
|
+
&.center-center { justify-content: center; align-items: center; }
|
|
136
|
+
&.center-end { justify-content: center; align-items: flex-end; }
|
|
137
|
+
&.center-stretch { justify-content: center; align-items: stretch; }
|
|
138
|
+
&.center-baseline { justify-content: center; align-items: baseline; }
|
|
139
|
+
|
|
140
|
+
// END combinations (justify-content: flex-end)
|
|
141
|
+
&.end-start { justify-content: flex-end; align-items: flex-start; }
|
|
142
|
+
&.end-center { justify-content: flex-end; align-items: center; }
|
|
143
|
+
&.end-end { justify-content: flex-end; align-items: flex-end; }
|
|
144
|
+
&.end-stretch { justify-content: flex-end; align-items: stretch; }
|
|
145
|
+
&.end-baseline { justify-content: flex-end; align-items: baseline; }
|
|
146
|
+
|
|
147
|
+
// SPACE combinations (justify-content: space-between)
|
|
148
|
+
&.space-start { justify-content: space-between; align-items: flex-start; }
|
|
149
|
+
&.space-center { justify-content: space-between; align-items: center; }
|
|
150
|
+
&.space-end { justify-content: space-between; align-items: flex-end; }
|
|
151
|
+
&.space-stretch { justify-content: space-between; align-items: stretch; }
|
|
152
|
+
&.space-baseline { justify-content: space-between; align-items: baseline; }
|
|
153
|
+
|
|
154
|
+
// AROUND combinations (justify-content: space-around)
|
|
155
|
+
&.around-start { justify-content: space-around; align-items: flex-start; }
|
|
156
|
+
&.around-center { justify-content: space-around; align-items: center; }
|
|
157
|
+
&.around-end { justify-content: space-around; align-items: flex-end; }
|
|
158
|
+
&.around-stretch { justify-content: space-around; align-items: stretch; }
|
|
159
|
+
&.around-baseline { justify-content: space-around; align-items: baseline; }
|
|
160
|
+
|
|
161
|
+
// EVENLY combinations (justify-content: space-evenly)
|
|
162
|
+
&.evenly-start { justify-content: space-evenly; align-items: flex-start; }
|
|
163
|
+
&.evenly-center { justify-content: space-evenly; align-items: center; }
|
|
164
|
+
&.evenly-end { justify-content: space-evenly; align-items: flex-end; }
|
|
165
|
+
&.evenly-stretch { justify-content: space-evenly; align-items: stretch; }
|
|
166
|
+
&.evenly-baseline { justify-content: space-evenly; align-items: baseline; }
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// ===========================================
|
|
170
|
+
// EXPLICIT AXIS CONTROL (alternative syntax)
|
|
171
|
+
// ===========================================
|
|
172
|
+
|
|
173
|
+
// Main axis (justify-content) explicit classes
|
|
174
|
+
&.justify-start { justify-content: flex-start; }
|
|
175
|
+
&.justify-center { justify-content: center; }
|
|
176
|
+
&.justify-end { justify-content: flex-end; }
|
|
177
|
+
&.justify-space { justify-content: space-between; }
|
|
178
|
+
&.justify-around { justify-content: space-around; }
|
|
179
|
+
&.justify-evenly { justify-content: space-evenly; }
|
|
180
|
+
|
|
181
|
+
// Cross axis (align-items) explicit classes
|
|
182
|
+
&.items-start { align-items: flex-start; }
|
|
183
|
+
&.items-center { align-items: center; }
|
|
184
|
+
&.items-end { align-items: flex-end; }
|
|
185
|
+
&.items-stretch { align-items: stretch; }
|
|
186
|
+
&.items-baseline { align-items: baseline; }
|
|
187
|
+
|
|
188
|
+
// ===========================================
|
|
189
|
+
// ALIGN CONTENT (FOR MULTI-LINE)
|
|
190
|
+
// ===========================================
|
|
191
|
+
|
|
192
|
+
&.content-start { align-content: flex-start; }
|
|
193
|
+
&.content-center { align-content: center; }
|
|
194
|
+
&.content-end { align-content: flex-end; }
|
|
195
|
+
&.content-space { align-content: space-between; }
|
|
196
|
+
&.content-around { align-content: space-around; }
|
|
197
|
+
&.content-evenly { align-content: space-evenly; }
|
|
198
|
+
|
|
199
|
+
// ===========================================
|
|
200
|
+
// FLEX WRAP MODIFIERS
|
|
201
|
+
// ===========================================
|
|
202
|
+
|
|
203
|
+
&.wrap { flex-wrap: wrap; }
|
|
204
|
+
&.nowrap { flex-wrap: nowrap; }
|
|
205
|
+
&.wrap-reverse { flex-wrap: wrap-reverse; }
|
|
206
|
+
|
|
207
|
+
// ===========================================
|
|
208
|
+
// REVERSE MODIFIERS
|
|
209
|
+
// ===========================================
|
|
210
|
+
|
|
211
|
+
&.reverse {
|
|
212
|
+
&.x { flex-direction: row-reverse; }
|
|
213
|
+
&.y { flex-direction: column-reverse; }
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ===========================================
|
|
218
|
+
// FLEX ITEM MODIFIERS
|
|
219
|
+
// ===========================================
|
|
220
|
+
|
|
221
|
+
// Flex grow, shrink, basis utilities
|
|
222
|
+
.flex-1 { flex: 1 1 0%; }
|
|
223
|
+
.flex-auto { flex: 1 1 auto; }
|
|
224
|
+
.flex-initial { flex: 0 1 auto; }
|
|
225
|
+
.flex-none { flex: none; }
|
|
226
|
+
|
|
227
|
+
// Legacy compatibility
|
|
228
|
+
.stretch { flex: 1; }
|
|
229
|
+
|
|
230
|
+
// Specific flex values
|
|
231
|
+
.flex-2 { flex: 2 1 0%; }
|
|
232
|
+
.flex-3 { flex: 3 1 0%; }
|
|
233
|
+
|
|
234
|
+
// ===========================================
|
|
235
|
+
// ALIGN SELF MODIFIERS
|
|
236
|
+
// ===========================================
|
|
237
|
+
|
|
238
|
+
.self-auto { align-self: auto; }
|
|
239
|
+
.self-start { align-self: flex-start; }
|
|
240
|
+
.self-center { align-self: center; }
|
|
241
|
+
.self-end { align-self: flex-end; }
|
|
242
|
+
.self-stretch { align-self: stretch; }
|
|
243
|
+
.self-baseline { align-self: baseline; }
|
|
244
|
+
|
|
245
|
+
// ===========================================
|
|
246
|
+
// ORDER UTILITIES
|
|
247
|
+
// ===========================================
|
|
248
|
+
|
|
249
|
+
.order-first { order: -9999; }
|
|
250
|
+
.order-last { order: 9999; }
|
|
251
|
+
.order-none { order: 0; }
|
|
252
|
+
|
|
253
|
+
// Numbered orders (1-12 common use cases)
|
|
254
|
+
@for $i from 1 through 12 {
|
|
255
|
+
.order-#{$i} { order: #{$i}; }
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// ===========================================
|
|
259
|
+
// COMMON FLEX PATTERNS
|
|
260
|
+
// ===========================================
|
|
261
|
+
|
|
262
|
+
// Card layouts
|
|
263
|
+
.flex-card {
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
|
|
267
|
+
.flex-card-header,
|
|
268
|
+
.flex-card-footer { flex-shrink: 0; }
|
|
269
|
+
|
|
270
|
+
.flex-card-body { flex: 1; }
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Sidebar layouts
|
|
274
|
+
.flex-sidebar {
|
|
275
|
+
display: flex;
|
|
276
|
+
|
|
277
|
+
.flex-sidebar-nav { flex-shrink: 0; }
|
|
278
|
+
.flex-sidebar-main {
|
|
279
|
+
flex: 1;
|
|
280
|
+
min-width: 0; // Prevent flex item overflow
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Center content patterns
|
|
285
|
+
.flex-center-page {
|
|
286
|
+
display: flex;
|
|
287
|
+
min-height: 100vh;
|
|
288
|
+
align-items: center;
|
|
289
|
+
justify-content: center;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.flex-center-content {
|
|
293
|
+
display: flex;
|
|
294
|
+
align-items: center;
|
|
295
|
+
justify-content: center;
|
|
296
|
+
}
|
package/src/_font.scss
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Importez le module math si vous utilisez une version moderne de Sass
|
|
2
|
+
@use "sass:math";
|
|
3
|
+
|
|
4
|
+
$wght-min: 200;
|
|
5
|
+
$wght-max: 900;
|
|
6
|
+
$wght-step: 100;
|
|
7
|
+
|
|
8
|
+
$wdth-min: 50;
|
|
9
|
+
$wdth-max: 170;
|
|
10
|
+
$wdth-step: 10;
|
|
11
|
+
|
|
12
|
+
:root {
|
|
13
|
+
--title-font: "scale-variable";
|
|
14
|
+
--body-font: "Noto Sans Display";
|
|
15
|
+
|
|
16
|
+
--title-weight: 800;
|
|
17
|
+
--title-width: 100;
|
|
18
|
+
--sub-title-weight:700;
|
|
19
|
+
--sub-title-width: 100;
|
|
20
|
+
--sub-sub-title-weight: 600;
|
|
21
|
+
--sub-sub-title-width: 60;
|
|
22
|
+
--sub-sub-title-spacing: 0.1em;
|
|
23
|
+
--body-weight: 400;
|
|
24
|
+
|
|
25
|
+
$wght-steps: math.div(($wght-max - $wght-min), $wght-step) + 1;
|
|
26
|
+
@for $i from 0 through $wght-steps - 1 {
|
|
27
|
+
--f-wg-#{$i + 1}: #{$wght-min + ($wght-step * $i)};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
$wdth-steps: math.div(($wdth-max - $wdth-min), $wdth-step) + 1;
|
|
31
|
+
@for $i from 0 through $wdth-steps - 1 {
|
|
32
|
+
--f-wd-#{$i + 1}: #{$wdth-min + ($wdth-step * $i)};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
$wght-steps: math.div(($wght-max - $wght-min), $wght-step) + 1;
|
|
37
|
+
@for $i from 0 through $wght-steps - 1 {
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
.fwg-#{$i + 1} {
|
|
41
|
+
--current-f-wg: var(--f-wg-#{$i + 1});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
$wdth-steps: math.div(($wdth-max - $wdth-min), $wdth-step) + 1;
|
|
46
|
+
@for $i from 0 through $wdth-steps - 1 {
|
|
47
|
+
.fwd-#{$i + 1} {
|
|
48
|
+
--current-f-wd: var(--f-wd-#{$i + 1});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.f-scale {
|
|
53
|
+
font-variation-settings: "wght" var(--current-f-wg, 400), "wdth" var(--current-f-wd, 100), "ital" 0;
|
|
54
|
+
&.offset {
|
|
55
|
+
position: relative;
|
|
56
|
+
padding-top: 0.25em;
|
|
57
|
+
&_{
|
|
58
|
+
position: relative;
|
|
59
|
+
display: inline-block;
|
|
60
|
+
padding-top: 0.25em;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|