@cycjimmy/sass-lib 2.3.0 → 3.0.1

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/README.md CHANGED
@@ -23,7 +23,7 @@ $ yarn add @cycjimmy/sass-lib
23
23
 
24
24
  ## Usage
25
25
  ```scss
26
- @import "~@cycjimmy/sass-lib";
26
+ @use '~@cycjimmy/sass-lib' as sass-lib;
27
27
  ```
28
28
 
29
29
  <!-- Links: -->
@@ -1,3 +1,5 @@
1
+ @use 'sass:math';
2
+
1
3
  /**
2
4
  * strip units
3
5
  */
@@ -7,36 +9,36 @@
7
9
 
8
10
 
9
11
  /**
10
- * designPx2VW
12
+ * design-px2vw
11
13
  * $designDrawingLength
12
14
  * $designDrawingWidth
13
15
  *
14
16
  * Usage:
15
- * @function calcVW($designDrawingLength:0) {
16
- * @return call(get_function("designPx2VW"), $designDrawingLength, $designDrawingWidth);
17
+ * @function calc-vw($designDrawingLength:0) {
18
+ * @return call(get_function("design-px2vw"), $designDrawingLength, $designDrawingWidth);
17
19
  * }
18
20
  */
19
- @function designPx2VW($designDrawingLength:0, $designDrawingWidth:750) {
21
+ @function design-px2vw($designDrawingLength:0, $designDrawingWidth:750) {
20
22
  @return strip-units($designDrawingLength) / strip-units($designDrawingWidth) * 100vw;
21
23
  }
22
24
 
23
25
  /**
24
- * designPx2Px
26
+ * design-px2px
25
27
  * $designDrawingLength
26
28
  * $designDrawingWidth
27
29
  *
28
30
  * Usage:
29
- * @function calcPX($designDrawingLength:0) {
31
+ * @function calc-px($designDrawingLength:0) {
30
32
  * @return call(
31
- * get_function("designPx2Px"),
33
+ * get_function("design-px2px"),
32
34
  * $designDrawingLength,
33
35
  * $designDrawingWidth,
34
36
  * $pcRootWidth,
35
37
  * );
36
38
  * }
37
39
  */
38
- @function designPx2Px($designDrawingLength:0, $designDrawingWidth:750, $pcRootWidth:500) {
39
- @return round(strip-units($designDrawingLength)
40
+ @function design-px2px($designDrawingLength:0, $designDrawingWidth:750, $pcRootWidth:500) {
41
+ @return math.round(strip-units($designDrawingLength)
40
42
  / strip-units($designDrawingWidth)
41
43
  * strip-units($pcRootWidth)) * 1px;
42
44
  }
package/index.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  @charset "utf-8";
2
2
 
3
- @import "functions/index";
4
- @import "mixins/index";
5
- @import "placeholders/index";
3
+ @forward "functions/index";
4
+ @forward "mixins/index";
5
+ @forward "placeholders/index";
6
6
 
package/mixins/index.scss CHANGED
@@ -1,3 +1,5 @@
1
+ @use 'sass:math';
2
+
1
3
  /**
2
4
  * Fix Align Center
3
5
  * $offset
@@ -7,7 +9,14 @@
7
9
  * $bottom
8
10
  * $left
9
11
  */
10
- @mixin fix-center($offset: -100%, $overwrite: false, $top: false, $right: false, $bottom: false, $left: false) {
12
+ @mixin fix-center(
13
+ $offset: -100%,
14
+ $overwrite: false,
15
+ $top: false,
16
+ $right: false,
17
+ $bottom: false,
18
+ $left: false
19
+ ) {
11
20
  position: absolute;
12
21
  margin: auto;
13
22
  @if ($overwrite == false) {
@@ -56,8 +65,8 @@
56
65
  }
57
66
 
58
67
  @mixin square-wrap-vw($vw) {
59
- $max: round($vw*16 /9 *100)/100;
60
- $min: round($vw*3 /2 *100)/100;
68
+ $max: math.round($vw * 16 /9 * 100)/100;
69
+ $min: math.round($vw * 3 /2 * 100)/100;
61
70
 
62
71
  width: $vw + vw;
63
72
  height: $vw + vw;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cycjimmy/sass-lib",
3
- "version": "2.3.0",
3
+ "version": "3.0.1",
4
4
  "description": "Personal collection of sass.",
5
5
  "type": "module",
6
6
  "main": "index.scss",
@@ -1,4 +1,4 @@
1
- %_hidden-scrollbar {
1
+ %common-hidden-scrollbar {
2
2
  scrollbar-width: none;
3
3
 
4
4
  &::-webkit-scrollbar {
@@ -7,16 +7,16 @@
7
7
  }
8
8
 
9
9
  %hidden-scrollbar-x {
10
- @extend %_hidden-scrollbar;
10
+ @extend %common-hidden-scrollbar;
11
11
  overflow-x: auto;
12
12
  }
13
13
 
14
14
  %hidden-scrollbar-y {
15
- @extend %_hidden-scrollbar;
15
+ @extend %common-hidden-scrollbar;
16
16
  overflow-y: auto;
17
17
  }
18
18
 
19
19
  %hidden-scrollbar {
20
- @extend %_hidden-scrollbar;
20
+ @extend %common-hidden-scrollbar;
21
21
  overflow: auto;
22
22
  }
@@ -0,0 +1,31 @@
1
+ @use '../mixins/index' as mixins;
2
+ @use 'position' as *;
3
+
4
+ // full-container
5
+ %full-container {
6
+ @extend %abs;
7
+ left: 0;
8
+ top: 0;
9
+ width: 100%;
10
+ height: 100%;
11
+ }
12
+
13
+ // flex-center
14
+ %flex-center {
15
+ display: flex;
16
+ @include mixins.flex-box-align(center, center);
17
+ }
18
+
19
+ // clear-fix
20
+ %clear-fix {
21
+ &::before,
22
+ &::after {
23
+ content: ' ';
24
+ display: table;
25
+ }
26
+
27
+ &::after {
28
+ clear: both;
29
+ }
30
+ }
31
+
@@ -1,5 +1,5 @@
1
1
  // text-overflow-ellipsis
2
- %singleLine-text-overflow {
2
+ %single-line-text-overflow {
3
3
  overflow: hidden;
4
4
  text-overflow: ellipsis;
5
5
  white-space: nowrap;
@@ -1,10 +1,10 @@
1
- @import "position";
2
- @import "layout";
3
- @import "text-overflow";
4
- @import "hidden-scrollbar";
1
+ @forward 'position';
2
+ @forward 'layout';
3
+ @forward 'textOverflow';
4
+ @forward 'hiddenScrollbar';
5
5
 
6
- // gpu-speedUp
7
- %gpu-speedUp {
6
+ // gpu-speed-up
7
+ %gpu-speed-up {
8
8
  backface-visibility: hidden;
9
9
  perspective: 0;
10
10
  transform: translate3d(0, 0, 0);
package/reset/h5.scss CHANGED
@@ -5,25 +5,29 @@
5
5
 
6
6
  body {
7
7
  overflow: hidden;
8
- -webkit-user-select: none;
8
+ user-select: none;
9
9
  -webkit-touch-callout: none;
10
- -webkit-text-size-adjust: 100%;
11
10
  -webkit-overflow-scrolling: touch;
12
11
 
13
- -webkit-text-size-adjust: 100% !important;
14
- text-size-adjust: 100% !important;
15
- -moz-text-size-adjust: 100% !important;
12
+ text-size-adjust: 100%;
16
13
  }
17
14
 
18
- h1, h2, h3, h4, h5, h6 {
15
+ h1,
16
+ h2,
17
+ h3,
18
+ h4,
19
+ h5,
20
+ h6 {
19
21
  font-size: inherit;
20
22
  font-weight: normal;
21
23
  }
22
24
 
23
- a, button, input {
25
+ a,
26
+ button,
27
+ input {
24
28
  -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
25
29
  outline: none;
26
- border: none;
30
+ border: 0;
27
31
  touch-action: manipulation;
28
32
  cursor: pointer;
29
33
  }
@@ -33,7 +37,8 @@ a {
33
37
  color: inherit;
34
38
  }
35
39
 
36
- a, input {
40
+ a,
41
+ input {
37
42
  &:focus {
38
43
  outline: none;
39
44
  }
@@ -27,7 +27,7 @@ h6 {
27
27
 
28
28
  body {
29
29
  -webkit-touch-callout: none;
30
- -webkit-text-size-adjust: 100%;
30
+ text-size-adjust: 100%;
31
31
  -webkit-overflow-scrolling: touch;
32
32
  }
33
33
 
@@ -46,7 +46,7 @@ button,
46
46
  input {
47
47
  -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
48
48
  outline: none;
49
- border: none;
49
+ border: 0;
50
50
  touch-action: manipulation;
51
51
  }
52
52
 
@@ -1,31 +0,0 @@
1
- @import "../mixins/index";
2
- @import "position";
3
-
4
- // fullContainer
5
- %fullContainer {
6
- @extend %abs;
7
- left: 0;
8
- top: 0;
9
- width: 100%;
10
- height: 100%;
11
- }
12
-
13
- // flexCenter
14
- %flexCenter {
15
- display: flex;
16
- @include flex-box-align(center, center);
17
- }
18
-
19
- // clearFix
20
- %clearFix {
21
- &::before,
22
- &::after {
23
- content: " ";
24
- display: table;
25
- }
26
-
27
- &::after {
28
- clear: both;
29
- }
30
- }
31
-
File without changes