yummacss 2.0.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 (66) hide show
  1. package/LICENSE +17 -18
  2. package/README.md +22 -43
  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 +127316 -193522
  15. package/dist/yumma.min.css +1 -1
  16. package/package.json +50 -34
  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 +21 -0
  21. package/src/abstracts/_variables.scss +69 -88
  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 +290 -0
  33. package/src/utilities/_color.scss +85 -0
  34. package/src/utilities/_effect.scss +98 -0
  35. package/src/utilities/_flexbox.scss +258 -0
  36. package/src/utilities/_grid.scss +277 -0
  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 +278 -0
  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/CHANGELOG.md +0 -73
  56. package/dist/yumma-core.css +0 -241423
  57. package/dist/yumma-core.min.css +0 -1
  58. package/gulpfile.js +0 -44
  59. package/src/_stylecent.scss +0 -68
  60. package/src/_utilities.scss +0 -1265
  61. package/src/abstracts/_colors.scss +0 -29
  62. package/src/abstracts/_functions.scss +0 -4
  63. package/src/abstracts/_layout.scss +0 -18
  64. package/src/abstracts/_mixins.scss +0 -589
  65. package/src/core.scss +0 -3
  66. package/src/yumma.scss +0 -10
package/package.json CHANGED
@@ -1,34 +1,50 @@
1
- {
2
- "author": "Renildo Pereira",
3
- "description": "Quickly build applications with less code in your markup.",
4
- "homepage": "https://yummacss.com",
5
- "license": "MIT",
6
- "name": "yummacss",
7
- "style": "dist/yumma.css",
8
- "version": "2.0.0",
9
- "devDependencies": {
10
- "gulp": "^4.0.2",
11
- "gulp-clean-css": "^4.3.0",
12
- "gulp-copy": "^4.0.1",
13
- "gulp-rename": "^2.0.0",
14
- "gulp-sass": "^5.1.0",
15
- "npm-run-all": "^4.1.5",
16
- "sass": "^1.62.1"
17
- },
18
- "keywords": [
19
- "css",
20
- "css-library",
21
- "functional-css",
22
- "gulp-sass",
23
- "responsive",
24
- "utility-classes",
25
- "yummacss"
26
- ],
27
- "scripts": {
28
- "std": "gulp standardFile",
29
- "core": "gulp coreFile",
30
- "min": "gulp minifiedFile",
31
- "mincore": "gulp minifiedCoreFile",
32
- "build": "npm-run-all --sequential std min core mincore"
33
- }
34
- }
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";
@@ -0,0 +1,21 @@
1
+ @use "sass:map";
2
+ @use "variables" as vars;
3
+
4
+ $yma-theme: (
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,
21
+ );
@@ -1,100 +1,81 @@
1
- // base colors
2
- $yma-colors-red: #d73d3d;
3
- $yma-colors-orange: #e06814;
4
- $yma-colors-yellow: #d3a107;
5
- $yma-colors-green: #1fb155;
6
- $yma-colors-teal: #12a695;
7
- $yma-colors-cyan: #05a4bf;
8
- $yma-colors-blue: #3575dd;
9
- $yma-colors-indigo: #595cd9;
10
- $yma-colors-violet: #7d53dd;
11
- $yma-colors-pink: #d4418a;
12
- $yma-colors-silver: #bfc2c7;
13
- $yma-colors-gray: #606773;
14
- $yma-colors-lead: #3f3f4e;
15
- $yma-colors-black: black;
16
- $yma-colors-white: white;
17
- $yma-colors-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 & outlines
20
- $yma-border: 1px;
21
- $yma-border-radius: 4px;
22
- $yma-box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.1);
23
- $yma-outline-offset: 2px;
24
- $yma-outline-width: 2px;
25
- $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;
26
23
 
27
24
  // box model
28
- $yma-height: 0.25rem;
29
- $yma-width: 0.25rem;
30
- $yma-padding: 0.25rem;
31
- $yma-margin: 0.25rem;
32
- $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;
33
31
 
34
- // effects & filters
35
- $yma-backdrop-blur: 4px;
32
+ // effect
33
+ $yma-backdrop-blur: 4px !default;
36
34
 
37
- // flexbox & grid
38
- $yma-flex-basis: 1rem;
39
- $yma-gap: 0.25rem;
40
- $yma-column-gap: 0.25rem;
41
- $yma-row-gap: 0.25rem;
35
+ $yma-blur: 4px !default;
42
36
 
43
- // layout
44
- $yma-direction: 1px;
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;
45
42
 
46
- // typography
47
- $yma-font-size: 16px;
48
- $yma-font-weight: 500;
49
- $yma-font-size-xs: $yma-font-size * 0.75;
50
- $yma-font-size-sm: $yma-font-size * 0.9;
51
- $yma-font-size-md: $yma-font-size;
52
- $yma-font-size-lg: $yma-font-size * 1.2;
53
- $yma-font-size-xl: $yma-font-size * 1.44;
54
- $yma-font-size-xxl: $yma-font-size * 1.88;
55
- $yma-font-size-3xl: $yma-font-size * 2.22;
56
- $yma-font-size-6xl: $yma-font-size * 3.66;
43
+ $yma-grayscale: 10% !default;
44
+
45
+ // flexbox
46
+ $yma-flex-basis: 0.25rem !default;
47
+
48
+ // grid
49
+ $yma-gap: 0.25rem !default;
50
+ $yma-column-gap: 0.25rem !default;
51
+ $yma-row-gap: 0.25rem !default;
57
52
 
58
- $yma-font-charter: Charter, Cambria, serif;
59
- $yma-font-mono: ui-monospace, Consolas, monospace;
60
- $yma-font-system: system-ui, sans-serif;
53
+ // outline
54
+ $yma-outline-offset: 1px !default;
55
+ $yma-outline-width: 1px !default;
61
56
 
62
- // extensions
63
- $yma-extension: (
64
- "auto": auto,
65
- "fc": fit-content,
66
- "full": 100%,
67
- "half": 50%,
68
- "max": max-content,
69
- "min": min-content,
70
- );
57
+ // positioning
58
+ $yma-bottom-left-top-right: 0.25rem !default;
59
+
60
+ // typography
61
+ $yma-decoration-thickness: 1px !default;
71
62
 
72
- $yma-height-extension: (
73
- "1\\/1": 100dvh,
74
- "1\\/2": 50dvh,
75
- );
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
76
 
77
- $yma-width-extension: (
78
- "1\\/1": 100dvw,
79
- "2\\/1": 50dvw,
80
- );
77
+ $yma-font-weight: 500 !default;
81
78
 
82
- // colors map
83
- $yma-colors: (
84
- "red": $yma-colors-red,
85
- "orange": $yma-colors-orange,
86
- "yellow": $yma-colors-yellow,
87
- "green": $yma-colors-green,
88
- "teal": $yma-colors-teal,
89
- "cyan": $yma-colors-cyan,
90
- "blue": $yma-colors-blue,
91
- "indigo": $yma-colors-indigo,
92
- "violet": $yma-colors-violet,
93
- "pink": $yma-colors-pink,
94
- "silver": $yma-colors-silver,
95
- "gray": $yma-colors-gray,
96
- "lead": $yma-colors-lead,
97
- "black": $yma-colors-black,
98
- "white": $yma-colors-white,
99
- "transparent": $yma-colors-transparent,
100
- );
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";