Skip to content

Commit e49d71e

Browse files
authored
Merge pull request #12492 from IgniteUI/skrastev/fix-12488-master
fix(toolbar): Reflect group by area styles when toolbar is enabled.
2 parents c283c0f + 9d4aff9 commit e49d71e

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

projects/igniteui-angular/src/lib/core/styles/components/grid-toolbar/_grid-toolbar-theme.scss

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,17 @@
9292
));
9393
}
9494

95+
@mixin _offset-sibling-elements($offset) {
96+
+ igx-grid-header-row,
97+
+ igx-grid-group-by-area {
98+
margin-top: $offset;
99+
}
100+
101+
+ igx-grid-group-by-area {
102+
height: auto;
103+
}
104+
}
105+
95106
/// @param {Map} $theme - The theme used to style the component.
96107
@mixin grid-toolbar($theme) {
97108
@include css-vars($theme);
@@ -121,6 +132,9 @@
121132
);
122133

123134
%igx-grid-toolbar {
135+
$height: map.get($grid-toolbar-height, 'comfortable');
136+
@include _offset-sibling-elements($height);
137+
124138
position: absolute;
125139
width: 100%;
126140
display: flex;
@@ -137,7 +151,7 @@
137151

138152
background: var-get($theme, 'background-color');
139153
height: auto;
140-
min-height: map.get($grid-toolbar-height, 'comfortable');
154+
min-height: $height;
141155
padding-block: 0;
142156
padding-inline: map.get($grid-toolbar-padding, 'comfortable');
143157

@@ -165,37 +179,30 @@
165179
}
166180
}
167181
}
168-
169-
+ igx-grid-header-row {
170-
margin-top: map.get($grid-toolbar-height, 'comfortable');
171-
}
172182
}
173183

174-
175184
%igx-grid-toolbar--cosy {
176-
min-height: map.get($grid-toolbar-height, 'cosy');
185+
$height: map.get($grid-toolbar-height, 'cosy');
186+
@include _offset-sibling-elements($height);
187+
188+
min-height: $height;
177189
padding-inline: map.get($grid-toolbar-padding, 'cosy');
178190

179191
[igxButton] {
180192
margin-inline-start: map.get($grid-toolbar-spacer, 'cosy');
181193
}
182-
183-
+ igx-grid-header-row {
184-
margin-top: map.get($grid-toolbar-height, 'cosy');
185-
}
186194
}
187195

188196
%igx-grid-toolbar--compact {
189-
min-height: map.get($grid-toolbar-height, 'compact');
197+
$height: map.get($grid-toolbar-height, 'compact');
198+
@include _offset-sibling-elements($height);
199+
200+
min-height: $height;
190201
padding-inline: map.get($grid-toolbar-padding, 'compact');
191202

192203
[igxButton] {
193204
margin-inline-start: map.get($grid-toolbar-spacer, 'compact');
194205
}
195-
196-
+ igx-grid-header-row {
197-
margin-top: map.get($grid-toolbar-height, 'compact');
198-
}
199206
}
200207

201208
%igx-grid-toolbar__title {

0 commit comments

Comments
 (0)