Skip to content

Commit f9267e4

Browse files
authored
Merge pull request #12532 from IgniteUI/mpopov/grid-toolbar-problems-M
fix(grid-toolbar): toolbar doesn't fit content
2 parents 9b59b4d + 5ffff56 commit f9267e4

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

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

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,6 @@
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-
10695
/// @param {Map} $theme - The theme used to style the component.
10796
@mixin grid-toolbar($theme) {
10897
@include css-vars($theme);
@@ -132,10 +121,6 @@
132121
);
133122

134123
%igx-grid-toolbar {
135-
$height: map.get($grid-toolbar-height, 'comfortable');
136-
@include _offset-sibling-elements($height);
137-
138-
position: absolute;
139124
width: 100%;
140125
display: flex;
141126
align-items: center;
@@ -151,7 +136,7 @@
151136

152137
background: var-get($theme, 'background-color');
153138
height: auto;
154-
min-height: $height;
139+
min-height: map.get($grid-toolbar-height, 'comfortable');
155140
padding-block: 0;
156141
padding-inline: map.get($grid-toolbar-padding, 'comfortable');
157142

@@ -182,10 +167,7 @@
182167
}
183168

184169
%igx-grid-toolbar--cosy {
185-
$height: map.get($grid-toolbar-height, 'cosy');
186-
@include _offset-sibling-elements($height);
187-
188-
min-height: $height;
170+
min-height: map.get($grid-toolbar-height, 'cosy');
189171
padding-inline: map.get($grid-toolbar-padding, 'cosy');
190172

191173
[igxButton] {
@@ -194,10 +176,7 @@
194176
}
195177

196178
%igx-grid-toolbar--compact {
197-
$height: map.get($grid-toolbar-height, 'compact');
198-
@include _offset-sibling-elements($height);
199-
200-
min-height: $height;
179+
min-height: map.get($grid-toolbar-height, 'compact');
201180
padding-inline: map.get($grid-toolbar-padding, 'compact');
202181

203182
[igxButton] {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@
696696
position: relative;
697697
display: grid;
698698
grid-template-rows: auto auto auto 1fr auto auto;
699-
grid-template-columns: 1fr;
699+
grid-template-columns: 100%;
700700
overflow: hidden;
701701
box-shadow: $grid-shadow;
702702

0 commit comments

Comments
 (0)