Feature/refactor dark theme css selector (#3662)
* Refactor dark theme CSS selector * Update changelog
This commit is contained in:
parent
e42d2b1702
commit
716f979502
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Changed
|
||||
|
||||
- Refactored the dark theme CSS selector
|
||||
- Improved the language localization for German (`de`)
|
||||
|
||||
### Fixed
|
||||
|
@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
footer {
|
||||
background-color: rgba(var(--palette-foreground-text-dark), 0.05);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -50,7 +50,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.mat-toolbar {
|
||||
background-color: var(--dark-background);
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.icon-container {
|
||||
background-color: rgba(var(--light-primary-text), 0.05);
|
||||
}
|
||||
|
@ -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));
|
||||
|
@ -3,6 +3,6 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -4,6 +4,6 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -17,6 +17,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
::ng-deep {
|
||||
.svgMap-map-wrapper {
|
||||
.svgMap-country {
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -35,6 +35,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
|
||||
.about-container {
|
||||
|
@ -16,6 +16,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -9,6 +9,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -12,6 +12,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -120,7 +120,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.button-container {
|
||||
.mat-mdc-outlined-button {
|
||||
background-color: var(--dark-background);
|
||||
|
@ -14,6 +14,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -53,7 +53,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.drop-area {
|
||||
border-color: rgba(
|
||||
var(--palette-foreground-divider-dark),
|
||||
|
@ -43,7 +43,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.mat-mdc-progress-bar {
|
||||
::ng-deep {
|
||||
.mdc-linear-progress__buffer-bar {
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -26,6 +26,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -17,6 +17,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.button-container {
|
||||
.mat-mdc-outlined-button {
|
||||
background-color: var(--dark-background);
|
||||
|
@ -20,6 +20,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
|
||||
.call-to-action {
|
||||
|
@ -12,6 +12,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
color: rgb(var(--light-primary-text));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
&.is-dark-theme {
|
||||
&.theme-dark {
|
||||
background: var(--dark-background);
|
||||
color: rgba(var(--light-primary-text));
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.mat-mdc-form-field {
|
||||
color: rgba(var(--light-primary-text));
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.activity-type-badge {
|
||||
background-color: rgba(var(--palette-foreground-text-dark), 0.1) !important;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
&.has-focus {
|
||||
a {
|
||||
color: rgba(var(--dark-primary-text));
|
||||
|
@ -26,7 +26,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
.date-range-selector-container {
|
||||
border-color: rgba(var(--light-dividers));
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
::ng-deep {
|
||||
.mdc-text-field--disabled {
|
||||
.mdc-notched-outline__leading,
|
||||
|
@ -11,6 +11,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.is-dark-theme) {
|
||||
:host-context(.theme-dark) {
|
||||
border-color: rgba(var(--light-dividers));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user