oo-loop 1.0.1 → 1.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/CHANGELOG.md +8 -0
- package/package.json +3 -3
- package/scss/_init.scss +2 -2
- package/scss/functions/_map.scss +5 -4
- package/scss/mixins/_breakpoint.scss +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Loop changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2: 2022-04-04
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
- Fix `pointbreak()` on rem unit
|
|
7
|
+
- Fix generating double properties when merging custom map with camelCase `props`
|
|
8
|
+
- Fix the lost of references when merging custom config on `init`
|
|
9
|
+
- Bump dependencies
|
|
10
|
+
|
|
3
11
|
## 1.0.1 : 2020-07-30
|
|
4
12
|
|
|
5
13
|
- Add missing `states` properties in variants
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oo-loop",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Loop CSS framework, flexible and expressive CSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"scss",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"dev": "node-sass -r --output-style expanded --precision 6 src/index.scss dist/loop.css",
|
|
40
40
|
"build": "node-sass --output-style compressed --precision 6 src/index.scss dist/loop.css",
|
|
41
41
|
"watch": "npm run dev && npm run dev -- -w",
|
|
42
|
-
"example": "node-sass --output-style expanded --
|
|
42
|
+
"example": "node-sass --output-style expanded --precision 6 example/src -o example/build"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"node-sass": "^
|
|
45
|
+
"node-sass": "^7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">= 6.0.0",
|
package/scss/_init.scss
CHANGED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
/// Init ooLoop configs
|
|
16
16
|
|
|
17
17
|
@mixin ooInit($custom:null) {
|
|
18
|
-
$map:
|
|
18
|
+
$map: $ooLoop;
|
|
19
19
|
@if isMap($custom) and isNotEmpty($custom) {
|
|
20
20
|
$map: mapMergeDeep($map, $custom);
|
|
21
|
-
$map: if(hasRef($map), ooParse($map), $map);
|
|
22
21
|
}
|
|
22
|
+
$map: if(hasRef($map), ooParse($map), $map);
|
|
23
23
|
$map: setMapValue($map, 'init', true);
|
|
24
24
|
$ooLoop: $map !global;
|
|
25
25
|
}
|
package/scss/functions/_map.scss
CHANGED
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
/// @credit-to https://gist.github.com/pentzzsolt
|
|
22
22
|
/// @param map $parentMap Map of data to be merged into
|
|
23
23
|
/// @param map $childMap The set of data
|
|
24
|
-
/// @param map $refMap The base map to refer too,
|
|
25
|
-
///
|
|
24
|
+
/// @param map $refMap The base map to refer too, usually equivalent to the $ooLoop before going into nested merge
|
|
25
|
+
/// @param bool $forceKebab force the use of kebab-case property
|
|
26
26
|
/// @return map
|
|
27
27
|
|
|
28
|
-
@function mapMergeDeep($parentMap, $childMap, $refMap:null) {
|
|
28
|
+
@function mapMergeDeep($parentMap, $childMap, $refMap:null, $forceKebab: false) {
|
|
29
29
|
$map: $parentMap;
|
|
30
30
|
@if not isMap($map) {
|
|
31
31
|
@return $map;
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
$refMap: if($refMap == null, $ooLoop, $refMap);
|
|
35
35
|
|
|
36
36
|
@each $key, $value in $childMap {
|
|
37
|
+
$key: if($forceKebab, toKebabCase($key), $key);
|
|
37
38
|
@if isRef(map-get($map, $key)) {
|
|
38
39
|
$mapValue: getRefValue(map-get($map, $key), $refMap);
|
|
39
40
|
$map: map-merge($map, ($key: $mapValue));
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
@if (not map-has-key($map, $key)) or (type-of(map-get($map, $key) ) != type-of($value)) or (not (isMap(map-get($map, $key)) and isMap($value))) {
|
|
42
43
|
$map: map-merge($map, ($key: $value));
|
|
43
44
|
} @else {
|
|
44
|
-
$map: map-merge($map, ($key: mapMergeDeep(map-get($map, $key), $value, $refMap)));
|
|
45
|
+
$map: map-merge($map, ($key: mapMergeDeep(map-get($map, $key), $value, $refMap, inList($key, ('props', 'states')))));
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
@return $map;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@if map-has-key(oo('breakpoints'), $key) {
|
|
16
16
|
$minWidth: map-get(oo('breakpoints'), $key);
|
|
17
17
|
$maxWidth: $minWidth - 1;
|
|
18
|
-
@if unit($minWidth)
|
|
18
|
+
@if inList(unit($minWidth), ('em', 'rem')) {
|
|
19
19
|
$maxWidth: $minWidth - 0.001;
|
|
20
20
|
}
|
|
21
21
|
@media (max-width: $maxWidth) {
|