Skip to content

Commit 7acc705

Browse files
simeonoffChronosSF
andauthored
fix(grid): update styling samples to use correct theming scoping and simplified themes (#3953)
Co-authored-by: Stamen Stoychev <sstoychev@infragistics.com>
1 parent e200522 commit 7acc705

14 files changed

Lines changed: 267 additions & 371 deletions

File tree

src/app/grid/custom-grid-paging-style/custom-grid-paging-style.component.scss

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,51 +8,51 @@ $light-gray: #999;
88
$inactive-color: #826217;
99

1010
$dark-paginator: paginator-theme(
11-
$text-color: $my-secondary,
12-
$background-color: $my-primary,
13-
$border-color: $my-secondary
11+
$text-color: $my-secondary,
12+
$background-color: $my-primary,
13+
$border-color: $my-secondary,
1414
);
1515

1616
$dark-button: flat-icon-button-theme(
17-
$foreground: $my-secondary,
18-
$hover-foreground: $dark-gray,
19-
$hover-background: $my-secondary,
20-
$focus-foreground: $dark-gray,
21-
$focus-background: $my-secondary,
22-
$border-color: $my-secondary,
23-
$focus-border-color: $my-secondary,
24-
$disabled-foreground: $inactive-color
17+
$foreground: $my-secondary,
18+
$hover-foreground: $dark-gray,
19+
$hover-background: $my-secondary,
20+
$focus-foreground: $dark-gray,
21+
$focus-background: $my-secondary,
22+
$border-color: $my-secondary,
23+
$focus-border-color: $my-secondary,
24+
$disabled-foreground: $inactive-color,
2525
);
2626

2727
$dark-select: select-theme(
28-
$toggle-button-background: $my-primary,
29-
$toggle-button-foreground: $inactive-color,
30-
$toggle-button-foreground-filled: $inactive-color,
31-
$toggle-button-foreground-focus: $inactive-color,
32-
$toggle-button-background-focus--border: $my-primary,
28+
$toggle-button-background: $my-primary,
29+
$toggle-button-foreground: $inactive-color,
30+
$toggle-button-foreground-filled: $inactive-color,
31+
$toggle-button-foreground-focus: $inactive-color,
32+
$toggle-button-background-focus--border: $my-primary,
3333
);
3434

3535
$dark-input-group: input-group-theme(
36-
$filled-text-color: $my-secondary,
37-
$idle-text-color: $my-secondary,
38-
$filled-text-hover-color: $my-secondary,
39-
$focused-text-color: $my-secondary,
40-
$border-color: darken($inactive-color, 10%),
41-
$focused-border-color: $my-secondary,
42-
$input-suffix-color: $my-secondary,
36+
$filled-text-color: $my-secondary,
37+
$idle-text-color: $my-secondary,
38+
$filled-text-hover-color: $my-secondary,
39+
$focused-text-color: $my-secondary,
40+
$border-color: darken($inactive-color, 10%),
41+
$focused-border-color: $my-secondary,
42+
$input-suffix-color: $my-secondary,
4343
);
4444

4545
$dark-drop-down-theme: drop-down-theme(
46-
$background-color: $my-primary,
47-
$item-text-color: $my-secondary,
48-
$selected-item-background: $my-secondary,
49-
$selected-item-text-color: $dark-gray,
50-
$focused-item-background: $my-secondary,
51-
$focused-item-text-color: $dark-gray,
52-
$selected-focus-item-background: $my-secondary,
53-
$selected-focus-item-text-color: $dark-gray,
54-
$selected-hover-item-background: $my-secondary,
55-
$selected-hover-item-text-color: $dark-gray
46+
$background-color: $my-primary,
47+
$item-text-color: $my-secondary,
48+
$selected-item-background: $my-secondary,
49+
$selected-item-text-color: $dark-gray,
50+
$focused-item-background: $my-secondary,
51+
$focused-item-text-color: $dark-gray,
52+
$selected-focus-item-background: $my-secondary,
53+
$selected-focus-item-text-color: $dark-gray,
54+
$selected-hover-item-background: $my-secondary,
55+
$selected-hover-item-text-color: $dark-gray,
5656
);
5757

5858
igx-grid {
Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,16 @@
11
@use "layout.scss";
22
@use "igniteui-angular/theming" as *;
33

4-
$yellow: #ffcd0f;
5-
$black: #292826;
4+
$background: #292826;
5+
$foreground: #eeece1;
6+
$accent: #ffcd0f;
67

78
$custom-grid: grid-theme(
8-
$filtering-row-background: $yellow,
9-
$excel-filtering-header-foreground: $black,
10-
$excel-filtering-subheader-foreground: $black,
11-
$excel-filtering-actions-foreground: #006400,
12-
$excel-filtering-actions-hover-foreground: $yellow,
13-
$excel-filtering-actions-disabled-foreground: var(--ig-gray-500)
9+
$background: $background,
10+
$foreground: $foreground,
11+
$accent-color: $accent,
1412
);
1513

16-
$custom-button: contained-button-theme(
17-
$background: $black,
18-
$foreground: $yellow,
19-
$hover-background: $black,
20-
$hover-foreground: $yellow
21-
);
22-
23-
$flat-custom-button: flat-button-theme(
24-
$foreground: $black,
25-
);
26-
27-
$custom-input-group: input-group-theme(
28-
$box-background: $yellow,
29-
$idle-text-color: $black,
30-
$focused-text-color: $black,
31-
$filled-text-color: $black
32-
);
33-
34-
$custom-list: list-theme(
35-
$background: $yellow
36-
);
37-
38-
$custom-checkbox: checkbox-theme(
39-
$empty-color: $black,
40-
$fill-color: $black,
41-
$tick-color: $yellow,
42-
$label-color: $black
43-
);
44-
45-
$custom-drop-down: drop-down-theme(
46-
$background-color: $yellow,
47-
$item-text-color: $black,
48-
$hover-item-background: $black,
49-
$hover-item-text-color: $yellow
50-
);
51-
52-
:host {
14+
:host ::ng-deep {
5315
@include tokens($custom-grid);
54-
@include tokens($custom-drop-down);
55-
@include tokens($custom-input-group);
56-
@include tokens($custom-checkbox);
57-
@include tokens($custom-list);
58-
@include tokens($custom-button);
59-
@include tokens($flat-custom-button);
6016
}

src/app/grid/grid-groupby-styling/grid-groupby-styling.component.scss

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,31 @@ $light-gray: #f8f8f8;
77
$black: #222;
88

99
$custom-theme: grid-theme(
10-
$group-row-background: $gray,
11-
$group-row-selected-background: #383838,
12-
$group-label-column-name-text: $light-gray,
13-
$group-label-icon: $yellow,
14-
$group-label-text: $light-gray,
15-
$group-count-background: $yellow,
16-
$group-count-text-color: $black,
17-
$expand-icon-color: $yellow,
18-
$expand-icon-hover-color: rgb(223, 181, 13),
19-
$cell-active-border-color: $yellow,
20-
$row-selected-background: #fff6d3,
21-
$row-selected-text-color: $black,
22-
$drop-indicator-color: $yellow
10+
$group-row-background: $gray,
11+
$group-row-selected-background: #383838,
12+
$group-label-column-name-text: $light-gray,
13+
$group-label-icon: $yellow,
14+
$group-label-text: $light-gray,
15+
$group-count-background: $yellow,
16+
$group-count-text-color: $black,
17+
$expand-icon-color: $yellow,
18+
$expand-icon-hover-color: rgb(223, 181, 13),
19+
$cell-active-border-color: $yellow,
20+
$row-selected-background: #fff6d3,
21+
$row-selected-text-color: $black,
22+
$drop-indicator-color: $yellow,
2323
);
2424

2525
$custom-chips-theme: chip-theme(
26-
$background: $gray,
27-
$text-color: $light-gray,
28-
$hover-text-color: #e7e7e7
26+
$background: $gray,
27+
$text-color: $light-gray,
28+
$hover-text-color: #e7e7e7,
2929
);
3030

31-
:host {
31+
:host ::ng-deep {
3232
@include tokens($custom-theme);
33-
@include tokens($custom-chips-theme);
33+
34+
igx-chip {
35+
@include tokens($custom-chips-theme);
36+
}
3437
}

src/app/grid/grid-groupby-summary-styling-sample/grid-groupby-summary-styling-sample.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ $custom-theme: grid-summary-theme(
1616
::ng-deep {
1717
igx-grid-summary-row {
1818
--summaries-patch-background: #{$summaries-background};
19-
}
2019

21-
@include tokens($custom-theme);
20+
@include tokens($custom-theme);
21+
}
2222
}
2323
}
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
@use "layout.scss";
22
@use "igniteui-angular/theming" as *;
33

4+
$background: #292826;
5+
$foreground: #ffcd0f;
6+
47
$custom-column-actions-theme: column-actions-theme(
5-
$background-color: #292826,
6-
$title-color: #ffcd0f
8+
$background-color: $background,
9+
$title-color: $foreground,
10+
);
11+
12+
$custom-flat-button: flat-button-theme(
13+
$foreground: $foreground,
714
);
815

9-
$custom-button: flat-button-theme(
10-
$foreground: #ffcd0f,
11-
$disabled-foreground: #292826
16+
$custom-checkbox-theme: checkbox-theme(
17+
$label-color: $foreground,
18+
$empty-color: $foreground,
19+
$fill-color: $foreground,
20+
$tick-color: $background,
1221
);
1322

14-
$dark-checkbox-theme: checkbox-theme(
15-
$label-color: #ffcd0f,
16-
$empty-color: #ffcd0f,
17-
$fill-color: #ffcd0f,
18-
$tick-color: #292826
23+
$input-group-theme: input-group-theme(
24+
$box-background: $background,
25+
$idle-bottom-line-color: $foreground,
1926
);
2027

2128
:host ::ng-deep {
22-
@include tokens($custom-column-actions-theme);
29+
.igx-column-actions {
30+
@include tokens($custom-column-actions-theme);
31+
32+
igx-input-group {
33+
@include tokens($input-group-theme);
34+
}
35+
36+
igx-checkbox {
37+
@include tokens($custom-checkbox-theme);
38+
}
2339

24-
.igx-column-actions {
25-
@include tokens($custom-button);
26-
@include tokens($dark-checkbox-theme);
27-
}
40+
.igx-button--flat {
41+
@include tokens($custom-flat-button);
42+
}
43+
}
2844
}
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,16 @@
11
@use "layout.scss";
22
@use "igniteui-angular/theming" as *;
33

4-
$yellow: #ffcd0f;
5-
$black: #292826;
4+
$background: #292826;
5+
$foreground: #eeece1;
6+
$accent: #ffcd0f;
67

78
$custom-grid: grid-theme(
8-
$filtering-row-background: $yellow
9-
);
10-
11-
$custom-flat-button: flat-button-theme(
12-
$background: $yellow,
13-
$foreground: $black,
14-
$hover-background: $black,
15-
$hover-foreground: $yellow
16-
);
17-
18-
$custom-contained-button: contained-button-theme(
19-
$background: $black,
20-
$foreground: $yellow,
21-
$hover-background: $black,
22-
$hover-foreground: $yellow
23-
);
24-
25-
$custom-button-group: button-group-theme(
26-
$item-background: $yellow,
27-
$item-text-color: $black,
28-
$item-hover-background: $black,
29-
$item-hover-text-color: $yellow
30-
);
31-
32-
$custom-input-group: input-group-theme(
33-
$box-background: $yellow,
34-
$idle-text-color: $black,
35-
$focused-text-color: $black,
36-
$filled-text-color: $black
37-
);
38-
39-
$custom-list: list-theme(
40-
$background: $yellow
41-
);
42-
43-
$custom-checkbox: checkbox-theme(
44-
$empty-color: $black,
45-
$fill-color: $black,
46-
$tick-color: $yellow,
47-
$label-color: $black
48-
);
49-
50-
$custom-drop-down: drop-down-theme(
51-
$background-color: $yellow,
52-
$selected-item-background: lighten($black, 10%),
53-
$selected-focus-item-background: lighten($black, 15%),
54-
$item-text-color: $black,
55-
$hover-item-background: $black,
56-
$hover-item-text-color: $yellow
9+
$background: $background,
10+
$foreground: $foreground,
11+
$accent-color: $accent,
5712
);
5813

5914
:host ::ng-deep {
6015
@include tokens($custom-grid);
61-
@include tokens($custom-drop-down);
62-
@include tokens($custom-input-group);
63-
@include tokens($custom-checkbox);
64-
@include tokens($custom-list);
65-
@include tokens($custom-flat-button);
66-
@include tokens($custom-button-group);
67-
68-
.igx-excel-filter__apply {
69-
@include tokens($custom-contained-button);
70-
}
7116
}

0 commit comments

Comments
 (0)