react-responsive-tools 2.1.1 → 2.1.3
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/package.json
CHANGED
@@ -10,8 +10,20 @@ const __dirname = path.dirname(__filename);
|
|
10
10
|
|
11
11
|
// Функция генерации SCSS содержимого для горизонтальных брейкпоинтов
|
12
12
|
const generateHorizontalSCSS = (breakpoints) => {
|
13
|
-
const beforeMixins = Object.keys(breakpoints).map(bp =>
|
14
|
-
|
13
|
+
const beforeMixins = Object.keys(breakpoints).map(bp => `
|
14
|
+
// ${bp} - ${breakpoints[bp]}
|
15
|
+
@mixin for-${bp}(){
|
16
|
+
@include mob-first(${bp}){
|
17
|
+
@content;
|
18
|
+
}
|
19
|
+
}`).join('\n');
|
20
|
+
const afterMixins = Object.keys(breakpoints).map(bp => `
|
21
|
+
// ${bp} - ${breakpoints[bp]}
|
22
|
+
@mixin before-${bp}(){
|
23
|
+
@include desk-first(${bp}){
|
24
|
+
@content;
|
25
|
+
}
|
26
|
+
}`).join('\n');
|
15
27
|
return `
|
16
28
|
@import "horizontal";
|
17
29
|
|
@@ -23,8 +35,20 @@ ${afterMixins}
|
|
23
35
|
|
24
36
|
// Функция генерации SCSS содержимого для вертикальных брейкпоинтов
|
25
37
|
const generateVerticalSCSS = (breakpoints) => {
|
26
|
-
const beforeMixins = Object.keys(breakpoints).map(bp =>
|
27
|
-
|
38
|
+
const beforeMixins = Object.keys(breakpoints).map(bp => `
|
39
|
+
// ${bp} - ${breakpoints[bp]}
|
40
|
+
@mixin v-for-${bp}(){
|
41
|
+
@include v-mob-first(${bp}){
|
42
|
+
@content;
|
43
|
+
}
|
44
|
+
}`).join('\n');
|
45
|
+
const afterMixins = Object.keys(breakpoints).map(bp => `
|
46
|
+
// ${bp} - ${breakpoints[bp]}
|
47
|
+
@mixin v-before-${bp}(){
|
48
|
+
@include v-desk-first(${bp}){
|
49
|
+
@content;
|
50
|
+
}
|
51
|
+
}`).join('\n');
|
28
52
|
return `
|
29
53
|
@import "vertical";
|
30
54
|
|
@@ -1,102 +1,142 @@
|
|
1
1
|
|
2
2
|
@import "horizontal";
|
3
3
|
|
4
|
+
|
5
|
+
// xs - 320px
|
4
6
|
@mixin for-xs(){
|
5
7
|
@include mob-first(xs){
|
6
8
|
@content;
|
7
9
|
}
|
8
10
|
}
|
11
|
+
|
12
|
+
// sm - 576px
|
9
13
|
@mixin for-sm(){
|
10
14
|
@include mob-first(sm){
|
11
15
|
@content;
|
12
16
|
}
|
13
17
|
}
|
18
|
+
|
19
|
+
// md - 768px
|
14
20
|
@mixin for-md(){
|
15
21
|
@include mob-first(md){
|
16
22
|
@content;
|
17
23
|
}
|
18
24
|
}
|
25
|
+
|
26
|
+
// lg - 992px
|
19
27
|
@mixin for-lg(){
|
20
28
|
@include mob-first(lg){
|
21
29
|
@content;
|
22
30
|
}
|
23
31
|
}
|
32
|
+
|
33
|
+
// lt - 1024px
|
24
34
|
@mixin for-lt(){
|
25
35
|
@include mob-first(lt){
|
26
36
|
@content;
|
27
37
|
}
|
28
38
|
}
|
39
|
+
|
40
|
+
// ltm - 1200px
|
29
41
|
@mixin for-ltm(){
|
30
42
|
@include mob-first(ltm){
|
31
43
|
@content;
|
32
44
|
}
|
33
45
|
}
|
46
|
+
|
47
|
+
// ltl - 1440px
|
34
48
|
@mixin for-ltl(){
|
35
49
|
@include mob-first(ltl){
|
36
50
|
@content;
|
37
51
|
}
|
38
52
|
}
|
53
|
+
|
54
|
+
// xl - 1920px
|
39
55
|
@mixin for-xl(){
|
40
56
|
@include mob-first(xl){
|
41
57
|
@content;
|
42
58
|
}
|
43
59
|
}
|
60
|
+
|
61
|
+
// xxl - 2560px
|
44
62
|
@mixin for-xxl(){
|
45
63
|
@include mob-first(xxl){
|
46
64
|
@content;
|
47
65
|
}
|
48
66
|
}
|
67
|
+
|
68
|
+
// qxl - 3840px
|
49
69
|
@mixin for-qxl(){
|
50
70
|
@include mob-first(qxl){
|
51
71
|
@content;
|
52
72
|
}
|
53
73
|
}
|
54
74
|
|
75
|
+
|
76
|
+
// xs - 320px
|
55
77
|
@mixin before-xs(){
|
56
78
|
@include desk-first(xs){
|
57
79
|
@content;
|
58
80
|
}
|
59
81
|
}
|
82
|
+
|
83
|
+
// sm - 576px
|
60
84
|
@mixin before-sm(){
|
61
85
|
@include desk-first(sm){
|
62
86
|
@content;
|
63
87
|
}
|
64
88
|
}
|
89
|
+
|
90
|
+
// md - 768px
|
65
91
|
@mixin before-md(){
|
66
92
|
@include desk-first(md){
|
67
93
|
@content;
|
68
94
|
}
|
69
95
|
}
|
96
|
+
|
97
|
+
// lg - 992px
|
70
98
|
@mixin before-lg(){
|
71
99
|
@include desk-first(lg){
|
72
100
|
@content;
|
73
101
|
}
|
74
102
|
}
|
103
|
+
|
104
|
+
// lt - 1024px
|
75
105
|
@mixin before-lt(){
|
76
106
|
@include desk-first(lt){
|
77
107
|
@content;
|
78
108
|
}
|
79
109
|
}
|
110
|
+
|
111
|
+
// ltm - 1200px
|
80
112
|
@mixin before-ltm(){
|
81
113
|
@include desk-first(ltm){
|
82
114
|
@content;
|
83
115
|
}
|
84
116
|
}
|
117
|
+
|
118
|
+
// ltl - 1440px
|
85
119
|
@mixin before-ltl(){
|
86
120
|
@include desk-first(ltl){
|
87
121
|
@content;
|
88
122
|
}
|
89
123
|
}
|
124
|
+
|
125
|
+
// xl - 1920px
|
90
126
|
@mixin before-xl(){
|
91
127
|
@include desk-first(xl){
|
92
128
|
@content;
|
93
129
|
}
|
94
130
|
}
|
131
|
+
|
132
|
+
// xxl - 2560px
|
95
133
|
@mixin before-xxl(){
|
96
134
|
@include desk-first(xxl){
|
97
135
|
@content;
|
98
136
|
}
|
99
137
|
}
|
138
|
+
|
139
|
+
// qxl - 3840px
|
100
140
|
@mixin before-qxl(){
|
101
141
|
@include desk-first(qxl){
|
102
142
|
@content;
|
@@ -1,62 +1,86 @@
|
|
1
1
|
|
2
2
|
@import "vertical";
|
3
3
|
|
4
|
+
|
5
|
+
// xs - 600px
|
4
6
|
@mixin v-for-xs(){
|
5
7
|
@include v-mob-first(xs){
|
6
8
|
@content;
|
7
9
|
}
|
8
10
|
}
|
11
|
+
|
12
|
+
// sm - 800px
|
9
13
|
@mixin v-for-sm(){
|
10
14
|
@include v-mob-first(sm){
|
11
15
|
@content;
|
12
16
|
}
|
13
17
|
}
|
18
|
+
|
19
|
+
// md - 1000px
|
14
20
|
@mixin v-for-md(){
|
15
21
|
@include v-mob-first(md){
|
16
22
|
@content;
|
17
23
|
}
|
18
24
|
}
|
25
|
+
|
26
|
+
// lg - 1200px
|
19
27
|
@mixin v-for-lg(){
|
20
28
|
@include v-mob-first(lg){
|
21
29
|
@content;
|
22
30
|
}
|
23
31
|
}
|
32
|
+
|
33
|
+
// xl - 1600px
|
24
34
|
@mixin v-for-xl(){
|
25
35
|
@include v-mob-first(xl){
|
26
36
|
@content;
|
27
37
|
}
|
28
38
|
}
|
39
|
+
|
40
|
+
// xxl - 1601px
|
29
41
|
@mixin v-for-xxl(){
|
30
42
|
@include v-mob-first(xxl){
|
31
43
|
@content;
|
32
44
|
}
|
33
45
|
}
|
34
46
|
|
47
|
+
|
48
|
+
// xs - 600px
|
35
49
|
@mixin v-before-xs(){
|
36
50
|
@include v-desk-first(xs){
|
37
51
|
@content;
|
38
52
|
}
|
39
53
|
}
|
54
|
+
|
55
|
+
// sm - 800px
|
40
56
|
@mixin v-before-sm(){
|
41
57
|
@include v-desk-first(sm){
|
42
58
|
@content;
|
43
59
|
}
|
44
60
|
}
|
61
|
+
|
62
|
+
// md - 1000px
|
45
63
|
@mixin v-before-md(){
|
46
64
|
@include v-desk-first(md){
|
47
65
|
@content;
|
48
66
|
}
|
49
67
|
}
|
68
|
+
|
69
|
+
// lg - 1200px
|
50
70
|
@mixin v-before-lg(){
|
51
71
|
@include v-desk-first(lg){
|
52
72
|
@content;
|
53
73
|
}
|
54
74
|
}
|
75
|
+
|
76
|
+
// xl - 1600px
|
55
77
|
@mixin v-before-xl(){
|
56
78
|
@include v-desk-first(xl){
|
57
79
|
@content;
|
58
80
|
}
|
59
81
|
}
|
82
|
+
|
83
|
+
// xxl - 1601px
|
60
84
|
@mixin v-before-xxl(){
|
61
85
|
@include v-desk-first(xxl){
|
62
86
|
@content;
|