yummacss 2.1.0 → 3.0.0

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.
Files changed (74) hide show
  1. package/LICENSE +17 -18
  2. package/README.md +16 -14
  3. package/dist/cli/commands/build.js +44 -0
  4. package/dist/cli/commands/init.js +17 -0
  5. package/dist/cli/commands/watch.js +36 -0
  6. package/dist/cli/config/defaultConfig.js +8 -0
  7. package/dist/cli/services/configLoader.js +16 -0
  8. package/dist/cli/services/minifyService.js +16 -0
  9. package/dist/cli/services/purgeService.js +12 -0
  10. package/dist/cli/services/scssCompiler.js +34 -0
  11. package/dist/cli/src/cli.js +19 -0
  12. package/dist/cli/utils/cli-ui.js +13 -0
  13. package/dist/cli/utils/ui.js +15 -0
  14. package/dist/yumma.css +126823 -190421
  15. package/dist/yumma.min.css +1 -1
  16. package/package.json +50 -24
  17. package/src/_fonts.scss +8 -6
  18. package/src/abstracts/_breakpoints.scss +12 -10
  19. package/src/abstracts/_index.scss +5 -0
  20. package/src/abstracts/_theme.scss +19 -16
  21. package/src/abstracts/_variables.scss +68 -55
  22. package/src/abstracts/functions/_create-values.scss +16 -0
  23. package/src/abstracts/functions/_ignore-neutral.scss +9 -0
  24. package/src/abstracts/functions/_index.scss +2 -0
  25. package/src/abstracts/mixins/_create-colors.scss +39 -0
  26. package/src/abstracts/mixins/_create-utilities.scss +39 -0
  27. package/src/abstracts/mixins/_extend-utilities.scss +24 -0
  28. package/src/abstracts/mixins/_index.scss +3 -0
  29. package/src/reset/_stylecent.scss +235 -0
  30. package/src/utilities/_background.scss +95 -0
  31. package/src/utilities/_border.scss +313 -0
  32. package/src/utilities/_box-model.scss +274 -91
  33. package/src/utilities/_color.scss +85 -0
  34. package/src/utilities/_effect.scss +98 -0
  35. package/src/utilities/_flexbox.scss +122 -56
  36. package/src/utilities/_grid.scss +52 -95
  37. package/src/utilities/_index.scss +14 -0
  38. package/src/utilities/_interactivity.scss +304 -0
  39. package/src/utilities/_outline.scss +53 -0
  40. package/src/utilities/_positioning.scss +436 -0
  41. package/src/utilities/_svg.scss +27 -0
  42. package/src/utilities/_table.scss +35 -0
  43. package/src/utilities/_transform.scss +164 -0
  44. package/src/utilities/_typography.scss +167 -57
  45. package/src/utilities/maps/_index.scss +12 -0
  46. package/src/utilities/maps/box-model/_dimension.scss +16 -0
  47. package/src/utilities/maps/box-model/_height.scss +16 -0
  48. package/src/utilities/maps/box-model/_margin.scss +10 -0
  49. package/src/utilities/maps/box-model/_padding.scss +10 -0
  50. package/src/utilities/maps/box-model/_width.scss +16 -0
  51. package/src/utilities/maps/flexbox/_flex-basis.scss +12 -0
  52. package/src/utilities/maps/grid/_gap.scss +5 -0
  53. package/src/yummacss-core.scss +3 -0
  54. package/src/yummacss.scss +4 -0
  55. package/.prettierrc +0 -9
  56. package/CHANGELOG.md +0 -58
  57. package/dist/yumma-core.css +0 -238809
  58. package/dist/yumma-core.min.css +0 -1
  59. package/gulpfile.js +0 -44
  60. package/src/_base.scss +0 -72
  61. package/src/abstracts/_colors.scss +0 -29
  62. package/src/abstracts/_extensions.scss +0 -19
  63. package/src/abstracts/_functions.scss +0 -3
  64. package/src/abstracts/_layout.scss +0 -18
  65. package/src/abstracts/_mixins.scss +0 -575
  66. package/src/core.scss +0 -3
  67. package/src/utilities/_borders.scss +0 -214
  68. package/src/utilities/_effects.scss +0 -74
  69. package/src/utilities/_filters.scss +0 -57
  70. package/src/utilities/_interactions.scss +0 -111
  71. package/src/utilities/_layout.scss +0 -310
  72. package/src/utilities/_outlines.scss +0 -76
  73. package/src/utilities/_tables.scss +0 -61
  74. package/src/yumma.scss +0 -23
@@ -1,107 +1,290 @@
1
1
  @use "sass:math";
2
+ @use "sass:map";
3
+ @use "sass:meta";
4
+ @use "../abstracts/variables" as vars;
5
+ @use "../abstracts/mixins/" as mix;
6
+ @use "../utilities/maps/" as maps;
2
7
 
3
8
  $yma-box-model-utils: (
4
9
  "box-sizing": (
5
10
  "prefix": "bs",
11
+ "properties": (
12
+ "box-sizing",
13
+ ),
6
14
  "values": (
7
15
  "bb": border-box,
8
16
  "cb": content-box,
9
17
  ),
10
18
  ),
11
- );
12
19
 
13
- // base variants
14
- @each $property, $map in $yma-box-model-utils {
15
- $prefix: map-get($map, "prefix");
16
- $values: map-get($map, "values");
17
-
18
- @each $k, $v in $values {
19
- @if ($k == "default") {
20
- .#{$prefix} {
21
- #{$property}: $v;
22
- }
23
- } @else {
24
- .#{$prefix}-#{$k} {
25
- #{$property}: $v;
26
- }
27
- }
28
- }
20
+ "dimension": (
21
+ "prefix": "d",
22
+ "properties": (
23
+ "height",
24
+ "width",
25
+ ),
26
+ "values": maps.$yma-dimension-map,
27
+ ),
29
28
 
30
- // hover variants
31
- @each $k, $v in $values {
32
- @if ($k == "default") {
33
- .h\:#{$prefix}:hover {
34
- #{$property}: $v;
35
- }
36
- } @else {
37
- .h\:#{$prefix}-#{$k}:hover {
38
- #{$property}: $v;
39
- }
40
- }
41
- }
29
+ "max-dimension": (
30
+ "prefix": "max-d",
31
+ "properties": (
32
+ "max-height",
33
+ "max-width",
34
+ ),
35
+ "values": maps.$yma-dimension-map,
36
+ ),
42
37
 
43
- // responsive variants
44
- @each $bp, $bp-value in $yma-breakpoints {
45
- @each $k, $v in $values {
46
- .#{$bp}\:#{$prefix}-#{$k} {
47
- @media (min-width: $bp-value) {
48
- #{$property}: $v;
49
- }
50
- }
51
- }
52
- }
53
- }
38
+ "min-dimension": (
39
+ "prefix": "min-d",
40
+ "properties": (
41
+ "min-height",
42
+ "min-width",
43
+ ),
44
+ "values": maps.$yma-dimension-map,
45
+ ),
46
+
47
+ "height": (
48
+ "prefix": "h",
49
+ "properties": (
50
+ "height",
51
+ ),
52
+ "values": maps.$yma-height-map,
53
+ ),
54
+
55
+ "max-height": (
56
+ "prefix": "max-h",
57
+ "properties": (
58
+ "max-height",
59
+ ),
60
+ "values": maps.$yma-height-map,
61
+ ),
62
+
63
+ "min-height": (
64
+ "prefix": "min-h",
65
+ "properties": (
66
+ "min-height",
67
+ ),
68
+ "values": maps.$yma-height-map,
69
+ ),
70
+
71
+ "margin": (
72
+ "prefix": "m",
73
+ "properties": (
74
+ "margin",
75
+ ),
76
+ "values": maps.$yma-margin-map,
77
+ ),
78
+
79
+ "margin-block-end": (
80
+ "prefix": "mbe",
81
+ "properties": (
82
+ "margin-block-end",
83
+ ),
84
+ "values": maps.$yma-margin-map,
85
+ ),
86
+
87
+ "margin-block-start": (
88
+ "prefix": "mbs",
89
+ "properties": (
90
+ "margin-block-start",
91
+ ),
92
+ "values": maps.$yma-margin-map,
93
+ ),
94
+
95
+ "margin-bottom": (
96
+ "prefix": "mb",
97
+ "properties": (
98
+ "margin-bottom",
99
+ ),
100
+ "values": maps.$yma-margin-map,
101
+ ),
102
+
103
+ "margin-inline-end": (
104
+ "prefix": "mie",
105
+ "properties": (
106
+ "margin-inline-end",
107
+ ),
108
+ "values": maps.$yma-margin-map,
109
+ ),
110
+
111
+ "margin-inline-start": (
112
+ "prefix": "mis",
113
+ "properties": (
114
+ "margin-inline-start",
115
+ ),
116
+ "values": maps.$yma-margin-map,
117
+ ),
118
+
119
+ "margin-left": (
120
+ "prefix": "ml",
121
+ "properties": (
122
+ "margin-left",
123
+ ),
124
+ "values": maps.$yma-margin-map,
125
+ ),
126
+
127
+ "margin-right": (
128
+ "prefix": "mr",
129
+ "properties": (
130
+ "margin-right",
131
+ ),
132
+ "values": maps.$yma-margin-map,
133
+ ),
134
+
135
+ "margin-top": (
136
+ "prefix": "mt",
137
+ "properties": (
138
+ "margin-top",
139
+ ),
140
+ "values": maps.$yma-margin-map,
141
+ ),
142
+
143
+ "margin-x": (
144
+ "prefix": "mx",
145
+ "properties": (
146
+ "margin-left",
147
+ "margin-right",
148
+ ),
149
+ "values": maps.$yma-margin-map,
150
+ ),
54
151
 
55
- // variants
56
- @include dimension-variants("dim", $yma-height, $yma-width);
57
- @include dimension-variants("max-dim", $yma-height, $yma-width);
58
- @include dimension-variants("min-dim", $yma-height, $yma-width);
59
- @include spacing-x("s-x", $yma-spacing);
60
- @include spacing-y("s-y", $yma-spacing);
61
- @include variants("height", "h", $yma-height);
62
- @include variants("margin-bottom", "mb", $yma-margin);
63
- @include variants("margin-left", "ml", $yma-margin);
64
- @include variants("margin-right", "mr", $yma-margin);
65
- @include variants("margin-top", "mt", $yma-margin);
66
- @include variants("margin", "m", $yma-margin);
67
- @include variants("max-height", "max-h", $yma-height);
68
- @include variants("max-width", "max-w", $yma-width);
69
- @include variants("min-height", "min-h", $yma-height);
70
- @include variants("min-width", "min-w", $yma-width);
71
- @include variants("padding-bottom", "pb", $yma-padding);
72
- @include variants("padding-left", "pl", $yma-padding);
73
- @include variants("padding-right", "pr", $yma-padding);
74
- @include variants("padding-top", "pt", $yma-padding);
75
- @include variants("padding", "p", $yma-padding);
76
- @include variants("width", "w", $yma-width);
77
- @include x-axis-variants("margin", "mx", $yma-margin);
78
- @include x-axis-variants("padding", "px", $yma-padding);
79
- @include y-axis-variants("margin", "my", $yma-margin);
80
- @include y-axis-variants("padding", "py", $yma-padding);
81
-
82
- // extensions
83
- @include extensions(
84
- $yma-extension,
85
- (
86
- "h": height,
87
- "max-h": max-height,
88
- "max-w": max-width,
89
- "min-h": min-height,
90
- "min-w": min-width,
91
- "w": width,
92
- )
152
+ "margin-y": (
153
+ "prefix": "my",
154
+ "properties": (
155
+ "margin-bottom",
156
+ "margin-top",
157
+ ),
158
+ "values": maps.$yma-margin-map,
159
+ ),
160
+
161
+ "padding": (
162
+ "prefix": "p",
163
+ "properties": (
164
+ "padding",
165
+ ),
166
+ "values": maps.$yma-padding-map,
167
+ ),
168
+
169
+ "padding-block-end": (
170
+ "prefix": "pbe",
171
+ "properties": (
172
+ "padding-block-end",
173
+ ),
174
+ "values": maps.$yma-padding-map,
175
+ ),
176
+
177
+ "padding-block-start": (
178
+ "prefix": "pbs",
179
+ "properties": (
180
+ "padding-block-start",
181
+ ),
182
+ "values": maps.$yma-padding-map,
183
+ ),
184
+
185
+ "padding-bottom": (
186
+ "prefix": "pb",
187
+ "properties": (
188
+ "padding-bottom",
189
+ ),
190
+ "values": maps.$yma-padding-map,
191
+ ),
192
+
193
+ "padding-inline-end": (
194
+ "prefix": "pie",
195
+ "properties": (
196
+ "padding-inline-end",
197
+ ),
198
+ "values": maps.$yma-padding-map,
199
+ ),
200
+
201
+ "padding-inline-start": (
202
+ "prefix": "pis",
203
+ "properties": (
204
+ "padding-inline-start",
205
+ ),
206
+ "values": maps.$yma-padding-map,
207
+ ),
208
+
209
+ "padding-left": (
210
+ "prefix": "pl",
211
+ "properties": (
212
+ "padding-left",
213
+ ),
214
+ "values": maps.$yma-padding-map,
215
+ ),
216
+
217
+ "padding-right": (
218
+ "prefix": "pr",
219
+ "properties": (
220
+ "padding-right",
221
+ ),
222
+ "values": maps.$yma-padding-map,
223
+ ),
224
+
225
+ "padding-top": (
226
+ "prefix": "pt",
227
+ "properties": (
228
+ "padding-top",
229
+ ),
230
+ "values": maps.$yma-padding-map,
231
+ ),
232
+
233
+ "padding-x": (
234
+ "prefix": "px",
235
+ "properties": (
236
+ "padding-left",
237
+ "padding-right",
238
+ ),
239
+ "values": maps.$yma-padding-map,
240
+ ),
241
+
242
+ "padding-y": (
243
+ "prefix": "py",
244
+ "properties": (
245
+ "padding-bottom",
246
+ "padding-top",
247
+ ),
248
+ "values": maps.$yma-padding-map,
249
+ ),
250
+
251
+ "width": (
252
+ "prefix": "w",
253
+ "properties": (
254
+ "width",
255
+ ),
256
+ "values": maps.$yma-width-map,
257
+ ),
258
+
259
+ "max-width": (
260
+ "prefix": "max-w",
261
+ "properties": (
262
+ "max-width",
263
+ ),
264
+ "values": maps.$yma-width-map,
265
+ ),
266
+
267
+ "min-width": (
268
+ "prefix": "min-w",
269
+ "properties": (
270
+ "min-width",
271
+ ),
272
+ "values": maps.$yma-width-map,
273
+ ),
93
274
  );
94
275
 
95
- @include dimension-extensions($yma-extension);
96
- @include height-extensions($yma-height-extension);
97
- @include box-model-extensions($yma-extension, ("m"), "margin");
98
- @include box-model-extensions($yma-extension, ("mb"), "margin-bottom");
99
- @include box-model-extensions($yma-extension, ("ml"), "margin-left");
100
- @include box-model-extensions($yma-extension, ("mr"), "margin-right");
101
- @include box-model-extensions($yma-extension, ("mt"), "margin-top");
102
- @include box-model-extensions($yma-extension, ("p"), "padding");
103
- @include box-model-extensions($yma-extension, ("pb"), "padding-bottom");
104
- @include box-model-extensions($yma-extension, ("pl"), "padding-left");
105
- @include box-model-extensions($yma-extension, ("pr"), "padding-right");
106
- @include box-model-extensions($yma-extension, ("pt"), "padding-top");
107
- @include width-extensions($yma-width-extension);
276
+ @each $name, $map in $yma-box-model-utils {
277
+ $prefix: map.get($map, "prefix");
278
+ $properties: map.get($map, "properties");
279
+ $values: map.get($map, "values");
280
+
281
+ @if meta.type-of($values) == "map" and map.get($values, "custom") {
282
+ @include mix.create-spacing-utilities(
283
+ $prefix,
284
+ map.get($values, "map"),
285
+ $properties
286
+ );
287
+ } @else {
288
+ @include mix.create-utilities($map, $prefix, $properties);
289
+ }
290
+ }
@@ -0,0 +1,85 @@
1
+ @use "sass:color";
2
+ @use "sass:map";
3
+ @use "../abstracts/mixins" as mix;
4
+ @use "../abstracts/functions" as fun;
5
+ @use "../abstracts/_theme" as theme;
6
+
7
+ $yma-color-utils: (
8
+ "accent-color": (
9
+ "prefix": "ac",
10
+ "property": "accent-color",
11
+ ),
12
+
13
+ "background-color": (
14
+ "prefix": "bg",
15
+ "property": "background-color",
16
+ ),
17
+
18
+ "border-color": (
19
+ "prefix": "bc",
20
+ "property": "border-color",
21
+ ),
22
+
23
+ "border-bottom-color": (
24
+ "prefix": "bc-b",
25
+ "property": "border-bottom-color",
26
+ ),
27
+
28
+ "border-left-color": (
29
+ "prefix": "bc-l",
30
+ "property": "border-left-color",
31
+ ),
32
+
33
+ "border-right-color": (
34
+ "prefix": "bc-r",
35
+ "property": "border-right-color",
36
+ ),
37
+
38
+ "border-top-color": (
39
+ "prefix": "bc-t",
40
+ "property": "border-top-color",
41
+ ),
42
+
43
+ "caret-color": (
44
+ "prefix": "cc",
45
+ "property": "caret-color",
46
+ ),
47
+
48
+ "color": (
49
+ "prefix": "tc",
50
+ "property": "color",
51
+ ),
52
+
53
+ "fill": (
54
+ "prefix": "f",
55
+ "property": "fill",
56
+ ),
57
+
58
+ "outline-color": (
59
+ "prefix": "oc",
60
+ "property": "outline-color",
61
+ ),
62
+
63
+ "stroke": (
64
+ "prefix": "s",
65
+ "property": "stroke",
66
+ ),
67
+
68
+ "text-decoration-color": (
69
+ "prefix": "tdc",
70
+ "property": "text-decoration-color",
71
+ ),
72
+ );
73
+
74
+ @each $utility, $map in $yma-color-utils {
75
+ $property: map.get($map, "property");
76
+ $prefix: map.get($map, "prefix");
77
+
78
+ @each $k, $v in theme.$yma-theme {
79
+ @include mix.mod-color-scaling($property, $prefix, $k, $v);
80
+
81
+ @if (fun.ignore-neutral($v, theme.$yma-theme)) {
82
+ @include mix.shade-scaling($property, $prefix, $k, $v, 14%);
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,98 @@
1
+ @use "sass:math";
2
+ @use "sass:map";
3
+ @use "../abstracts/variables" as vars;
4
+ @use "../abstracts/mixins/" as mix;
5
+
6
+ $yma-effect-utils: (
7
+ "backdrop-blur": (
8
+ "prefix": "bf-b",
9
+ "properties": (
10
+ "backdrop-filter",
11
+ ),
12
+ "values": (
13
+ "none": blur(vars.$yma-backdrop-blur * 0),
14
+ "xs": blur(vars.$yma-backdrop-blur),
15
+ "sm": blur(vars.$yma-backdrop-blur * 2),
16
+ "md": blur(vars.$yma-backdrop-blur * 4),
17
+ "lg": blur(vars.$yma-backdrop-blur * 8),
18
+ "xl": blur(vars.$yma-backdrop-blur * 16),
19
+ ),
20
+ ),
21
+
22
+ "blur": (
23
+ "prefix": "f-b",
24
+ "properties": (
25
+ "filter",
26
+ ),
27
+ "values": (
28
+ "none": blur(vars.$yma-blur * 0),
29
+ "xs": blur(vars.$yma-blur),
30
+ "sm": blur(vars.$yma-blur * 2),
31
+ "md": blur(vars.$yma-blur * 4),
32
+ "lg": blur(vars.$yma-blur * 8),
33
+ "xl": blur(vars.$yma-blur * 16),
34
+ ),
35
+ ),
36
+
37
+ "box-shadow": (
38
+ "prefix": "bs",
39
+ "properties": (
40
+ "box-shadow",
41
+ ),
42
+ "values": (
43
+ "none": none,
44
+ "xs": vars.$yma-box-shadow-xs,
45
+ "sm": vars.$yma-box-shadow-sm,
46
+ "md": vars.$yma-box-shadow-md,
47
+ "lg": vars.$yma-box-shadow-lg,
48
+ "xl": vars.$yma-box-shadow-xl,
49
+ ),
50
+ ),
51
+
52
+ "grayscale": (
53
+ "prefix": "f-g",
54
+ "properties": (
55
+ "filter",
56
+ ),
57
+ "values": (
58
+ "0": grayscale(vars.$yma-grayscale * 0),
59
+ "10": grayscale(vars.$yma-grayscale),
60
+ "20": grayscale(vars.$yma-grayscale * 2),
61
+ "30": grayscale(vars.$yma-grayscale * 3),
62
+ "40": grayscale(vars.$yma-grayscale * 4),
63
+ "50": grayscale(vars.$yma-grayscale * 5),
64
+ "60": grayscale(vars.$yma-grayscale * 6),
65
+ "70": grayscale(vars.$yma-grayscale * 7),
66
+ "80": grayscale(vars.$yma-grayscale * 8),
67
+ "90": grayscale(vars.$yma-grayscale * 9),
68
+ "100": grayscale(vars.$yma-grayscale * 10),
69
+ ),
70
+ ),
71
+
72
+ "opacity": (
73
+ "prefix": "o",
74
+ "properties": (
75
+ "opacity",
76
+ ),
77
+ "values": (
78
+ "0": 0,
79
+ "10": 0.1,
80
+ "20": 0.2,
81
+ "30": 0.3,
82
+ "40": 0.4,
83
+ "50": 0.5,
84
+ "60": 0.6,
85
+ "70": 0.7,
86
+ "80": 0.8,
87
+ "90": 0.9,
88
+ "100": 1,
89
+ ),
90
+ ),
91
+ );
92
+
93
+ @each $name, $map in $yma-effect-utils {
94
+ $prefix: map.get($map, "prefix");
95
+ $properties: map.get($map, "properties");
96
+
97
+ @include mix.create-utilities($map, $prefix, $properties);
98
+ }