From 3429f410aca781985f2ad63c697f44b2536d7f31 Mon Sep 17 00:00:00 2001 From: Christian Olsen <9137189+Chrede88@users.noreply.github.com> Date: Tue, 7 Nov 2023 21:59:14 +0100 Subject: [PATCH] :adhesive_bandage: changing tooltip behaviour --- assets/css/compiled/main.css | 8 ++------ assets/css/main.css | 10 +++++----- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 8c3d581..4ededcd 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -754,6 +754,7 @@ video { } .tooltip { + visibility: hidden; position: absolute; top: -2.5rem; } @@ -783,16 +784,11 @@ video { text-align: center; --tw-text-opacity: 1; color: rgb(248 250 252 / var(--tw-text-opacity)); - opacity: 0; --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); --tw-shadow-color: rgb(3 7 18 / 0.25); --tw-shadow: var(--tw-shadow-colored); - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 300ms; - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); } .tooltip::after { @@ -817,7 +813,7 @@ video { @media (hover: hover) and (pointer: fine) { .group:hover .tooltip { - opacity: 1; + visibility: visible; } } diff --git a/assets/css/main.css b/assets/css/main.css index d7f4432..c279418 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -35,11 +35,11 @@ } .tooltip { - @apply absolute -top-10 text-center rounded-md px-2 py-1 - whitespace-nowrap shadow-md shadow-gray-950/25 - dark:shadow-slate-100/25 bg-gray-950 text-slate-50 - dark:bg-slate-100 dark:text-slate-700 animate-bounce - group-hover:opacity-100 opacity-0 transition-opacity ease-out duration-300 + @apply invisible group-hover:visible absolute -top-10 + text-center rounded-md px-2 py-1 whitespace-nowrap + shadow-md shadow-gray-950/25 dark:shadow-slate-100/25 + bg-gray-950 text-slate-50 dark:bg-slate-100 + dark:text-slate-700 animate-bounce after:absolute after:w-0 after:h-0 after:border-4 after:top-7 after:left-1/2 after:-translate-x-1/2 after:rotate-45 after:shadow-md after:shadow-gray-950/25 after:border-gray-950