@cycjimmy/sass-lib 1.0.3 → 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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2019 cycjimmy
3
+ Copyright (c) 2019-2022 cycjimmy
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,9 +1,8 @@
1
1
  # sass-lib
2
2
 
3
- [![NPM version][npm-image]][npm-url]
4
- [![npm download][download-image]][download-url]
3
+ ![][workflows-badge-image]
5
4
  [![libraries dependency status][libraries-status-image]][libraries-status-url]
6
- [![libraries sourcerank][libraries-sourcerank-image]][libraries-status-url]
5
+ [![libraries sourcerank][libraries-sourcerank-image]][libraries-sourcerank-url]
7
6
  [![Release date][release-date-image]][release-url]
8
7
  [![semantic-release][semantic-image]][semantic-url]
9
8
  [![npm license][license-image]][download-url]
@@ -11,6 +10,9 @@
11
10
  Personal collection of sass.
12
11
 
13
12
  ## Install
13
+ [![NPM version][npm-image]][npm-url]
14
+ [![npm download][download-image]][download-url]
15
+
14
16
  ```shell
15
17
  # via npm
16
18
  $ npm install @cycjimmy/sass-lib --save
@@ -31,9 +33,12 @@ $ yarn add @cycjimmy/sass-lib
31
33
  [download-image]: https://img.shields.io/npm/dt/@cycjimmy/sass-lib
32
34
  [download-url]: https://npmjs.org/package/@cycjimmy/sass-lib
33
35
 
36
+ [workflows-badge-image]: https://github.com/cycjimmy/sass-lib/workflows/Test%20CI/badge.svg
37
+
34
38
  [libraries-status-image]: https://img.shields.io/librariesio/release/npm/@cycjimmy/sass-lib
35
39
  [libraries-sourcerank-image]: https://img.shields.io/librariesio/sourcerank/npm/@cycjimmy/sass-lib
36
40
  [libraries-status-url]: https://libraries.io/github/cycjimmy/sass-lib
41
+ [libraries-sourcerank-url]: https://libraries.io/npm/@cycjimmy%2Fsass-lib
37
42
 
38
43
  [release-date-image]: https://img.shields.io/github/release-date/cycjimmy/sass-lib
39
44
  [release-url]: https://github.com/cycjimmy/sass-lib/releases
@@ -0,0 +1,42 @@
1
+ /**
2
+ * strip units
3
+ */
4
+ @function strip-units($number) {
5
+ @return $number / ($number * 0 + 1);
6
+ }
7
+
8
+
9
+ /**
10
+ * designPx2VW
11
+ * $designDrawingLength
12
+ * $designDrawingWidth
13
+ *
14
+ * Usage:
15
+ * @function calcVW($designDrawingLength:0) {
16
+ * @return call(get_function("designPx2VW"), $designDrawingLength, $designDrawingWidth);
17
+ * }
18
+ */
19
+ @function designPx2VW($designDrawingLength:0, $designDrawingWidth:750) {
20
+ @return strip-units($designDrawingLength) / strip-units($designDrawingWidth) * 100vw;
21
+ }
22
+
23
+ /**
24
+ * designPx2Px
25
+ * $designDrawingLength
26
+ * $designDrawingWidth
27
+ *
28
+ * Usage:
29
+ * @function calcPX($designDrawingLength:0) {
30
+ * @return call(
31
+ * get_function("designPx2Px"),
32
+ * $designDrawingLength,
33
+ * $designDrawingWidth,
34
+ * $pcRootWidth,
35
+ * );
36
+ * }
37
+ */
38
+ @function designPx2Px($designDrawingLength:0, $designDrawingWidth:750, $pcRootWidth:500) {
39
+ @return round(strip-units($designDrawingLength)
40
+ / strip-units($designDrawingWidth)
41
+ * strip-units($pcRootWidth)) * 1px;
42
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@cycjimmy/sass-lib",
3
- "version": "1.0.3",
3
+ "version": "2.1.0",
4
4
  "description": "Personal collection of sass.",
5
- "main": "index.scss",
5
+ "type": "module",
6
+ "main": "lib/index.scss",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/cycjimmy/sass-lib.git"
@@ -16,17 +17,5 @@
16
17
  "bugs": {
17
18
  "url": "https://github.com/cycjimmy/sass-lib/issues"
18
19
  },
19
- "homepage": "https://github.com/cycjimmy/sass-lib#readme",
20
- "files": [
21
- "/functions",
22
- "/mixins",
23
- "/placeholders",
24
- "/reset"
25
- ],
26
- "publishConfig": {
27
- "access": "public"
28
- },
29
- "devDependencies": {
30
- "@cycjimmy/config-lib": "^1.4.0"
31
- }
20
+ "homepage": "https://github.com/cycjimmy/sass-lib#readme"
32
21
  }
@@ -1,21 +0,0 @@
1
- /**
2
- * strip units
3
- */
4
- @function strip-units($number) {
5
- @return $number / ($number * 0 + 1);
6
- }
7
-
8
-
9
- /**
10
- * calc vw
11
- * $designDrawingLength
12
- * $designDrawingWidth
13
- *
14
- * Usage:
15
- * @function calcVW($designDrawingLength:0) {
16
- * @return call(get_function("designPx2VW"), $designDrawingLength, $designDrawingWidth);
17
- * }
18
- */
19
- @function designPx2VW($designDrawingLength:0, $designDrawingWidth:750) {
20
- @return strip-units($designDrawingLength) / strip-units($designDrawingWidth) * 100vw;
21
- }