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,24 +1,36 @@
1
1
  @use "sass:math";
2
+ @use "sass:map";
3
+ @use "../abstracts/variables" as vars;
4
+ @use "../abstracts/mixins/" as mix;
2
5
 
3
6
  $yma-typography-utils: (
4
7
  "font-size": (
5
8
  "prefix": "fs",
9
+ "properties": (
10
+ "font-size",
11
+ ),
6
12
  "values": (
7
- "xs": $yma-font-size-xs,
8
- "b": 1rem,
9
- "sm": $yma-font-size-sm,
10
- "md": $yma-font-size-md,
11
- "lg": $yma-font-size-lg,
12
- "xl": $yma-font-size-xl,
13
- "xxl": $yma-font-size-xxl,
14
- "3xl": $yma-font-size-3xl,
15
- "6xl": $yma-font-size-6xl,
16
- "9xl": $yma-font-size-9xl,
13
+ "xs": vars.$yma-font-size-xs,
14
+ "sm": vars.$yma-font-size-sm,
15
+ "md": vars.$yma-font-size-md,
16
+ "lg": vars.$yma-font-size-lg,
17
+ "xl": vars.$yma-font-size-xl,
18
+ "xxl": vars.$yma-font-size-2xl,
19
+ "3xl": vars.$yma-font-size-3xl,
20
+ "4xl": vars.$yma-font-size-4xl,
21
+ "5xl": vars.$yma-font-size-5xl,
22
+ "6xl": vars.$yma-font-size-6xl,
23
+ "7xl": vars.$yma-font-size-7xl,
24
+ "8xl": vars.$yma-font-size-8xl,
25
+ "9xl": vars.$yma-font-size-9xl,
17
26
  ),
18
27
  ),
19
28
 
20
29
  "font-style": (
21
30
  "prefix": "fs",
31
+ "properties": (
32
+ "font-style",
33
+ ),
22
34
  "values": (
23
35
  "i": italic,
24
36
  "n": normal,
@@ -27,6 +39,9 @@ $yma-typography-utils: (
27
39
 
28
40
  "font-weight": (
29
41
  "prefix": "fw",
42
+ "properties": (
43
+ "font-weight",
44
+ ),
30
45
  "values": (
31
46
  "100": 100,
32
47
  "200": 200,
@@ -40,8 +55,26 @@ $yma-typography-utils: (
40
55
  ),
41
56
  ),
42
57
 
58
+ "letter-spacing": (
59
+ "prefix": "ls",
60
+ "properties": (
61
+ "letter-spacing",
62
+ ),
63
+ "values": (
64
+ "0": 0em,
65
+ "1": -0.05em,
66
+ "2": -0.025em,
67
+ "3": 0.025em,
68
+ "4": 0.05em,
69
+ "5": 0.1em,
70
+ ),
71
+ ),
72
+
43
73
  "line-height": (
44
74
  "prefix": "lh",
75
+ "properties": (
76
+ "line-height",
77
+ ),
45
78
  "values": (
46
79
  "1": 1,
47
80
  "2": 1.25,
@@ -52,8 +85,22 @@ $yma-typography-utils: (
52
85
  ),
53
86
  ),
54
87
 
88
+ "list-style-position": (
89
+ "prefix": "lsp",
90
+ "properties": (
91
+ "list-style-position",
92
+ ),
93
+ "values": (
94
+ "i": inside,
95
+ "o": outside,
96
+ ),
97
+ ),
98
+
55
99
  "list-style-type": (
56
100
  "prefix": "lst",
101
+ "properties": (
102
+ "list-style-type",
103
+ ),
57
104
  "values": (
58
105
  "c": circle,
59
106
  "d": disc,
@@ -63,6 +110,9 @@ $yma-typography-utils: (
63
110
 
64
111
  "overflow-wrap": (
65
112
  "prefix": "ow",
113
+ "properties": (
114
+ "overflow-wrap",
115
+ ),
66
116
  "values": (
67
117
  "bw": break-word,
68
118
  "n": normal,
@@ -71,6 +121,9 @@ $yma-typography-utils: (
71
121
 
72
122
  "text-align": (
73
123
  "prefix": "ta",
124
+ "properties": (
125
+ "text-align",
126
+ ),
74
127
  "values": (
75
128
  "c": center,
76
129
  "e": end,
@@ -85,6 +138,9 @@ $yma-typography-utils: (
85
138
 
86
139
  "text-decoration-line": (
87
140
  "prefix": "tdl",
141
+ "properties": (
142
+ "text-decoration-line",
143
+ ),
88
144
  "values": (
89
145
  "lt": line-through,
90
146
  "none": none,
@@ -95,22 +151,27 @@ $yma-typography-utils: (
95
151
 
96
152
  "text-decoration-style": (
97
153
  "prefix": "tds",
154
+ "properties": (
155
+ "text-decoration-style",
156
+ ),
98
157
  "values": (
99
158
  "d": dashed,
100
- "h": hidden,
101
- "none": none,
102
159
  "s": solid,
160
+ "w": wavy,
103
161
  ),
104
162
  ),
105
163
 
106
164
  "text-decoration-thickness": (
107
165
  "prefix": "tdt",
166
+ "properties": (
167
+ "text-decoration-thickness",
168
+ ),
108
169
  "values": (
109
- "0": $yma-decoration-thickness * 0,
110
- "1": $yma-decoration-thickness,
111
- "2": $yma-decoration-thickness * 2,
112
- "3": $yma-decoration-thickness * 3,
113
- "4": $yma-decoration-thickness * 4,
170
+ "0": vars.$yma-decoration-thickness * 0,
171
+ "1": vars.$yma-decoration-thickness,
172
+ "2": vars.$yma-decoration-thickness * 2,
173
+ "3": vars.$yma-decoration-thickness * 3,
174
+ "4": vars.$yma-decoration-thickness * 4,
114
175
  "auto": auto,
115
176
  "ff": from-font,
116
177
  ),
@@ -118,51 +179,100 @@ $yma-typography-utils: (
118
179
 
119
180
  "text-decoration": (
120
181
  "prefix": "td",
182
+ "properties": (
183
+ "text-decoration",
184
+ ),
121
185
  "values": (
122
186
  "none": none,
123
187
  "u": underline,
124
188
  ),
125
189
  ),
190
+
191
+ "text-indent": (
192
+ "prefix": "ti",
193
+ "properties": (
194
+ "text-indent",
195
+ ),
196
+ "values": (
197
+ "0": 0px,
198
+ "1": 1px,
199
+ "2": 0.25rem,
200
+ "3": 0.5rem,
201
+ "4": 0.75rem,
202
+ ),
203
+ ),
204
+
205
+ "text-overflow": (
206
+ "prefix": "to",
207
+ "properties": (
208
+ "text-overflow",
209
+ ),
210
+ "values": (
211
+ "c": clip,
212
+ "e": ellipsis,
213
+ ),
214
+ ),
215
+
216
+ "text-transform": (
217
+ "prefix": "tt",
218
+ "properties": (
219
+ "text-transform",
220
+ ),
221
+ "values": (
222
+ "c": capitalize,
223
+ "l": lowercase,
224
+ "n": none,
225
+ "u": uppercase,
226
+ ),
227
+ ),
228
+
229
+ "text-underline-offset": (
230
+ "prefix": "tuo",
231
+ "properties": (
232
+ "text-underline-offset",
233
+ ),
234
+ "values": (
235
+ "0": 0px,
236
+ "1": 1px,
237
+ "2": 2px,
238
+ "4": 4px,
239
+ "8": 8px,
240
+ "auto": auto,
241
+ ),
242
+ ),
243
+
244
+ "text-wrap": (
245
+ "prefix": "tw",
246
+ "properties": (
247
+ "text-wrap",
248
+ ),
249
+ "values": (
250
+ "b": balance,
251
+ "n": nowrap,
252
+ "p": pretty,
253
+ "w": wrap,
254
+ ),
255
+ ),
256
+
257
+ "white-space": (
258
+ "prefix": "ws",
259
+ "properties": (
260
+ "white-space",
261
+ ),
262
+ "values": (
263
+ "bs": break-spaces,
264
+ "n": normal,
265
+ "nw": nowrap,
266
+ "p": pre,
267
+ "pl": pre-line,
268
+ "pw": pre-wrap,
269
+ ),
270
+ ),
126
271
  );
127
272
 
128
- // base variants
129
- @each $property, $map in $yma-typography-utils {
130
- $prefix: map-get($map, "prefix");
131
- $values: map-get($map, "values");
132
-
133
- @each $k, $v in $values {
134
- @if ($k == "default") {
135
- .#{$prefix} {
136
- #{$property}: $v;
137
- }
138
- } @else {
139
- .#{$prefix}-#{$k} {
140
- #{$property}: $v;
141
- }
142
- }
143
- }
144
-
145
- // hover variants
146
- @each $k, $v in $values {
147
- @if ($k == "default") {
148
- .h\:#{$prefix}:hover {
149
- #{$property}: $v;
150
- }
151
- } @else {
152
- .h\:#{$prefix}-#{$k}:hover {
153
- #{$property}: $v;
154
- }
155
- }
156
- }
157
-
158
- // responsive variants
159
- @each $bp, $bp-value in $yma-breakpoints {
160
- @each $k, $v in $values {
161
- .#{$bp}\:#{$prefix}-#{$k} {
162
- @media (min-width: $bp-value) {
163
- #{$property}: $v;
164
- }
165
- }
166
- }
167
- }
273
+ @each $properties, $map in $yma-typography-utils {
274
+ $prefix: map.get($map, "prefix");
275
+ $properties: map.get($map, "properties");
276
+
277
+ @include mix.create-utilities($map, $prefix, $properties);
168
278
  }
@@ -0,0 +1,12 @@
1
+ // Box Model
2
+ @forward "box-model/dimension";
3
+ @forward "box-model/height";
4
+ @forward "box-model/margin";
5
+ @forward "box-model/padding";
6
+ @forward "box-model/width";
7
+
8
+ // Flexbox
9
+ @forward "flexbox/flex-basis";
10
+
11
+ // Grid
12
+ @forward "grid/gap";
@@ -0,0 +1,16 @@
1
+ @use "sass:map";
2
+ @use "../../../abstracts/functions/create-values" as fun;
3
+ @use "../../../abstracts/variables" as vars;
4
+
5
+ $yma-dimension-map: map.merge(
6
+ (
7
+ "auto": auto,
8
+ "dvh": 100dvh,
9
+ "fc": fit-content,
10
+ "full": 100%,
11
+ "half": 50%,
12
+ "max": max-content,
13
+ "min": min-content,
14
+ ),
15
+ fun.create-values(vars.$yma-dimension)
16
+ );
@@ -0,0 +1,16 @@
1
+ @use "sass:map";
2
+ @use "../../../abstracts/functions/create-values" as fun;
3
+ @use "../../../abstracts/variables" as vars;
4
+
5
+ $yma-height-map: map.merge(
6
+ (
7
+ "auto": auto,
8
+ "dvh": 100dvh,
9
+ "fc": fit-content,
10
+ "full": 100%,
11
+ "half": 50%,
12
+ "max": max-content,
13
+ "min": min-content,
14
+ ),
15
+ fun.create-values(vars.$yma-height)
16
+ );
@@ -0,0 +1,10 @@
1
+ @use "sass:map";
2
+ @use "../../../abstracts/functions/create-values" as fun;
3
+ @use "../../../abstracts/variables" as vars;
4
+
5
+ $yma-margin-map: map.merge(
6
+ (
7
+ "auto": auto,
8
+ ),
9
+ fun.create-values(vars.$yma-margin)
10
+ );
@@ -0,0 +1,10 @@
1
+ @use "sass:map";
2
+ @use "../../../abstracts/functions/create-values" as fun;
3
+ @use "../../../abstracts/variables" as vars;
4
+
5
+ $yma-padding-map: map.merge(
6
+ (
7
+ "auto": auto,
8
+ ),
9
+ fun.create-values(vars.$yma-padding)
10
+ );
@@ -0,0 +1,16 @@
1
+ @use "sass:map";
2
+ @use "../../../abstracts/functions/create-values" as fun;
3
+ @use "../../../abstracts/variables" as vars;
4
+
5
+ $yma-width-map: map.merge(
6
+ (
7
+ "auto": auto,
8
+ "dvh": 100dvh,
9
+ "fc": fit-content,
10
+ "full": 100%,
11
+ "half": 50%,
12
+ "max": max-content,
13
+ "min": min-content,
14
+ ),
15
+ fun.create-values(vars.$yma-width)
16
+ );
@@ -0,0 +1,12 @@
1
+ @use "sass:map";
2
+ @use "../../../abstracts/functions/create-values" as fun;
3
+ @use "../../../abstracts/variables" as vars;
4
+
5
+ $yma-flex-basis-map: map.merge(
6
+ (
7
+ "auto": auto,
8
+ "full": 100%,
9
+ "half": 50%,
10
+ ),
11
+ fun.create-values(vars.$yma-flex-basis)
12
+ );
@@ -0,0 +1,5 @@
1
+ @use "sass:map";
2
+ @use "../../../abstracts/functions/create-values" as fun;
3
+ @use "../../../abstracts/variables" as vars;
4
+
5
+ $yma-gap-map: fun.create-values(vars.$yma-gap);
@@ -0,0 +1,3 @@
1
+ @use "abstracts" as *;
2
+ @use "utilities" as *;
3
+ @use "fonts";
@@ -0,0 +1,4 @@
1
+ @use "reset/stylecent";
2
+ @use "abstracts" as *;
3
+ @use "utilities" as *;
4
+ @use "fonts";
package/.prettierrc DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": false,
4
- "tabWidth": 2,
5
- "trailingComma": "es5",
6
- "printWidth": 80,
7
- "bracketSameLine": true,
8
- "bracketSpacing": true
9
- }
package/CHANGELOG.md DELETED
@@ -1,58 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to the Yumma CSS will be documented in this file.
4
-
5
- ## [2.1.0]
6
-
7
- ### Added
8
-
9
- - Add `_borders.scss`, `_box-model.scss`, `_effects.scss`, `_filters.scss`, `_flexbox.scss`, `_grid.scss`, `_layout.scss`, `_interactions.scss`, `_outlines.scss`, `_tables.scss` and `_typography.scss`
10
- - Add `_extensions.scss` and `_theme.scss`
11
- - Add `cursor: pointer` to all `<button>` element
12
- - Add the `0` value to **Opacity** utility variant
13
- - Add the `auto` property to **Flex** utility variant
14
-
15
- ### Changed
16
-
17
- - New `baseline` **Align Content** utility variant
18
- - New `baseline` **Align Items** utility variant
19
- - New `cg-0` **Column Gap** and `rg-0` **Row Gap** utilities
20
- - New `col-resize`, `default`, `ne-resize`, `nesw-resize`, `none`, `nw-resize`, `nwse-resize`, `progress`, `row-resize`, `s-resize`, `se-resize`, `sw-resize`, `w-resize`, `zoom-in`, `zoom-out` **Cursor** utility properties
21
- - New `f-b` **Font Size** base utility
22
- - New `font-size: inherit` and `font-weight: inherit` properties for heading and paragraph elements.
23
- - New `fs-9xl` **Font Size** utility variant
24
- - New `row dense` and `dense row` **Grid Auto Flow** utility variants
25
- - New `table`, `inline-table` and `inline-grid` **Display** utility variants
26
- - New `text` and `all` **User Select** utility variants
27
- - Rename **Align Content** utility syntax from `ac-stretch` to `ac-s`
28
- - Rename **Align Items** utility syntax from `ai-stretch` to `ai-s`
29
- - Rename **Align Self** utility syntax from `as-stretch` to `as-s`
30
- - Rename **Justify Items** utility syntax from `ji-stretch` to `ji-st`
31
- - Rename **Justify Self** utility syntax from `js-stretch` to `ji-st`
32
- - Rename **Object Position** utility syntax from `op-left` to `op-l`
33
- - Rename **Position** utility syntax from `p-t` to `p-y`
34
- - Rename **Position** utility syntax from `p-y` to `p-st`
35
- - Rename `_miscellaneous.scss` to `_interactions.scss`
36
- - Rename `$yma-direction` base value from `1px` to `0.25rem`
37
- - Rename color variables from `$yma-colors-*` to `$yma-theme-*`
38
- - Update **Border Radius** base value from `4px` to `0.25rem`
39
- - Update **Border Width** base value from `4px` to `1px`
40
- - Update **Flex Basis** base value from `1rem` to `0.25rem`
41
- - Update **Flex** utility variants
42
- - Update **Outline Offset** base value from `2px` to `1px`
43
- - Update **Outline Width** base value from `2px` to `1px`
44
- - Update **Spacing X** and **Spacing Y** calculations
45
-
46
- ### Removed
47
-
48
- - Delete `_utilities.scss` partial
49
- - Remove `end` and `start` properties from **Align Content** utilities
50
- - Remove `end` and `start` properties from **Align Items** utilities
51
- - Remove `end` and `start` properties from **Align Self** utilities
52
- - Remove `end`, `left`, `right` and `start` properties from **Justify Content** utilities
53
- - Remove `er` **Cursor** variant
54
- - Remove `flex-end`, `flex-start`, `left`, `normal` and `right` properties from **Justify Items** utilities
55
- - Remove `flex-end`, `flex-start`, `left`, `normal`, `right` and `stretch` properties from **Justify Self** utilities
56
- - Remove `hidden` property in **Border Style** utilities
57
- - Remove `hidden` property in **Outline Style** utilities
58
- - Remove variable inside **Spacing X** and **Spacing Y** utilities