theme: polish modal dialog

This commit is contained in:
Peter Cai 2020-04-11 20:57:46 +08:00
parent 38ba17019a
commit f45bd92258
No known key found for this signature in database
GPG key ID: 71F5FB4E4F3FD54F
2 changed files with 5 additions and 1 deletions

View file

@ -29,6 +29,8 @@ window.onload = function() {
span.onclick = () => {
modal.style.display = "none";
};
modal.onclick = span.onclick;
modalImg.onclick = (ev) => ev.stopPropagation();
// Table-of-Contents generation
// Don't do this on mobile; it's horrible
if (window.matchMedia("(max-width: 1000px)").matches) return;

View file

@ -418,7 +418,9 @@ h5 {
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
overflow: scroll; /* Enable scroll if needed */
scrollbar-width: thin;
scrollbar-color: #888888 #00000000;
background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}