mirror of
https://github.com/esphome/esp-web-tools.git
synced 2025-07-28 14:16:41 +00:00
Make input select/textfield work better when bad REM defined (#219)
This commit is contained in:
parent
d87f076071
commit
627b106e18
@ -1,5 +1,6 @@
|
||||
import { SelectBase } from "@material/mwc-select/mwc-select-base";
|
||||
import { styles } from "@material/mwc-select/mwc-select.css";
|
||||
import { css } from "lit";
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
@ -8,7 +9,15 @@ declare global {
|
||||
}
|
||||
|
||||
export class EwtSelect extends SelectBase {
|
||||
static override styles = [styles];
|
||||
static override styles = [
|
||||
styles,
|
||||
// rem -> em conversion
|
||||
css`
|
||||
.mdc-floating-label {
|
||||
line-height: 1.15em;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
customElements.define("ewt-select", EwtSelect);
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { TextFieldBase } from "@material/mwc-textfield/mwc-textfield-base";
|
||||
import { styles } from "@material/mwc-textfield/mwc-textfield.css";
|
||||
import { css } from "lit";
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
@ -8,7 +9,15 @@ declare global {
|
||||
}
|
||||
|
||||
export class EwtTextfield extends TextFieldBase {
|
||||
static override styles = [styles];
|
||||
static override styles = [
|
||||
styles,
|
||||
// rem -> em conversion
|
||||
css`
|
||||
.mdc-floating-label {
|
||||
line-height: 1.15em;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
customElements.define("ewt-textfield", EwtTextfield);
|
||||
|
@ -20,6 +20,8 @@ export const dialogStyles = css`
|
||||
--mdc-typography-body1-line-height: 1.5em;
|
||||
--mdc-typography-button-font-size: 0.875em;
|
||||
--mdc-typography-button-line-height: 2.25em;
|
||||
--mdc-typography-subtitle1-font-size: 1em;
|
||||
--mdc-typography-subtitle1-line-height: 1.75em;
|
||||
}
|
||||
|
||||
a {
|
||||
|
Loading…
x
Reference in New Issue
Block a user