1
0

Widget sizing fixes

This commit is contained in:
Zef Hemel 2023-10-04 13:47:02 +02:00
parent 2a1438f95a
commit 852b07c7a7
3 changed files with 43 additions and 3 deletions

View File

@ -1,8 +1,28 @@
/* Reset SB styles */
html,
body {
height: initial !important;
overflow: initial !important;
}
#sb-main {
height: initial !important;
display: initial !important;
}
#sb-editor {
flex: initial !important;
height: initial !important;
}
.cm-editor {
height: initial !important;
}
body { body {
font-family: var(--ui-font); font-family: var(--ui-font);
background-color: var(--root-background-color); background-color: var(--root-background-color);
color: var(--root-color); color: var(--root-color);
overflow: scroll;
} }
.sb-line-h2 { .sb-line-h2 {

View File

@ -1,8 +1,28 @@
/* Reset SB styles */
html,
body {
height: initial !important;
overflow: initial !important;
}
#sb-main {
height: initial !important;
display: initial !important;
}
#sb-editor {
flex: initial !important;
height: initial !important;
}
.cm-editor {
height: initial !important;
}
body { body {
font-family: var(--editor-font); font-family: var(--editor-font);
background-color: var(--root-background-color); background-color: var(--root-background-color);
color: var(--root-color); color: var(--root-color);
overflow: scroll;
} }
ul li p { ul li p {

View File

@ -69,7 +69,7 @@ let oldHeight = undefined;
let heightChecks = 0; let heightChecks = 0;
function updateHeight() { function updateHeight() {
const body = document.body, html = document.documentElement; const body = document.body, html = document.documentElement;
let height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight); let height = Math.max(body.offsetHeight, html.offsetHeight);
heightChecks++; heightChecks++;
if(height !== oldHeight) { if(height !== oldHeight) {
oldHeight = height; oldHeight = height;