@cycjimmy/sass-lib 4.0.0 → 5.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.
- package/README.md +4 -0
- package/functions/index.scss +1 -2
- package/mixins/index.scss +15 -10
- package/package.json +5 -2
- package/placeholders/_hiddenScrollbar.scss +3 -0
- package/placeholders/_layout.scss +4 -2
- package/reset/h5.scss +7 -8
- package/reset/special.scss +7 -7
package/README.md
CHANGED
|
@@ -49,6 +49,10 @@ Entry points (prefix with `pkg:` for the native Dart Sass importer):
|
|
|
49
49
|
@use '@cycjimmy/sass-lib/reset/special';
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
## Development
|
|
53
|
+
|
|
54
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the local toolchain, repository settings and bot configuration.
|
|
55
|
+
|
|
52
56
|
<!-- Links: -->
|
|
53
57
|
[npm-image]: https://img.shields.io/npm/v/@cycjimmy/sass-lib
|
|
54
58
|
[npm-url]: https://npmjs.org/package/@cycjimmy/sass-lib
|
package/functions/index.scss
CHANGED
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
*/
|
|
36
36
|
@function design-px2px($designDrawingLength: 0, $designDrawingWidth: 750, $pcRootWidth: 500) {
|
|
37
37
|
@return math.round(
|
|
38
|
-
math.div(strip-units($designDrawingLength), strip-units($designDrawingWidth))
|
|
39
|
-
* strip-units($pcRootWidth)
|
|
38
|
+
math.div(strip-units($designDrawingLength), strip-units($designDrawingWidth)) * strip-units($pcRootWidth)
|
|
40
39
|
) * 1px;
|
|
41
40
|
}
|
package/mixins/index.scss
CHANGED
|
@@ -19,22 +19,26 @@
|
|
|
19
19
|
) {
|
|
20
20
|
position: absolute;
|
|
21
21
|
margin: auto;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
|
|
23
|
+
@if $overwrite == false {
|
|
24
24
|
top: $offset;
|
|
25
25
|
right: $offset;
|
|
26
26
|
bottom: $offset;
|
|
27
|
+
left: $offset;
|
|
27
28
|
} @else {
|
|
28
|
-
@if
|
|
29
|
+
@if $top {
|
|
29
30
|
top: $top;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
|
|
33
|
+
@if $right {
|
|
32
34
|
right: $right;
|
|
33
35
|
}
|
|
34
|
-
|
|
36
|
+
|
|
37
|
+
@if $bottom {
|
|
35
38
|
bottom: $bottom;
|
|
36
39
|
}
|
|
37
|
-
|
|
40
|
+
|
|
41
|
+
@if $left {
|
|
38
42
|
left: $left;
|
|
39
43
|
}
|
|
40
44
|
}
|
|
@@ -47,10 +51,11 @@
|
|
|
47
51
|
* options: false, center, flex-end, ...
|
|
48
52
|
*/
|
|
49
53
|
@mixin flex-box-align($mainAxis:false, $crossAxis:false) {
|
|
50
|
-
@if
|
|
54
|
+
@if $mainAxis != false {
|
|
51
55
|
justify-content: $mainAxis;
|
|
52
56
|
}
|
|
53
|
-
|
|
57
|
+
|
|
58
|
+
@if $crossAxis != false {
|
|
54
59
|
align-items: $crossAxis;
|
|
55
60
|
}
|
|
56
61
|
}
|
|
@@ -59,8 +64,8 @@
|
|
|
59
64
|
* square container
|
|
60
65
|
*/
|
|
61
66
|
@mixin square-wrap($width:100%) {
|
|
62
|
-
height: 0;
|
|
63
67
|
width: $width;
|
|
68
|
+
height: 0;
|
|
64
69
|
padding-bottom: $width;
|
|
65
70
|
}
|
|
66
71
|
|
|
@@ -69,9 +74,9 @@
|
|
|
69
74
|
$min: math.div(math.round(math.div($vw * 3, 2) * 100), 100);
|
|
70
75
|
|
|
71
76
|
width: $vw + vw;
|
|
72
|
-
height: $vw + vw;
|
|
73
77
|
min-width: $min + vh;
|
|
74
78
|
max-width: $max + vh;
|
|
79
|
+
height: $vw + vw;
|
|
75
80
|
min-height: $min + vh;
|
|
76
81
|
max-height: $max + vh;
|
|
77
82
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cycjimmy/sass-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"description": "Personal collection of sass.",
|
|
6
6
|
"sass": "index.scss",
|
|
7
7
|
"author": "cycjimmy <cycjimmy@gmail.com> (https://github.com/cycjimmy)",
|
|
@@ -25,5 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"./*": "./*"
|
|
27
27
|
},
|
|
28
|
-
"main": "index.scss"
|
|
28
|
+
"main": "index.scss",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
29
32
|
}
|
|
@@ -8,15 +8,18 @@
|
|
|
8
8
|
|
|
9
9
|
%hidden-scrollbar-x {
|
|
10
10
|
@extend %common-hidden-scrollbar;
|
|
11
|
+
|
|
11
12
|
overflow-x: auto;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
%hidden-scrollbar-y {
|
|
15
16
|
@extend %common-hidden-scrollbar;
|
|
17
|
+
|
|
16
18
|
overflow-y: auto;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
%hidden-scrollbar {
|
|
20
22
|
@extend %common-hidden-scrollbar;
|
|
23
|
+
|
|
21
24
|
overflow: auto;
|
|
22
25
|
}
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
// full-container
|
|
5
5
|
%full-container {
|
|
6
6
|
@extend %abs;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
top: 0;
|
|
9
|
+
left: 0;
|
|
9
10
|
width: 100%;
|
|
10
11
|
height: 100%;
|
|
11
12
|
}
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
// flex-center
|
|
14
15
|
%flex-center {
|
|
15
16
|
display: flex;
|
|
17
|
+
|
|
16
18
|
@include mixins.flex-box-align(center, center);
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -20,8 +22,8 @@
|
|
|
20
22
|
%clear-fix {
|
|
21
23
|
&::before,
|
|
22
24
|
&::after {
|
|
23
|
-
content: ' ';
|
|
24
25
|
display: table;
|
|
26
|
+
content: ' ';
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
&::after {
|
package/reset/h5.scss
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
* {
|
|
2
|
-
margin: 0;
|
|
3
2
|
padding: 0;
|
|
3
|
+
margin: 0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
body {
|
|
7
7
|
overflow: hidden;
|
|
8
|
-
user-select: none;
|
|
9
|
-
-webkit-touch-callout: none;
|
|
10
8
|
-webkit-overflow-scrolling: touch;
|
|
11
|
-
|
|
12
9
|
text-size-adjust: 100%;
|
|
10
|
+
-webkit-touch-callout: none;
|
|
11
|
+
user-select: none;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
h1,
|
|
@@ -25,16 +24,16 @@ h6 {
|
|
|
25
24
|
a,
|
|
26
25
|
button,
|
|
27
26
|
input {
|
|
28
|
-
-webkit-tap-highlight-color: rgba(255, 0, 0, 0);
|
|
29
|
-
outline: none;
|
|
30
27
|
border: 0;
|
|
31
|
-
touch-action: manipulation;
|
|
32
28
|
cursor: pointer;
|
|
29
|
+
outline: none;
|
|
30
|
+
-webkit-tap-highlight-color: rgba(255, 0, 0, 0);
|
|
31
|
+
touch-action: manipulation;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
a {
|
|
36
|
-
text-decoration: none;
|
|
37
35
|
color: inherit;
|
|
36
|
+
text-decoration: none;
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
a,
|
package/reset/special.scss
CHANGED
|
@@ -21,14 +21,14 @@ h3,
|
|
|
21
21
|
h4,
|
|
22
22
|
h5,
|
|
23
23
|
h6 {
|
|
24
|
-
margin: 0;
|
|
25
24
|
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
body {
|
|
29
|
-
-webkit-touch-callout: none;
|
|
30
|
-
text-size-adjust: 100%;
|
|
31
29
|
-webkit-overflow-scrolling: touch;
|
|
30
|
+
text-size-adjust: 100%;
|
|
31
|
+
-webkit-touch-callout: none;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
h1,
|
|
@@ -44,15 +44,15 @@ h6 {
|
|
|
44
44
|
a,
|
|
45
45
|
button,
|
|
46
46
|
input {
|
|
47
|
-
-webkit-tap-highlight-color: rgba(255, 0, 0, 0);
|
|
48
|
-
outline: none;
|
|
49
47
|
border: 0;
|
|
48
|
+
outline: none;
|
|
49
|
+
-webkit-tap-highlight-color: rgba(255, 0, 0, 0);
|
|
50
50
|
touch-action: manipulation;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
a {
|
|
54
|
-
text-decoration: none;
|
|
55
54
|
color: inherit;
|
|
55
|
+
text-decoration: none;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
a,
|
|
@@ -73,8 +73,8 @@ iframe,
|
|
|
73
73
|
object,
|
|
74
74
|
audio,
|
|
75
75
|
video {
|
|
76
|
-
height: auto;
|
|
77
76
|
max-width: 100%;
|
|
77
|
+
height: auto;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// Iframe
|