Skip to content

Commit 61e1df1

Browse files
committed
adding group/wrapper to CQD
1 parent dce55e8 commit 61e1df1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/mixins/_wrapper.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// Wrap a module or group a collection of modules
2-
@mixin wrapper($namespace: 'wrapper') {
2+
@mixin wrapper($namespace: 'wrapper', $scope: $module) {
33
@at-root {
44
@include module($namespace) {
5-
@include modifier($module, $module: $namespace) {
5+
@include modifier($scope, $module: $namespace) {
66
@content;
77
}
88
}

src/utilities/_get-css-from-map.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
}
2626
}
2727

28+
// $property is for parent wrapper/group element
29+
@else if $property == 'group' or $property == 'wrapper' {
30+
@include wrapper($property, if($prevContext, $prevContext, $module)) {
31+
@include get-css-from-map($value);
32+
}
33+
}
34+
2835
// Determine if current node is queried modifier/state
2936
@else if str-index($property, 'is-') == 1 {
3037
@include modifier(str-replace($property, 'is-', '')) {
@@ -119,9 +126,10 @@
119126
}
120127
}
121128

129+
// $property is for a component
122130
@else if type-of($value) == 'map' {
123131
@include component($property, $sub-component: $sub-component) {
124-
@include get-css-from-map($value, $sub-component: true);
132+
@include get-css-from-map($value, $sub-component: true, $prevContext: $property);
125133
}
126134
}
127135

0 commit comments

Comments
 (0)