@cycjimmy/sass-lib 2.2.2 → 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.
- package/README.md +1 -1
- package/functions/index.scss +11 -9
- package/index.scss +3 -3
- package/mixins/index.scss +12 -3
- package/package.json +1 -1
- package/placeholders/hidden-scrollbar.scss +22 -0
- package/placeholders/index.scss +6 -5
- package/placeholders/layout.scss +9 -9
- package/placeholders/text-overflow.scss +1 -1
- package/reset/h5.scss +14 -9
- package/reset/special.scss +2 -2
package/README.md
CHANGED
package/functions/index.scss
CHANGED
|
@@ -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
|
-
*
|
|
12
|
+
* design-px2vw
|
|
11
13
|
* $designDrawingLength
|
|
12
14
|
* $designDrawingWidth
|
|
13
15
|
*
|
|
14
16
|
* Usage:
|
|
15
|
-
* @function
|
|
16
|
-
* @return call(get_function("
|
|
17
|
+
* @function calc-vw($designDrawingLength:0) {
|
|
18
|
+
* @return call(get_function("design-px2vw"), $designDrawingLength, $designDrawingWidth);
|
|
17
19
|
* }
|
|
18
20
|
*/
|
|
19
|
-
@function
|
|
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
|
-
*
|
|
26
|
+
* design-px2px
|
|
25
27
|
* $designDrawingLength
|
|
26
28
|
* $designDrawingWidth
|
|
27
29
|
*
|
|
28
30
|
* Usage:
|
|
29
|
-
* @function
|
|
31
|
+
* @function calc-px($designDrawingLength:0) {
|
|
30
32
|
* @return call(
|
|
31
|
-
* get_function("
|
|
33
|
+
* get_function("design-px2px"),
|
|
32
34
|
* $designDrawingLength,
|
|
33
35
|
* $designDrawingWidth,
|
|
34
36
|
* $pcRootWidth,
|
|
35
37
|
* );
|
|
36
38
|
* }
|
|
37
39
|
*/
|
|
38
|
-
@function
|
|
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
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(
|
|
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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
%common-hidden-scrollbar {
|
|
2
|
+
scrollbar-width: none;
|
|
3
|
+
|
|
4
|
+
&::-webkit-scrollbar {
|
|
5
|
+
display: none;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
%hidden-scrollbar-x {
|
|
10
|
+
@extend %common-hidden-scrollbar;
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
%hidden-scrollbar-y {
|
|
15
|
+
@extend %common-hidden-scrollbar;
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
%hidden-scrollbar {
|
|
20
|
+
@extend %common-hidden-scrollbar;
|
|
21
|
+
overflow: auto;
|
|
22
|
+
}
|
package/placeholders/index.scss
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@forward 'position';
|
|
2
|
+
@forward 'layout';
|
|
3
|
+
@forward 'text-overflow';
|
|
4
|
+
@forward 'hidden-scrollbar';
|
|
4
5
|
|
|
5
|
-
// gpu-
|
|
6
|
-
%gpu-
|
|
6
|
+
// gpu-speed-up
|
|
7
|
+
%gpu-speed-up {
|
|
7
8
|
backface-visibility: hidden;
|
|
8
9
|
perspective: 0;
|
|
9
10
|
transform: translate3d(0, 0, 0);
|
package/placeholders/layout.scss
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import '../mixins/index';
|
|
2
|
+
@import 'position';
|
|
3
3
|
|
|
4
|
-
//
|
|
5
|
-
%
|
|
4
|
+
// full-container
|
|
5
|
+
%full-container {
|
|
6
6
|
@extend %abs;
|
|
7
7
|
left: 0;
|
|
8
8
|
top: 0;
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
height: 100%;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
//
|
|
14
|
-
%
|
|
13
|
+
// flex-center
|
|
14
|
+
%flex-center {
|
|
15
15
|
display: flex;
|
|
16
16
|
@include flex-box-align(center, center);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
//
|
|
20
|
-
%
|
|
19
|
+
// clear-fix
|
|
20
|
+
%clear-fix {
|
|
21
21
|
&::before,
|
|
22
22
|
&::after {
|
|
23
|
-
content:
|
|
23
|
+
content: ' ';
|
|
24
24
|
display: table;
|
|
25
25
|
}
|
|
26
26
|
|
package/reset/h5.scss
CHANGED
|
@@ -5,25 +5,29 @@
|
|
|
5
5
|
|
|
6
6
|
body {
|
|
7
7
|
overflow: hidden;
|
|
8
|
-
|
|
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
|
-
|
|
14
|
-
text-size-adjust: 100% !important;
|
|
15
|
-
-moz-text-size-adjust: 100% !important;
|
|
12
|
+
text-size-adjust: 100%;
|
|
16
13
|
}
|
|
17
14
|
|
|
18
|
-
h1,
|
|
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,
|
|
25
|
+
a,
|
|
26
|
+
button,
|
|
27
|
+
input {
|
|
24
28
|
-webkit-tap-highlight-color: rgba(255, 0, 0, 0);
|
|
25
29
|
outline: none;
|
|
26
|
-
border:
|
|
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,
|
|
40
|
+
a,
|
|
41
|
+
input {
|
|
37
42
|
&:focus {
|
|
38
43
|
outline: none;
|
|
39
44
|
}
|
package/reset/special.scss
CHANGED
|
@@ -27,7 +27,7 @@ h6 {
|
|
|
27
27
|
|
|
28
28
|
body {
|
|
29
29
|
-webkit-touch-callout: none;
|
|
30
|
-
|
|
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:
|
|
49
|
+
border: 0;
|
|
50
50
|
touch-action: manipulation;
|
|
51
51
|
}
|
|
52
52
|
|