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
package/package.json CHANGED
@@ -1,24 +1,50 @@
1
- {
2
- "author": "Renildo Pereira",
3
- "description": "Quickly build applications with less code in your markup.",
4
- "license": "MIT",
5
- "name": "yummacss",
6
- "version": "2.1.0",
7
- "devDependencies": {
8
- "gulp-clean-css": "^4.3.0",
9
- "gulp-copy": "^4.0.1",
10
- "gulp-purgecss": "^6.0.0",
11
- "gulp-rename": "^2.0.0",
12
- "gulp-sass": "^5.1.0",
13
- "gulp": "^4.0.2",
14
- "npm-run-all": "^4.1.5",
15
- "sass": "^1.62.1"
16
- },
17
- "scripts": {
18
- "build": "npm-run-all --sequential std min core mincore",
19
- "core": "gulp coreFile",
20
- "min": "gulp minifiedFile",
21
- "mincore": "gulp minifiedCoreFile",
22
- "std": "gulp standardFile"
23
- }
24
- }
1
+ {
2
+ "author": "Renildo Pereira",
3
+ "description": "The CSS framework with abbreviated styles.",
4
+ "license": "MIT",
5
+ "main": "./dist/cli/index.js",
6
+ "name": "yummacss",
7
+ "type": "module",
8
+ "version": "3.0.0",
9
+ "bin": {
10
+ "yummacss": "./dist/cli/src/cli.js",
11
+ "yumma": "./dist/cli/src/cli.js"
12
+ },
13
+ "exports": {
14
+ ".": "./dist/cli/src/cli.js"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "src"
19
+ ],
20
+ "scripts": {
21
+ "build": "gulp build",
22
+ "build:css": "gulp build",
23
+ "build:cli": "tsc -p tsconfig.cli.json",
24
+ "dev": "tsc -p tsconfig.cli.json --watch",
25
+ "prepublishOnly": "pnpm build:cli"
26
+ },
27
+ "keywords": [
28
+ "utility-first",
29
+ "framework"
30
+ ],
31
+ "dependencies": {
32
+ "chokidar": "^4.0.3",
33
+ "commander": "^13.1.0",
34
+ "globby": "^14.1.0",
35
+ "lightningcss": "^1.29.3",
36
+ "ora": "^8.2.0",
37
+ "purgecss": "^7.0.2",
38
+ "sass-embedded": "^1.85.1"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^22.13.10",
42
+ "gulp": "^5.0.0",
43
+ "gulp-clean-css": "^4.3.0",
44
+ "gulp-debug": "^5.0.1",
45
+ "gulp-rename": "^2.0.0",
46
+ "gulp-sass": "^6.0.0",
47
+ "sass": "^1.85.1",
48
+ "typescript": "^5.8.2"
49
+ }
50
+ }
package/src/_fonts.scss CHANGED
@@ -1,14 +1,16 @@
1
+ @use "abstracts/variables" as vars;
2
+
1
3
  .ff-c {
2
- font-family: $yma-font-charter;
3
- font-weight: $yma-font-weight;
4
+ font-family: vars.$yma-font-charter;
5
+ font-weight: vars.$yma-font-weight;
4
6
  }
5
7
 
6
8
  .ff-m {
7
- font-family: $yma-font-mono;
8
- font-weight: $yma-font-weight;
9
+ font-family: vars.$yma-font-mono;
10
+ font-weight: vars.$yma-font-weight;
9
11
  }
10
12
 
11
13
  .ff-s {
12
- font-family: $yma-font-system;
13
- font-weight: $yma-font-weight;
14
+ font-family: vars.$yma-font-system;
15
+ font-weight: vars.$yma-font-weight;
14
16
  }
@@ -1,37 +1,39 @@
1
+ @use "sass:map";
2
+
1
3
  $yma-breakpoints: (
2
- "sm": 640px,
3
- "md": 768px,
4
- "lg": 1024px,
5
- "xl": 1280px,
6
- "xxl": 1536px,
4
+ "sm": 40rem,
5
+ "md": 48rem,
6
+ "lg": 64rem,
7
+ "xl": 80rem,
8
+ "xxl": 96rem,
7
9
  );
8
10
 
9
11
  @mixin sm {
10
- @media (min-width: map-get($yma-breakpoints, "sm")) {
12
+ @media (min-width: map.get($yma-breakpoints, "sm")) {
11
13
  @content;
12
14
  }
13
15
  }
14
16
 
15
17
  @mixin md {
16
- @media (min-width: map-get($yma-breakpoints, "md")) {
18
+ @media (min-width: map.get($yma-breakpoints, "md")) {
17
19
  @content;
18
20
  }
19
21
  }
20
22
 
21
23
  @mixin lg {
22
- @media (min-width: map-get($yma-breakpoints, "lg")) {
24
+ @media (min-width: map.get($yma-breakpoints, "lg")) {
23
25
  @content;
24
26
  }
25
27
  }
26
28
 
27
29
  @mixin xl {
28
- @media (min-width: map-get($yma-breakpoints, "xl")) {
30
+ @media (min-width: map.get($yma-breakpoints, "xl")) {
29
31
  @content;
30
32
  }
31
33
  }
32
34
 
33
35
  @mixin xxl {
34
- @media (min-width: map-get($yma-breakpoints, "xxl")) {
36
+ @media (min-width: map.get($yma-breakpoints, "xxl")) {
35
37
  @content;
36
38
  }
37
39
  }
@@ -0,0 +1,5 @@
1
+ @forward "functions";
2
+ @forward "variables";
3
+ @forward "breakpoints";
4
+ @forward "mixins";
5
+ @forward "theme";
@@ -1,18 +1,21 @@
1
+ @use "sass:map";
2
+ @use "variables" as vars;
3
+
1
4
  $yma-theme: (
2
- "red": $yma-color-red,
3
- "orange": $yma-color-orange,
4
- "yellow": $yma-color-yellow,
5
- "green": $yma-color-green,
6
- "teal": $yma-color-teal,
7
- "cyan": $yma-color-cyan,
8
- "blue": $yma-color-blue,
9
- "indigo": $yma-color-indigo,
10
- "violet": $yma-color-violet,
11
- "pink": $yma-color-pink,
12
- "silver": $yma-color-silver,
13
- "gray": $yma-color-gray,
14
- "lead": $yma-color-lead,
15
- "black": $yma-color-black,
16
- "white": $yma-color-white,
17
- "transparent": $yma-color-transparent,
5
+ "red": vars.$yma-color-red,
6
+ "orange": vars.$yma-color-orange,
7
+ "yellow": vars.$yma-color-yellow,
8
+ "green": vars.$yma-color-green,
9
+ "teal": vars.$yma-color-teal,
10
+ "cyan": vars.$yma-color-cyan,
11
+ "blue": vars.$yma-color-blue,
12
+ "indigo": vars.$yma-color-indigo,
13
+ "violet": vars.$yma-color-violet,
14
+ "pink": vars.$yma-color-pink,
15
+ "silver": vars.$yma-color-silver,
16
+ "gray": vars.$yma-color-gray,
17
+ "lead": vars.$yma-color-lead,
18
+ "black": vars.$yma-color-black,
19
+ "white": vars.$yma-color-white,
20
+ "transparent": vars.$yma-color-transparent,
18
21
  );
@@ -1,68 +1,81 @@
1
- // base colors
2
- $yma-color-red: #d73d3d;
3
- $yma-color-orange: #e06814;
4
- $yma-color-yellow: #d3a107;
5
- $yma-color-green: #1fb155;
6
- $yma-color-teal: #12a695;
7
- $yma-color-cyan: #05a4bf;
8
- $yma-color-blue: #3575dd;
9
- $yma-color-indigo: #595cd9;
10
- $yma-color-violet: #7d53dd;
11
- $yma-color-pink: #d4418a;
12
- $yma-color-silver: #bfc2c7;
13
- $yma-color-gray: #606773;
14
- $yma-color-lead: #3f3f4e;
15
- $yma-color-black: black;
16
- $yma-color-white: white;
17
- $yma-color-transparent: transparent;
1
+ // color
2
+ $yma-color-red: rgb(215, 61, 61) !default;
3
+ $yma-color-orange: rgb(224, 104, 20) !default;
4
+ $yma-color-yellow: rgb(211, 161, 7) !default;
5
+ $yma-color-green: rgb(31, 177, 85) !default;
6
+ $yma-color-teal: rgb(18, 166, 149) !default;
7
+ $yma-color-cyan: rgb(5, 164, 191) !default;
8
+ $yma-color-blue: rgb(53, 117, 221) !default;
9
+ $yma-color-indigo: rgb(89, 92, 217) !default;
10
+ $yma-color-violet: rgb(125, 83, 221) !default;
11
+ $yma-color-pink: rgb(212, 65, 138) !default;
12
+ $yma-color-lead: rgb(63, 63, 78) !default;
13
+ $yma-color-gray: rgb(96, 103, 115) !default;
14
+ $yma-color-silver: rgb(191, 194, 199) !default;
15
+ $yma-color-black: black !default;
16
+ $yma-color-white: white !default;
17
+ $yma-color-transparent: transparent !default;
18
18
 
19
- // borders
20
- $yma-border: 1px;
21
- $yma-border-radius: 0.25rem;
22
-
23
- // outlines
24
- $yma-outline-offset: 1px;
25
- $yma-outline-width: 1px;
26
- $yma-decoration-thickness: 1px;
19
+ // border
20
+ $yma-border: 1px !default;
21
+ $yma-border-radius: 0.25rem !default;
22
+ $yma-border-spacing: 0.25rem !default;
27
23
 
28
24
  // box model
29
- $yma-height: 0.25rem;
30
- $yma-width: 0.25rem;
31
- $yma-padding: 0.25rem;
32
- $yma-margin: 0.25rem;
33
- $yma-spacing: 0.25rem;
25
+ $yma-dimension: 0.25rem !default;
26
+ $yma-height: 0.25rem !default;
27
+ $yma-width: 0.25rem !default;
28
+ $yma-padding: 0.25rem !default;
29
+ $yma-margin: 0.25rem !default;
30
+ $yma-spacing: 0.25rem !default;
31
+
32
+ // effect
33
+ $yma-backdrop-blur: 4px !default;
34
+
35
+ $yma-blur: 4px !default;
34
36
 
35
- // effects
36
- $yma-backdrop-blur: 4px;
37
+ $yma-box-shadow-lg: 1px 3px 5px 1px rgb(0, 0, 0, 0.1) !default;
38
+ $yma-box-shadow-md: 1px 3px 5px -1px rgb(0, 0, 0, 0.1) !default;
39
+ $yma-box-shadow-sm: 1px 3px 5px -2px rgb(0, 0, 0, 0.1) !default;
40
+ $yma-box-shadow-xl: 1px 3px 5px 2px rgb(0, 0, 0, 0.1) !default;
41
+ $yma-box-shadow-xs: 1px 3px 5px -3px rgb(0, 0, 0, 0.1) !default;
37
42
 
38
- // filters
39
- $yma-box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.1);
43
+ $yma-grayscale: 10% !default;
40
44
 
41
45
  // flexbox
42
- $yma-flex-basis: 0.25rem;
46
+ $yma-flex-basis: 0.25rem !default;
43
47
 
44
48
  // grid
45
- $yma-gap: 0.25rem;
46
- $yma-column-gap: 0.25rem;
47
- $yma-row-gap: 0.25rem;
49
+ $yma-gap: 0.25rem !default;
50
+ $yma-column-gap: 0.25rem !default;
51
+ $yma-row-gap: 0.25rem !default;
48
52
 
49
- // layout
50
- $yma-direction: 0.25;
53
+ // outline
54
+ $yma-outline-offset: 1px !default;
55
+ $yma-outline-width: 1px !default;
56
+
57
+ // positioning
58
+ $yma-bottom-left-top-right: 0.25rem !default;
51
59
 
52
60
  // typography
53
- $yma-font-size: 0.75rem;
54
- $yma-font-weight: 500;
55
- $yma-font-size-xs: $yma-font-size;
56
- $yma-font-size-b: 1rem;
57
- $yma-font-size-sm: $yma-font-size * 2;
58
- $yma-font-size-md: $yma-font-size * 3;
59
- $yma-font-size-lg: $yma-font-size * 4;
60
- $yma-font-size-xl: $yma-font-size * 5;
61
- $yma-font-size-xxl: $yma-font-size * 6;
62
- $yma-font-size-3xl: $yma-font-size * 7;
63
- $yma-font-size-6xl: $yma-font-size * 8;
64
- $yma-font-size-9xl: $yma-font-size * 9;
61
+ $yma-decoration-thickness: 1px !default;
62
+
63
+ $yma-font-size-xs: 0.75rem !default;
64
+ $yma-font-size-sm: 0.875rem !default;
65
+ $yma-font-size-md: 1rem !default;
66
+ $yma-font-size-lg: 1.125rem !default;
67
+ $yma-font-size-xl: 1.25rem !default;
68
+ $yma-font-size-2xl: 1.5rem !default;
69
+ $yma-font-size-3xl: 1.875rem !default;
70
+ $yma-font-size-4xl: 2.25rem !default;
71
+ $yma-font-size-5xl: 3rem !default;
72
+ $yma-font-size-6xl: 3.75rem !default;
73
+ $yma-font-size-7xl: 4.5rem !default;
74
+ $yma-font-size-8xl: 6rem !default;
75
+ $yma-font-size-9xl: 8rem !default;
76
+
77
+ $yma-font-weight: 500 !default;
65
78
 
66
- $yma-font-charter: Charter, Cambria, serif;
67
- $yma-font-mono: ui-monospace, Consolas, monospace;
68
- $yma-font-system: system-ui, sans-serif;
79
+ $yma-font-charter: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif !default;
80
+ $yma-font-mono: "Nimbus Mono PS", "Courier New", monospace !default;
81
+ $yma-font-system: system-ui, sans-serif !default;
@@ -0,0 +1,16 @@
1
+ @use "sass:map";
2
+
3
+ @function create-values($variable, $min: 0, $max: 100) {
4
+ $values: ();
5
+
6
+ @for $i from $min through $max {
7
+ $values: map.merge(
8
+ $values,
9
+ (
10
+ "#{$i}": $variable * $i,
11
+ )
12
+ );
13
+ }
14
+
15
+ @return $values;
16
+ }
@@ -0,0 +1,9 @@
1
+ @use "../theme" as *;
2
+ @use "sass:map";
3
+
4
+ // prettier-ignore
5
+ @function ignore-neutral($v, $yma-theme) {
6
+ @return $v != map.get($yma-theme, "black")
7
+ and $v != map.get($yma-theme, "white")
8
+ and $v != map.get($yma-theme, "transparent");
9
+ }
@@ -0,0 +1,2 @@
1
+ @forward "ignore-neutral";
2
+ @forward "create-values";
@@ -0,0 +1,39 @@
1
+ @use "sass:color";
2
+
3
+ @mixin mod-color-scaling($property, $prefix, $k, $v) {
4
+ .#{$prefix}-#{$k} {
5
+ #{$property}: $v;
6
+ }
7
+
8
+ .h\:#{$prefix}-#{$k} {
9
+ &:hover {
10
+ #{$property}: $v;
11
+ }
12
+ }
13
+ }
14
+
15
+ @mixin shade-scaling($property, $prefix, $k, $v, $percentage) {
16
+ @for $i from 1 through 13 {
17
+ @if $i <= 6 {
18
+ .#{$prefix}-#{$k}-#{$i} {
19
+ #{$property}: color.mix(white, $v, (7 - $i) * $percentage);
20
+ }
21
+
22
+ .h\:#{$prefix}-#{$k}-#{$i} {
23
+ &:hover {
24
+ #{$property}: color.mix(white, $v, (7 - $i) * $percentage);
25
+ }
26
+ }
27
+ } @else if $i > 7 {
28
+ .#{$prefix}-#{$k}-#{$i - 1} {
29
+ #{$property}: color.mix(black, $v, ($i - 7) * $percentage);
30
+ }
31
+
32
+ .h\:#{$prefix}-#{$k}-#{$i - 1} {
33
+ &:hover {
34
+ #{$property}: color.mix(black, $v, ($i - 7) * $percentage);
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,39 @@
1
+ @use "../breakpoints" as bp;
2
+ @use "sass:map";
3
+
4
+ @mixin create-utilities($map, $prefix, $properties) {
5
+ $function: if(
6
+ map.has-key($map, "property-function"),
7
+ map.get($map, "property-function"),
8
+ null
9
+ );
10
+
11
+ // base styles
12
+ @each $k, $v in map.get($map, "values") {
13
+ .#{$prefix}-#{$k} {
14
+ @each $property in $properties {
15
+ #{$property}: if($function != null, $function + "(" + $v + ")", $v);
16
+ }
17
+ }
18
+
19
+ // hover styles
20
+ .h\:#{$prefix}-#{$k}:hover {
21
+ @each $property in $properties {
22
+ #{$property}: if($function != null, $function + "(" + $v + ")", $v);
23
+ }
24
+ }
25
+ }
26
+
27
+ // responsive styles
28
+ @each $bp, $bp-value in bp.$yma-breakpoints {
29
+ @media (min-width: $bp-value) {
30
+ @each $k, $v in map.get($map, "values") {
31
+ .#{$bp}\:#{$prefix}-#{$k} {
32
+ @each $property in $properties {
33
+ #{$property}: if($function != null, $function + "(" + $v + ")", $v);
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,24 @@
1
+ @mixin extensions($map, $prefixes) {
2
+ @each $k, $v in $map {
3
+ @each $prefix, $property in $prefixes {
4
+ // base styles
5
+ .#{$prefix}-#{$k} {
6
+ #{$property}: $v;
7
+ }
8
+
9
+ // hover styles
10
+ .h\:#{$prefix}-#{$k}:hover {
11
+ #{$property}: $v;
12
+ }
13
+
14
+ @each $bp, $bp-value in $yma-breakpoints {
15
+ // responsive styles
16
+ .#{$bp}\:#{$prefix}-#{$k} {
17
+ @include breakpoint($bp-value) {
18
+ #{$property}: $v;
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ @forward "create-colors";
2
+ @forward "create-utilities";
3
+ @forward "extend-utilities";