fix compact usercss height + vcenter fixed header

This commit is contained in:
tophf 2021-10-23 23:56:38 +03:00
parent 707d8bb1a7
commit 8b67eb885d

View File

@ -988,9 +988,18 @@ body.linter-disabled .hidden-unless-compact {
margin-top: .75rem; margin-top: .75rem;
} }
.single-editor {
position: relative;
height: 100%;
}
.single-editor .CodeMirror { .single-editor .CodeMirror {
width: 100%; /* WARNING! If you change this or .single-editor make sure editor opens huge styles like GitHub Dark instantly */
height: 100vh; /* WARNING! Don't use 100% as it's dead slow */ position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: auto;
border: none; border: none;
outline: none; outline: none;
} }
@ -1038,10 +1047,11 @@ body.linter-disabled .hidden-unless-compact {
padding: .5rem 1rem .5rem .5rem; padding: .5rem 1rem .5rem .5rem;
} }
.fixed-header { .fixed-header {
--fixed-height: 40px;
padding-top: var(--fixed-padding); padding-top: var(--fixed-padding);
} }
.fixed-header #header { .fixed-header #header {
min-height: 40px; min-height: var(--fixed-height);
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -1053,6 +1063,9 @@ body.linter-disabled .hidden-unless-compact {
.fixed-header #options { .fixed-header #options {
display: none !important; display: none !important;
} }
.fixed-header #details-wrapper {
padding-top: calc((var(--fixed-height) - 1.2rem) / 2); /* 1.2 is the normal line height */
}
#header summary + *, #header summary + *,
#lint > .lint-scroll-container { #lint > .lint-scroll-container {
margin-left: 1rem; margin-left: 1rem;