From 4d799182da2486cee98617941700ab6f8dbba71a Mon Sep 17 00:00:00 2001 From: Adhityaa Chandrasekar Date: Sun, 23 Sep 2018 00:52:34 -0400 Subject: [PATCH] frontend: add min-height only when necessary Fixes https://gitlab.com/commento/commento-ce/issues/81 --- frontend/js/commento.js | 2 ++ frontend/sass/commento.scss | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/js/commento.js b/frontend/js/commento.js index e6f464c..06feb0a 100644 --- a/frontend/js/commento.js +++ b/frontend/js/commento.js @@ -1050,6 +1050,7 @@ classAdd(oauthButtonsContainer, "oauth-buttons-container"); classAdd(oauthButtons, "oauth-buttons"); classAdd(close, "login-box-close"); + classAdd(root, "root-min-height"); emailButton.innerText = "Continue"; loginLink.innerText = "Already have an account? Log in."; @@ -1378,6 +1379,7 @@ var loginBoxContainer = $(ID_LOGIN_BOX_CONTAINER); classRemove(mainArea, "blurred"); + classRemove(root, "root-min-height"); attrSet(loginBoxContainer, "style", "display: none"); } diff --git a/frontend/sass/commento.scss b/frontend/sass/commento.scss index 3ed13c2..57b64d7 100644 --- a/frontend/sass/commento.scss +++ b/frontend/sass/commento.scss @@ -1,5 +1,9 @@ @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro'); +.commento-root-min-height { + min-height: 350px; +} + .commento-root { font-family: "Source Sans Pro", "Segoe UI", Roboto, "Helvetica Neue", sans-serif; font-size: 15px; @@ -8,7 +12,6 @@ overflow-x: hidden; text-rendering: optimizeLegibility; padding: 8px; - min-height: 350px; @import "colors-main.scss"; @import "common-main.scss";