Skip to content

Commit 40b4fa8

Browse files
authored
Merge pull request #2682 from Omar-Nabil/fix-mat-label-color
WEB-326 fix: mat-label text color in dashboard widgets for better visibility …
2 parents bdb50cf + f600d01 commit 40b4fa8

File tree

3 files changed

+58
-4
lines changed

3 files changed

+58
-4
lines changed

src/app/home/dashboard/amount-collected-pie/amount-collected-pie.component.scss

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,30 @@
33
padding: 0;
44

55
.header {
6-
#office {
6+
:where(#office) {
77
margin-bottom: -1.2em;
8+
9+
// Make sure mat-label text is visible in light theme
10+
:where(mat-label) {
11+
color: rgb(0 0 0 / 87%); // Standard Material Design text color for light theme
12+
}
813
}
914
}
1015

1116
.fallback {
1217
height: 20rem;
1318
}
1419
}
20+
21+
// Dark theme specific styles
22+
:host-context(.dark-theme) {
23+
.card {
24+
.header {
25+
:where(#office) {
26+
:where(mat-label) {
27+
color: white; // White text color for dark theme
28+
}
29+
}
30+
}
31+
}
32+
}

src/app/home/dashboard/amount-disbursed-pie/amount-disbursed-pie.component.scss

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,30 @@
33
padding: 0;
44

55
.header {
6-
#office {
6+
:where(#office) {
77
margin-bottom: -1.2em;
8+
9+
// Make sure mat-label text is visible in light theme
10+
:where(mat-label) {
11+
color: rgb(0 0 0 / 87%); // Standard Material Design text color for light theme
12+
}
813
}
914
}
1015

1116
.fallback {
1217
height: 20rem;
1318
}
1419
}
20+
21+
// Dark theme specific styles
22+
:host-context(.dark-theme) {
23+
.card {
24+
.header {
25+
:where(#office) {
26+
:where(mat-label) {
27+
color: white; // White text color for dark theme
28+
}
29+
}
30+
}
31+
}
32+
}

src/app/home/dashboard/client-trends-bar/client-trends-bar.component.scss

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@
33
padding: 0;
44

55
.header {
6-
#office {
6+
:where(#office) {
77
margin-bottom: -1.2em;
8+
9+
// Make sure mat-label text is visible in light theme
10+
:where(mat-label) {
11+
color: rgb(0 0 0 / 87%); // Standard Material Design text color for light theme
12+
}
813
}
914
}
1015

11-
#timescale {
16+
:where(#timescale) {
1217
margin: 2% 50%;
1318
transform: translateX(-50%);
1419
}
@@ -19,3 +24,16 @@
1924
min-height: 16.5rem;
2025
}
2126
}
27+
28+
// Dark theme specific styles
29+
:host-context(.dark-theme) {
30+
.card {
31+
.header {
32+
:where(#office) {
33+
:where(mat-label) {
34+
color: white; // White text color for dark theme
35+
}
36+
}
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)