Fix mdc checkbox styling (#5897)

This commit is contained in:
Bram Kragten
2020-05-15 17:56:47 +02:00
committed by GitHub
parent 18a3f212f3
commit 5f46679d94
2 changed files with 3 additions and 14 deletions

View File

@@ -1,7 +1,6 @@
import "@material/mwc-checkbox";
import type { Checkbox } from "@material/mwc-checkbox";
import { style } from "@material/mwc-checkbox/mwc-checkbox-css";
import { css, CSSResult, customElement } from "lit-element";
import { customElement } from "lit-element";
import type { Constructor } from "../types";
const MwcCheckbox = customElements.get("mwc-checkbox") as Constructor<Checkbox>;
@@ -12,18 +11,6 @@ export class HaCheckbox extends MwcCheckbox {
super.firstUpdated();
this.style.setProperty("--mdc-theme-secondary", "var(--primary-color)");
}
protected static get styles(): CSSResult[] {
return [
style,
css`
.mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate)
~ .mdc-checkbox__background {
border-color: rgba(var(--rgb-primary-text-color), 0.54);
}
`,
];
}
}
declare global {