From 58a33c010a3eb6414be85beff7f1fe4d0cd3cd47 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Tue, 31 May 2022 19:04:20 -0700 Subject: [PATCH] Fix the hover menu. --- src/scss/card.scss | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/scss/card.scss b/src/scss/card.scss index f3ccbbdd..ad3e8373 100644 --- a/src/scss/card.scss +++ b/src/scss/card.scss @@ -1,7 +1,7 @@ :host { display: block; - // Anchor absolutes to the outer part of the card. + // Anchor absolutes to the outermost part of the card. position: relative; } @@ -36,16 +36,16 @@ div.main { div.main.triggered { @keyframes warning-pulse { 0% { - border: solid 1px rgba(0,0,0,0); + border: solid 1px rgba(0, 0, 0, 0); } 50% { border: solid 1px var(--warning-color); } 100% { - border: solid 1px rgba(0,0,0,0); + border: solid 1px rgba(0, 0, 0, 0); } } - animation: warning-pulse 5s infinite; + animation: warning-pulse 5s infinite; } /* Hide scrollbar for Chrome, Safari and Opera */ @@ -57,9 +57,13 @@ div.main::-webkit-scrollbar { frigate-card-menu[data-style='hover'] { z-index: 1; transition: opacity 0.5s ease; + + // In hover mode, the full menu is responsive to the pointer (prevents the + // hover menu from disappearing when the cursor is between buttons). + pointer-events: all; } -.outer + frigate-card-menu[data-style='hover'] { +.main + frigate-card-menu[data-style='hover'] { opacity: 0; } frigate-card-menu[data-style='hover']:hover {