From 4aa099892426b82cffb69b13916d7ff276b8d8da Mon Sep 17 00:00:00 2001 From: Send_Nukez Date: Thu, 11 Nov 2021 22:53:16 +0100 Subject: [PATCH] fix slider tooltip being too low --- src/styles/Inputs.scss | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/styles/Inputs.scss b/src/styles/Inputs.scss index 909e061..6eb2211 100644 --- a/src/styles/Inputs.scss +++ b/src/styles/Inputs.scss @@ -42,26 +42,28 @@ textarea { } } - &::after { - z-index: 9999; - content: attr(tooltip); - position: absolute; - min-width: 50px; - top: -10px; - left: 50%; - transform: translateX(calc(-50%)); - padding: 0 5px; - border-radius: 4px; - text-align: center; - color: spiceColor("sidebar-text"); - background-color: spiceColor("button"); - transition: opacity 0.25s ease; - opacity: 0; - } + &[tooltip] { + &::after { + z-index: 9999; + content: attr(tooltip); + position: absolute; + min-width: 50px; + top: -22px; + left: 50%; + transform: translateX(calc(-50%)); + padding: 0 5px; + border-radius: 4px; + text-align: center; + color: spiceColor("sidebar-text"); + background-color: spiceColor("button"); + transition: opacity 0.25s ease; + opacity: 0; + } - &:hover::after, - &:active::after { - opacity: 1; + &:hover::after, + &:active::after { + opacity: 1; + } } &:focus {