Skip to content

Commit 9fb2720

Browse files
committed
Add safe areas to script editor
1 parent 7c3bc94 commit 9fb2720

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

src/panels/config/script/ha-script-editor.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,9 +1072,18 @@ export class HaScriptEditor extends SubscribeMixin(
10721072
blueprint-script-editor {
10731073
margin: 0 auto;
10741074
max-width: 1040px;
1075-
padding: 28px 20px 0;
1075+
padding-top: 28px;
1076+
padding-bottom: var(--safe-area-inset-bottom, 0px);
1077+
padding-right: calc(20px + var(--safe-area-inset-right, 0px));
1078+
padding-left: 20px;
10761079
display: block;
10771080
}
1081+
@media (max-width: 600px) {
1082+
manual-script-editor,
1083+
blueprint-script-editor {
1084+
padding-left: calc(20px + var(--safe-area-inset-left, 0px));
1085+
}
1086+
}
10781087
10791088
:not(.yaml-mode) > .error-wrapper {
10801089
position: absolute;
@@ -1115,7 +1124,15 @@ export class HaScriptEditor extends SubscribeMixin(
11151124
11161125
manual-script-editor {
11171126
max-width: 1540px;
1118-
padding: 0 12px;
1127+
padding-top: 0;
1128+
padding-bottom: var(--safe-area-inset-bottom, 0px);
1129+
padding-left: 12px;
1130+
padding-right: calc(12px + var(--safe-area-inset-right, 0px));
1131+
}
1132+
@media (max-width: 600px) {
1133+
manual-script-editor {
1134+
padding-left: calc(12px + var(--safe-area-inset-left, 0px));
1135+
}
11191136
}
11201137
11211138
ha-yaml-editor {

0 commit comments

Comments
 (0)