|
92 | 92 | ));
|
93 | 93 | }
|
94 | 94 |
|
| 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 | + |
95 | 106 | /// @param {Map} $theme - The theme used to style the component.
|
96 | 107 | @mixin grid-toolbar($theme) {
|
97 | 108 | @include css-vars($theme);
|
|
121 | 132 | );
|
122 | 133 |
|
123 | 134 | %igx-grid-toolbar {
|
| 135 | + $height: map.get($grid-toolbar-height, 'comfortable'); |
| 136 | + @include _offset-sibling-elements($height); |
| 137 | + |
124 | 138 | position: absolute;
|
125 | 139 | width: 100%;
|
126 | 140 | display: flex;
|
|
137 | 151 |
|
138 | 152 | background: var-get($theme, 'background-color');
|
139 | 153 | height: auto;
|
140 |
| - min-height: map.get($grid-toolbar-height, 'comfortable'); |
| 154 | + min-height: $height; |
141 | 155 | padding-block: 0;
|
142 | 156 | padding-inline: map.get($grid-toolbar-padding, 'comfortable');
|
143 | 157 |
|
|
165 | 179 | }
|
166 | 180 | }
|
167 | 181 | }
|
168 |
| - |
169 |
| - + igx-grid-header-row { |
170 |
| - margin-top: map.get($grid-toolbar-height, 'comfortable'); |
171 |
| - } |
172 | 182 | }
|
173 | 183 |
|
174 |
| - |
175 | 184 | %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; |
177 | 189 | padding-inline: map.get($grid-toolbar-padding, 'cosy');
|
178 | 190 |
|
179 | 191 | [igxButton] {
|
180 | 192 | margin-inline-start: map.get($grid-toolbar-spacer, 'cosy');
|
181 | 193 | }
|
182 |
| - |
183 |
| - + igx-grid-header-row { |
184 |
| - margin-top: map.get($grid-toolbar-height, 'cosy'); |
185 |
| - } |
186 | 194 | }
|
187 | 195 |
|
188 | 196 | %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; |
190 | 201 | padding-inline: map.get($grid-toolbar-padding, 'compact');
|
191 | 202 |
|
192 | 203 | [igxButton] {
|
193 | 204 | margin-inline-start: map.get($grid-toolbar-spacer, 'compact');
|
194 | 205 | }
|
195 |
| - |
196 |
| - + igx-grid-header-row { |
197 |
| - margin-top: map.get($grid-toolbar-height, 'compact'); |
198 |
| - } |
199 | 206 | }
|
200 | 207 |
|
201 | 208 | %igx-grid-toolbar__title {
|
|
0 commit comments