Feature/refactor dark theme css selector (#3662)

* Refactor dark theme CSS selector

* Update changelog
This commit is contained in:
Thomas Kaul
2024-08-11 15:43:02 +02:00
committed by sudacode
parent e42d2b1702
commit 716f979502
42 changed files with 44 additions and 43 deletions

View File

@@ -46,7 +46,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
footer {
background-color: rgba(var(--palette-foreground-text-dark), 0.05);
}

View File

@@ -296,9 +296,9 @@ export class AppComponent implements OnDestroy, OnInit {
);
if (isDarkTheme) {
this.document.body.classList.add('is-dark-theme');
this.document.body.classList.add('theme-dark');
} else {
this.document.body.classList.remove('is-dark-theme');
this.document.body.classList.remove('theme-dark');
}
this.document

View File

@@ -50,7 +50,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.mat-toolbar {
background-color: var(--dark-background);

View File

@@ -20,7 +20,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.icon-container {
background-color: rgba(var(--light-primary-text), 0.05);
}

View File

@@ -25,7 +25,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.mat-mdc-radio-button {
&.mat-mdc-radio-checked {
background-color: rgba(var(--light-dividers));

View File

@@ -3,6 +3,6 @@
display: block;
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -4,6 +4,6 @@
height: 100%;
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -17,6 +17,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -21,7 +21,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
::ng-deep {
.svgMap-map-wrapper {
.svgMap-country {

View File

@@ -2,6 +2,6 @@
color: rgb(var(--dark-primary-text));
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -35,6 +35,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -3,6 +3,6 @@
display: block;
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -24,7 +24,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
.about-container {

View File

@@ -16,6 +16,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -2,6 +2,6 @@
color: rgb(var(--dark-primary-text));
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -9,6 +9,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -2,6 +2,6 @@
color: rgb(var(--dark-primary-text));
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -12,6 +12,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -2,6 +2,6 @@
color: rgb(var(--dark-primary-text));
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -120,7 +120,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.button-container {
.mat-mdc-outlined-button {
background-color: var(--dark-background);

View File

@@ -14,6 +14,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -18,7 +18,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.mat-mdc-dialog-content {
.mat-datepicker-input {
&.mat-mdc-input-element:disabled {

View File

@@ -53,7 +53,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.drop-area {
border-color: rgba(
var(--palette-foreground-divider-dark),

View File

@@ -43,7 +43,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.mat-mdc-progress-bar {
::ng-deep {
.mdc-linear-progress__buffer-bar {

View File

@@ -2,6 +2,6 @@
color: rgb(var(--dark-primary-text));
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -26,6 +26,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -17,6 +17,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -24,7 +24,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
.button-container {
.mat-mdc-outlined-button {
background-color: var(--dark-background);

View File

@@ -20,6 +20,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -16,7 +16,7 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
.call-to-action {

View File

@@ -12,6 +12,6 @@
}
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -2,6 +2,6 @@
color: rgb(var(--dark-primary-text));
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -2,6 +2,6 @@
color: rgb(var(--dark-primary-text));
}
:host-context(.is-dark-theme) {
:host-context(.theme-dark) {
color: rgb(var(--light-primary-text));
}

View File

@@ -214,7 +214,7 @@ body {
}
}
&.is-dark-theme {
&.theme-dark {
background: var(--dark-background);
color: rgba(var(--light-primary-text));

View File

@@ -3,7 +3,7 @@
$dark-primary-text: rgba(black, 0.87);
$light-primary-text: white;
$mat-css-dark-theme-selector: '.is-dark-theme';
$mat-css-dark-theme-selector: '.theme-dark';
$gf-primary: (
50: var(--gf-theme-primary-50),
@@ -99,7 +99,7 @@ $gf-theme-dark: mat.m2-define-dark-theme(
)
);
.is-dark-theme {
.theme-dark {
@include mat.all-component-colors($gf-theme-dark);
}