react-responsive-tools 2.1.1 → 2.1.2
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 +1 -1
- package/src/scripts/generateSCSS.mjs +28 -4
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
|
|