Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes display issues with the new darkmode #6532

Merged
merged 9 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/ha-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class HaMarkdown extends LitElement {
background-color: var(--markdown-code-background-color, none);
border-radius: 3px;
}
ha-markdown-element svg {
background-color: var(--markdown-svg-background-color, none);
color: var(--markdown-svg-color, none);
}
ha-markdown-element code {
font-size: 85%;
padding: 0.2em 0.4em;
Expand Down
8 changes: 8 additions & 0 deletions src/html/index.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@
html {
background-color: var(--primary-background-color);
}
@media (prefers-color-scheme: dark) {
#ha-init-skeleton::before {
background-color: #1c1c1c;
}
html {
background-color: #111111;
}
}
</style>
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions src/layouts/ha-init-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class HaInitPage extends LitElement {
}
p {
max-width: 350px;
color: var(--text-primary-color);
}
`;
}
Expand Down
3 changes: 3 additions & 0 deletions src/panels/config/integrations/ha-integration-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ export class HaIntegrationCard extends LitElement {
cursor: pointer;
min-height: 35px;
}
mwc-list-item ha-svg-icon {
color: var(--secondary-text-color);
}
.back-btn {
position: absolute;
background: rgba(var(--rgb-card-background-color), 0.6);
Expand Down
6 changes: 3 additions & 3 deletions src/panels/profile/ha-mfa-module-setup-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class HaMfaModuleSetupFlow extends LocalizeMixin(EventsMixin(PolymerElement)) {
h2 {
white-space: normal;
}
ha-markdown img:first-child:last-child,
ha-markdown svg:first-child:last-child {
background-color: white;
ha-markdown {
--markdown-svg-background-color: white;
--markdown-svg-color: black;
display: block;
margin: 0 auto;
}
Expand Down
1 change: 1 addition & 0 deletions src/resources/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const derivedStyles = {
"mdc-radio-unchecked-color": "rgba(var(--rgb-primary-text-color), 0.54)",
"mdc-radio-disabled-color": "var(--disabled-text-color)",
"mdc-tab-text-label-color-default": "var(--primary-text-color)",
"mdc-button-disabled-ink-color": "var(--disabled-text-color)",
};

export const haStyle = css`
Expand Down