Skip to content

Commit 39b9431

Browse files
authored
Merge pull request #5392 from IgniteUI/fix-#5361
fix(grid summaries): summaries overlap pinned summaries
2 parents 302c872 + 0eb240a commit 39b9431

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

projects/igniteui-angular/src/lib/core/styles/base/utilities/_functions.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,12 @@
349349
/// // }
350350
/// // otherwise, it will return the value for key 'icon-color' in the '$avatar-theme';
351351
/// @returns {String} - The value of the key in the passed map, or the name of key concatenated with the key name.
352-
@function --var($map, $key) {
352+
@function --var($map, $key, $fallback: '') {
353353
$igx-legacy-support: if(global-variable-exists('igx-legacy-support'), $igx-legacy-support, true);
354354

355355
@if map-has-key($map, $key) {
356356
@if $igx-legacy-support == false {
357-
@return unquote('var(--#{map-get($map, 'name')}-#{$key})');
357+
@return unquote('var(--#{map-get($map, 'name')}-#{$key}, #{$fallback})');
358358
} @else {
359359
@return map-get($map, $key);
360360
}

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
1010
///
1111
/// @param {Color} $background-color [null] - The summaries background color is inherited form igx-grid__tfoot
12+
/// @param {Color} $focus-background-color [null] - The background color when a summary item is on focus.
1213
/// @param {Color} $label-color [null] - The summaries label color.
1314
/// @param {Color} $result-color [null] - The summaries value/result color.
1415
/// @param {Color} $border-color [null] - The summaries border color.
@@ -35,6 +36,7 @@
3536
$schema: $light-schema,
3637
3738
$background-color: null,
39+
$focus-background-color: null,
3840
$label-color: null,
3941
$result-color: null,
4042
$border-color: null,
@@ -62,6 +64,7 @@
6264
name: $name,
6365
palette: $palette,
6466
background-color: $background-color,
67+
focus-background-color: $focus-background-color,
6568
label-color: $label-color,
6669
result-color: $result-color,
6770
border-color: $border-color,
@@ -98,12 +101,27 @@
98101
);
99102

100103
%igx-grid-summary {
104+
position: relative;
101105
display: flex;
102106
flex-direction: column;
103107
flex: 1 1 0%;
104108
padding: map-get($summary-padding, 'comfortable');
105-
background: --var($theme, 'background-color');
109+
background: --var($theme, 'background-color', inherit);
106110
overflow: hidden;
111+
outline-style: none;
112+
113+
&::after {
114+
position: absolute;
115+
content: '';
116+
top: 0;
117+
bottom: 0;
118+
left: 0;
119+
right: 0;
120+
}
121+
122+
&:focus::after {
123+
background: --var($theme, 'focus-background-color');
124+
}
107125
}
108126

109127
%igx-grid-summary--cosy {

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_grid-summary.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
/// Generates a light grid-summary schema.
1010
/// @type {Map}
1111
///
12-
/// @property {Color} background-color [inherit] - The summaries background color is inherited form igx-grid__tfoot
12+
/// @property {Color} background-color [inherit] - The summaries background color is inherited form igx-grid__tfoot.
13+
/// @property {Color} focus-background-color [igx-color] - The background color when a summary item is on focus.
1314
/// @property {map} label-color [igx-color: ('primary', 500)] - The summaries label color.
1415
/// @property {Color} result-color [currentColor] - The summaries value/result color.
1516
/// @property {map} border-color [igx-color: ('grays', 400)] - The summaries border color.
@@ -24,6 +25,11 @@ $_light-grid-summary: extend(
2425
$_default-shape-grid-summary,
2526
(
2627
background-color: inherit,
28+
29+
focus-background-color: (
30+
igx-color: ('grays', 100)
31+
),
32+
2733
label-color: (
2834
igx-color: ('primary', 500)
2935
),

0 commit comments

Comments
 (0)