From 27ca4f7cb15a723253dfab01c90632e23b5baea5 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 7 May 2018 01:32:06 -0500 Subject: [PATCH] post tooltips: reduce width/height, increase delay. --- app/assets/javascripts/post_tooltips.js.erb | 4 ++-- .../stylesheets/specific/post_tooltips.scss | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/post_tooltips.js.erb b/app/assets/javascripts/post_tooltips.js.erb index e3ed23d92..8bcd5dcef 100644 --- a/app/assets/javascripts/post_tooltips.js.erb +++ b/app/assets/javascripts/post_tooltips.js.erb @@ -52,13 +52,13 @@ Danbooru.PostTooltip.QTIP_OPTIONS = { }, show: { solo: true, - delay: 600, + delay: 750, effect: false, ready: true, event: "mouseenter", }, hide: { - delay: 150, + delay: 250, fixed: true, effect: false, event: "unfocus click mouseleave", diff --git a/app/assets/stylesheets/specific/post_tooltips.scss b/app/assets/stylesheets/specific/post_tooltips.scss index c20508bc1..96b5e9775 100644 --- a/app/assets/stylesheets/specific/post_tooltips.scss +++ b/app/assets/stylesheets/specific/post_tooltips.scss @@ -1,6 +1,6 @@ -$tooltip-max-width: 164px * 4 - 10; // 4 thumbnails wide. -$tooltip-min-width: 164px * 2 - 10; // 2 thumbnails wide. -$tooltip-height: 112px; +$tooltip-line-height: 16px; +$tooltip-body-height: $tooltip-line-height * 6; // 6 lines high. +$tooltip-width: 164px * 3 - 10; // 3 thumbnails wide. @mixin thin-scrollbar { &::-webkit-scrollbar { @@ -48,10 +48,11 @@ $tooltip-height: 112px; .post-tooltip { - max-width: $tooltip-max-width; - min-width: $tooltip-min-width; + max-width: $tooltip-width; + min-width: $tooltip-width; box-sizing: border-box; - line-height: 16px; + font-size: 11px; + line-height: $tooltip-line-height; border-color: #767676; .qtip-content { @@ -59,7 +60,7 @@ $tooltip-height: 112px; .post-tooltip-body { @include thin-scrollbar; - max-height: $tooltip-height; + max-height: $tooltip-body-height; overflow-y: auto; li {