Improve height restriction for popup config dialog (#721)

* Improve height restriction for popup config dialog

Noticed unnecessary overflow in Github Dark's config dialog. We should allow it to utilize available height.

* Shave off 2px to allow for borders without overflow
This commit is contained in:
narcolepticinsomniac 2019-06-01 05:12:52 -04:00 committed by GitHub
parent 19ee4d46bc
commit 19c71868a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -433,8 +433,8 @@ function configDialog(style) {
const MIN_HEIGHT = 250 + PADDING; const MIN_HEIGHT = 250 + PADDING;
colorpicker.remove(); colorpicker.remove();
width = constrain(MIN_WIDTH, 800, width + PADDING); width = constrain(MIN_WIDTH, 798, width + PADDING);
height = constrain(MIN_HEIGHT, 600, height + PADDING); height = constrain(MIN_HEIGHT, 598, height + PADDING);
document.body.style.setProperty('min-width', width + 'px', 'important'); document.body.style.setProperty('min-width', width + 'px', 'important');
document.body.style.setProperty('min-height', height + 'px', 'important'); document.body.style.setProperty('min-height', height + 'px', 'important');
} }

View File

@ -150,6 +150,7 @@
justify-content: center; justify-content: center;
} }
#message-box.stylus-popup > div { #message-box.stylus-popup > div {
max-height: 570px;
max-width: 90vw; max-width: 90vw;
top: auto; top: auto;
right: auto; right: auto;