From a1d73abdca68d40a19cc018f26a7881bff548346 Mon Sep 17 00:00:00 2001 From: Vasily Zubarev Date: Mon, 24 Feb 2020 12:08:02 +0100 Subject: [PATCH] Increase card margin --- static/js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index accec05..c68408a 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -55,10 +55,11 @@ function addWeirdLogicThatSomeGeeksWillUseOnceAndForget() { function useSmartTooltipPositioning() { // This handler is trying to keep the tooltip card on the screen // so that it doesn't go beyond its borders if it's enough space nearby - const preservedMargin = 10; - const defaultTop = -100; + const preservedMargin = 20; // px + const defaultTop = -100; // px const screenWidth = (window.innerWidth || screen.width); const screenHeight = (window.innerHeight || screen.height || document.documentElement.clientHeight); + if (screenWidth <= 750) return; // disable on small screens let articles = document.querySelectorAll(".article");