minolith 0.0.0 → 0.0.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
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
@use "sass:string";
|
|
2
|
+
|
|
1
3
|
@function strReplace($str, $substr, $newsubstr, $all: false) {
|
|
2
|
-
$pos:
|
|
4
|
+
$pos: string.index($str, $substr);
|
|
3
5
|
|
|
4
6
|
@while $pos != null {
|
|
5
|
-
$strlen:
|
|
6
|
-
$start:
|
|
7
|
-
$end:
|
|
7
|
+
$strlen: string.length($substr);
|
|
8
|
+
$start: string.slice($str, 0, $pos - 1);
|
|
9
|
+
$end: string.slice($str, $pos + $strlen);
|
|
8
10
|
$str: $start + $newsubstr + $end;
|
|
9
11
|
|
|
10
12
|
@if $all == true {
|
|
11
|
-
$pos:
|
|
13
|
+
$pos: string.index($str, $substr);
|
|
12
14
|
} @else {
|
|
13
15
|
$pos: null;
|
|
14
16
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
@use "../mixins/index.scss" as mixins;
|
|
3
|
+
|
|
4
|
+
.columns {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
&.is-direction-row {
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
}
|
|
11
|
+
&.is-direction-row-reverse {
|
|
12
|
+
flex-direction: row-reverse;
|
|
13
|
+
}
|
|
14
|
+
&.is-direction-column {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
&.is-direction-column-reverse {
|
|
18
|
+
flex-direction: column-reverse;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include mixins.is-responsive("-direction-row") {
|
|
22
|
+
flex-direction: row;
|
|
23
|
+
}
|
|
24
|
+
@include mixins.is-responsive("-direction-row-reverse") {
|
|
25
|
+
flex-direction: row-reverse;
|
|
26
|
+
}
|
|
27
|
+
@include mixins.is-responsive("-direction-column") {
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
}
|
|
30
|
+
@include mixins.is-responsive("-direction-column-reverse") {
|
|
31
|
+
flex-direction: column-reverse;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.column {
|
|
35
|
+
@include mixins.column();
|
|
36
|
+
&.is-full {
|
|
37
|
+
flex: none;
|
|
38
|
+
max-width: 100%;
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
@for $num from 1 through variables.$columns-count {
|
|
43
|
+
.column-#{$num} {
|
|
44
|
+
@include mixins.column();
|
|
45
|
+
flex-basis: percentage(math.div($num, variables.$columns-count));
|
|
46
|
+
max-width: percentage(math.div($num, variables.$columns-count));
|
|
47
|
+
width: percentage(math.div($num, variables.$columns-count));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.column,
|
|
51
|
+
[class^="column-"] {
|
|
52
|
+
@for $num from 1 through variables.$columns-count {
|
|
53
|
+
@include mixins.is-responsive("-" + $num) {
|
|
54
|
+
flex-basis: percentage(math.div($num, variables.$columns-count));
|
|
55
|
+
max-width: percentage(math.div($num, variables.$columns-count));
|
|
56
|
+
width: percentage(math.div($num, variables.$columns-count));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|