yummacss 1.2.0 → 2.1.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 (47) hide show
  1. package/.prettierrc +9 -0
  2. package/CHANGELOG.md +56 -205
  3. package/LICENSE +1 -1
  4. package/README.md +20 -47
  5. package/dist/yumma-core.css +238809 -0
  6. package/dist/yumma-core.min.css +1 -0
  7. package/dist/yumma.css +212208 -51572
  8. package/dist/yumma.min.css +1 -1
  9. package/gulpfile.js +32 -16
  10. package/package.json +13 -21
  11. package/src/_base.scss +72 -0
  12. package/src/_fonts.scss +14 -0
  13. package/src/abstracts/_breakpoints.scss +43 -0
  14. package/src/abstracts/_colors.scss +29 -0
  15. package/src/abstracts/_extensions.scss +19 -0
  16. package/src/abstracts/_functions.scss +3 -0
  17. package/src/abstracts/_layout.scss +18 -0
  18. package/src/abstracts/_mixins.scss +575 -0
  19. package/src/abstracts/_theme.scss +18 -0
  20. package/src/abstracts/_variables.scss +68 -0
  21. package/src/core.scss +3 -0
  22. package/src/utilities/_borders.scss +214 -0
  23. package/src/utilities/_box-model.scss +107 -0
  24. package/src/utilities/_effects.scss +74 -0
  25. package/src/utilities/_filters.scss +57 -0
  26. package/src/utilities/_flexbox.scss +192 -0
  27. package/src/utilities/_grid.scss +320 -0
  28. package/src/utilities/_interactions.scss +111 -0
  29. package/src/utilities/_layout.scss +310 -0
  30. package/src/utilities/_outlines.scss +76 -0
  31. package/src/utilities/_tables.scss +61 -0
  32. package/src/utilities/_typography.scss +168 -0
  33. package/src/yumma.scss +23 -0
  34. package/index.js +0 -8
  35. package/yumma-css/_base.scss +0 -62
  36. package/yumma-css/_breakpoints.scss +0 -43
  37. package/yumma-css/_colors.scss +0 -323
  38. package/yumma-css/_fonts.scss +0 -19
  39. package/yumma-css/_grid.scss +0 -75
  40. package/yumma-css/_layout.scss +0 -18
  41. package/yumma-css/_utils.scss +0 -1330
  42. package/yumma-css/_variables.scss +0 -94
  43. package/yumma-css/components/_badge.scss +0 -33
  44. package/yumma-css/components/_button.scss +0 -55
  45. package/yumma-css/components/_card.scss +0 -23
  46. package/yumma-css/components/_navbar.scss +0 -23
  47. package/yumma-css/index.scss +0 -21
package/gulpfile.js CHANGED
@@ -1,28 +1,44 @@
1
- const { src, dest, watch, series } = require('gulp');
2
- const sass = require('gulp-sass')(require('sass'));
3
- const clean = require('gulp-clean-css');
4
- const rename = require('gulp-rename');
1
+ const { src, dest, series } = require("gulp");
2
+ const sass = require("gulp-sass")(require("sass"));
3
+ const clean = require("gulp-clean-css");
4
+ const rename = require("gulp-rename");
5
5
 
6
6
  function standardFile() {
7
- return src('yumma-css/**/*.scss')
8
- .pipe(sass())
9
- .pipe(rename('yumma.css'))
10
- .pipe(dest('dist'));
7
+ return src("src/**/*.scss")
8
+ .pipe(sass().on("error", sass.logError))
9
+ .pipe(rename("yumma.css"))
10
+ .pipe(dest("dist"));
11
11
  }
12
12
 
13
13
  function minifiedFile() {
14
- return src('dist/yumma.css')
15
- .pipe(clean())
16
- .pipe(rename({ suffix: '.min' }))
17
- .pipe(dest('dist'));
14
+ return src("dist/yumma.css")
15
+ .pipe(clean())
16
+ .pipe(rename({ suffix: ".min" }))
17
+ .pipe(dest("dist"));
18
18
  }
19
19
 
20
- function watchFiles() {
21
- watch(['yumma-css/**/*.scss', '*.html'], series(standardFile, minifiedFile));
20
+ function coreFile() {
21
+ return src("src/core.scss")
22
+ .pipe(sass().on("error", sass.logError))
23
+ .pipe(rename("yumma-core.css"))
24
+ .pipe(dest("dist"));
25
+ }
26
+
27
+ function minifiedCoreFile() {
28
+ return src("dist/yumma-core.css")
29
+ .pipe(clean())
30
+ .pipe(rename({ suffix: ".min" }))
31
+ .pipe(dest("dist"));
22
32
  }
23
33
 
24
34
  exports.standardFile = standardFile;
25
35
  exports.minifiedFile = minifiedFile;
26
- exports.watch = watchFiles;
36
+ exports.coreFile = coreFile;
37
+ exports.minifiedCoreFile = minifiedCoreFile;
27
38
 
28
- exports.default = series(standardFile, minifiedFile, watchFiles);
39
+ exports.default = series(
40
+ standardFile,
41
+ minifiedFile,
42
+ coreFile,
43
+ minifiedCoreFile
44
+ );
package/package.json CHANGED
@@ -1,32 +1,24 @@
1
1
  {
2
- "name": "yummacss",
3
- "version": "1.2.0",
4
- "description": "Build beautiful websites with small class names.",
5
- "main": "index.js",
6
- "style": "dist/yumma.css",
7
2
  "author": "Renildo Pereira",
8
- "keywords": [
9
- "css",
10
- "css library",
11
- "customization"
12
- ],
3
+ "description": "Quickly build applications with less code in your markup.",
13
4
  "license": "MIT",
14
- "homepage": "https://yummacss.com",
15
- "bugs": {
16
- "url": "https://github.com/yumma-lib/yumma-css/issues"
17
- },
18
- "scripts": {
19
- "std": "gulp standardFile",
20
- "min": "gulp minifiedFile",
21
- "watch": "gulp watchFiles"
22
- },
5
+ "name": "yummacss",
6
+ "version": "2.1.0",
23
7
  "devDependencies": {
24
- "gulp": "^4.0.2",
25
8
  "gulp-clean-css": "^4.3.0",
26
9
  "gulp-copy": "^4.0.1",
27
- "gulp-purgecss": "^5.0.0",
10
+ "gulp-purgecss": "^6.0.0",
28
11
  "gulp-rename": "^2.0.0",
29
12
  "gulp-sass": "^5.1.0",
13
+ "gulp": "^4.0.2",
14
+ "npm-run-all": "^4.1.5",
30
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"
31
23
  }
32
24
  }
package/src/_base.scss ADDED
@@ -0,0 +1,72 @@
1
+ $base: true !default;
2
+
3
+ @if $base {
4
+ *,
5
+ *::before,
6
+ *::after {
7
+ border-style: solid;
8
+ border-width: 0;
9
+ box-sizing: border-box;
10
+ }
11
+
12
+ * {
13
+ color: inherit;
14
+ font-family: $yma-font-system;
15
+ margin: 0;
16
+ }
17
+
18
+ body {
19
+ font-family: inherit;
20
+ line-height: 1.5;
21
+ }
22
+
23
+ canvas,
24
+ img,
25
+ picture,
26
+ svg,
27
+ video {
28
+ display: block;
29
+ max-width: 100%;
30
+ }
31
+
32
+ button,
33
+ input,
34
+ optgroup,
35
+ select,
36
+ textarea {
37
+ background-color: $yma-color-transparent;
38
+ font: inherit;
39
+ }
40
+
41
+ button {
42
+ cursor: pointer;
43
+ }
44
+
45
+ h1,
46
+ h2,
47
+ h3,
48
+ h4,
49
+ h5,
50
+ h6,
51
+ p {
52
+ font-size: inherit;
53
+ font-weight: inherit;
54
+ overflow-wrap: break-word;
55
+ }
56
+
57
+ a {
58
+ text-decoration: none;
59
+ }
60
+
61
+ ol,
62
+ ul {
63
+ list-style: none;
64
+ padding: 0;
65
+ }
66
+
67
+ hr {
68
+ border-top: $yma-color-transparent;
69
+ border: 0;
70
+ margin: 1em 0;
71
+ }
72
+ }
@@ -0,0 +1,14 @@
1
+ .ff-c {
2
+ font-family: $yma-font-charter;
3
+ font-weight: $yma-font-weight;
4
+ }
5
+
6
+ .ff-m {
7
+ font-family: $yma-font-mono;
8
+ font-weight: $yma-font-weight;
9
+ }
10
+
11
+ .ff-s {
12
+ font-family: $yma-font-system;
13
+ font-weight: $yma-font-weight;
14
+ }
@@ -0,0 +1,43 @@
1
+ $yma-breakpoints: (
2
+ "sm": 640px,
3
+ "md": 768px,
4
+ "lg": 1024px,
5
+ "xl": 1280px,
6
+ "xxl": 1536px,
7
+ );
8
+
9
+ @mixin sm {
10
+ @media (min-width: map-get($yma-breakpoints, "sm")) {
11
+ @content;
12
+ }
13
+ }
14
+
15
+ @mixin md {
16
+ @media (min-width: map-get($yma-breakpoints, "md")) {
17
+ @content;
18
+ }
19
+ }
20
+
21
+ @mixin lg {
22
+ @media (min-width: map-get($yma-breakpoints, "lg")) {
23
+ @content;
24
+ }
25
+ }
26
+
27
+ @mixin xl {
28
+ @media (min-width: map-get($yma-breakpoints, "xl")) {
29
+ @content;
30
+ }
31
+ }
32
+
33
+ @mixin xxl {
34
+ @media (min-width: map-get($yma-breakpoints, "xxl")) {
35
+ @content;
36
+ }
37
+ }
38
+
39
+ @mixin breakpoint($bp) {
40
+ @media (min-width: $bp) {
41
+ @content;
42
+ }
43
+ }
@@ -0,0 +1,29 @@
1
+ @import "mixins";
2
+
3
+ @each $k, $v in $yma-theme {
4
+ @include color-variants("accent-color", "ac", $k, $v);
5
+ @include color-variants("background-color", "bg", $k, $v);
6
+ @include color-variants("border-bottom-color", "bc-b", $k, $v);
7
+ @include color-variants("border-color", "bc", $k, $v);
8
+ @include color-variants("border-left-color", "bc-l", $k, $v);
9
+ @include color-variants("border-right-color", "bc-r", $k, $v);
10
+ @include color-variants("border-top-color", "bc-t", $k, $v);
11
+ @include color-variants("caret-color", "cc", $k, $v);
12
+ @include color-variants("color", "tc", $k, $v);
13
+ @include color-variants("outline-color", "oc", $k, $v);
14
+ @include color-variants("text-decoration-color", "tdc", $k, $v);
15
+
16
+ @if (is-not-mono($v, $yma-theme)) {
17
+ @include shade-variants("accent-color", "ac", $k, $v, 10%);
18
+ @include shade-variants("background-color", "bg", $k, $v, 10%);
19
+ @include shade-variants("border-bottom-color", "bc-b", $k, $v, 10%);
20
+ @include shade-variants("border-color", "bc", $k, $v, 10%);
21
+ @include shade-variants("border-left-color", "bc-l", $k, $v, 10%);
22
+ @include shade-variants("border-right-color", "bc-r", $k, $v, 10%);
23
+ @include shade-variants("border-top-color", "bc-t", $k, $v, 10%);
24
+ @include shade-variants("caret-color", "cc", $k, $v, 10%);
25
+ @include shade-variants("color", "tc", $k, $v, 10%);
26
+ @include shade-variants("outline-color", "oc", $k, $v, 10%);
27
+ @include shade-variants("text-decoration-color", "tdc", $k, $v, 10%);
28
+ }
29
+ }
@@ -0,0 +1,19 @@
1
+ $yma-extension: (
2
+ "auto": auto,
3
+ "fc": fit-content,
4
+ "full": 100%,
5
+ "half": 50%,
6
+ "max": max-content,
7
+ "min": min-content,
8
+ );
9
+
10
+ $yma-height-extension: (
11
+ "1\\/1": 100dvh,
12
+ "1\\/2": 50dvh,
13
+ );
14
+
15
+ $yma-width-extension: (
16
+ "1\\/1": 100dvw,
17
+ "2\\/1": 50dvw,
18
+ );
19
+
@@ -0,0 +1,3 @@
1
+ @function is-not-mono($v, $yma-theme) {
2
+ @return $v != map-get($yma-theme, "black") and $v != map-get($yma-theme, "white") and $v != map-get($yma-theme, "transparent");
3
+ }
@@ -0,0 +1,18 @@
1
+ @import "mixins";
2
+ @import "breakpoints";
3
+
4
+ .cnt {
5
+ width: 100%;
6
+
7
+ @each $bp, $bp-value in $yma-breakpoints {
8
+ @include breakpoint($bp-value) {
9
+ max-width: $bp-value;
10
+ }
11
+ }
12
+ }
13
+
14
+ .ins {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ }