Skip to content

Commit aba2362

Browse files
author
MPopov
committed
fix(grid): Allow users to change the group area color
1 parent 88d0dcd commit aba2362

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
/// @param {Color} $drop-indicator-color [null] - The color applied to the line between the columns when dragging a column.
5757
///
5858
/// @param {Color} $grouparea-background [null] - The grid group area background color.
59+
/// @param {Color} $grouparea-color [null] - The grid group area color.
5960
///
6061
/// @param {Color} $group-row-background [null] - The grid group row background color.
6162
/// @param {Color} $group-row-selected-background [null] - The drop area background on drop color.
@@ -160,6 +161,7 @@
160161
$drop-indicator-color: null,
161162
162163
$grouparea-background: null,
164+
$grouparea-color: null,
163165
164166
$group-row-background: null,
165167
$group-row-selected-background: null,
@@ -364,10 +366,20 @@
364366
$grouparea-background: $header-background
365367
}
366368

369+
@if not($grouparea-color) and $grouparea-background {
370+
$grouparea-color: rgba(text-contrast($grouparea-background), .8)
371+
}
372+
373+
@if not($grouparea-color) and $header-background {
374+
$grouparea-color: rgba(text-contrast($header-background), .8)
375+
}
376+
367377
@if not($drop-area-background) and $grouparea-background {
368378
$drop-area-background: text-contrast($grouparea-background);
369379
}
370380

381+
382+
371383
@if not($drop-area-on-drop-background) and $drop-area-background {
372384
$drop-area-on-drop-background: $drop-area-background;
373385
}
@@ -470,6 +482,8 @@
470482
drop-indicator-color: $drop-indicator-color,
471483

472484
grouparea-background: $grouparea-background,
485+
grouparea-color: $grouparea-color,
486+
473487
group-label-column-name-text: $group-label-column-name-text,
474488
group-label-icon: $group-label-icon,
475489
group-label-text: $group-label-text,
@@ -1875,6 +1889,7 @@
18751889
flex-wrap: wrap;
18761890
border-bottom: $grid-header-border;
18771891
background: --var($theme, 'grouparea-background');
1892+
color: --var($theme, 'grouparea-color');
18781893
min-height: map-get($grouparea-min-height, 'comfortable');
18791894
padding: map-get($grouparea-padding, 'comfortable');
18801895
z-index: 2;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
/// @prop {Map} cell-selected-text-color [igx-contrast-color: ('grays', 200)] - The selected cell text color.
4343
/// @prop {Map} resize-line-color [igx-color: ('secondary', 500)] - The table header resize line color.
4444
/// @prop {Map} grouparea-background [igx-color: ('grays', 100), hexrgba: #fff] - The grid group area background color.
45+
/// @prop {map} grouparea-color [igx-color: ('grays', 500)] - The grid group area color.
4546
/// @prop {Map} group-row-background [igx-color: ('grays', 100), hexrgba: #fff] - The grid group row background color.
4647
/// @prop {Map} group-row-selected-background [igx-color: ('grays', 200), hexrgba: #fff] - The drop area background on drop color.
4748
/// @prop {Map} active-expand-icon-color [igx-color: ('grays', 500)] - The drop area background on drop color.
@@ -90,6 +91,10 @@ $_light-grid: extend(
9091
(
9192
variant: 'material',
9293

94+
grouparea-color: (
95+
igx-color: ('grays', 500)
96+
),
97+
9398
filtering-background-and: (
9499
igx-color: ('primary', 300)
95100
),

0 commit comments

Comments
 (0)