Add max height to yaml editor (#8527)

This commit is contained in:
Bram Kragten 2021-03-03 14:31:39 +01:00
parent e14d652651
commit e81002807f
No known key found for this signature in database
GPG Key ID: FBE2DFDB363EF55B
2 changed files with 4 additions and 0 deletions

View File

@ -359,6 +359,9 @@ export abstract class HuiElementEditor<T> extends LitElement {
.yaml-editor {
padding: 8px 0px;
}
ha-code-editor {
--code-mirror-max-height: calc(100vh - 245px);
}
.error,
.warning,
.info {

View File

@ -33,6 +33,7 @@ export const theme = CMEditorView.theme({
"var(--code-editor-background-color, var(--card-background-color))",
"& ::selection": { backgroundColor: "rgba(var(--rgb-primary-color), 0.3)" },
height: "var(--code-mirror-height, auto)",
maxHeight: "var(--code-mirror-max-height, unset)",
},
$scroller: { outline: "none" },