Slightly touched up modals

This commit is contained in:
Gregor Kleen 2018-11-20 18:28:07 +01:00
parent 5116b6b380
commit deeba675fa
2 changed files with 8 additions and 4 deletions

View File

@ -90,8 +90,9 @@
var body = doc.body, html = doc.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
frame.style.height = "calc(" + (height + "px") + " + 1em)";
frame.style.height = height.toPrecision() + "px";
frame.style.visibility = 'visible';
frame.setAttribute("scrolling", "no");
doc.querySelectorAll("form").forEach(function(form) {
form.setAttribute("target", "_top");

View File

@ -4,14 +4,14 @@ div.modal {
top: 50%;
transform: translate(-50%, -50%) scale(0.8, 0.8);
display: block;
background-color: rgba(255, 255, 255, 0.99);
background-color: rgba(255, 255, 255, 1);
min-width: 60vw;
min-height: 100px;
max-height: calc(100vh - 30px);
border-radius: 2px;
z-index: -1;
color: var(--color-font);
padding: 20px;
/* padding: 20px; */
padding-right: 65px;
overflow: auto;
transition: all .15s ease;
@ -29,8 +29,11 @@ div.modal {
height: calc(60vh);
width: 100%;
border-style: none;
scroll: auto;
overflow: auto;
[scrolling='no'] {
overflow: hidden;
}
}
}