Fix the hover menu.

This commit is contained in:
Dermot Duffy
2022-05-31 19:04:20 -07:00
parent 6728f10704
commit 58a33c010a
+8 -4
View File
@@ -1,7 +1,7 @@
:host { :host {
display: block; display: block;
// Anchor absolutes to the outer part of the card. // Anchor absolutes to the outermost part of the card.
position: relative; position: relative;
} }
@@ -36,13 +36,13 @@ div.main {
div.main.triggered { div.main.triggered {
@keyframes warning-pulse { @keyframes warning-pulse {
0% { 0% {
border: solid 1px rgba(0,0,0,0); border: solid 1px rgba(0, 0, 0, 0);
} }
50% { 50% {
border: solid 1px var(--warning-color); border: solid 1px var(--warning-color);
} }
100% { 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;
@@ -57,9 +57,13 @@ div.main::-webkit-scrollbar {
frigate-card-menu[data-style='hover'] { frigate-card-menu[data-style='hover'] {
z-index: 1; z-index: 1;
transition: opacity 0.5s ease; 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; opacity: 0;
} }
frigate-card-menu[data-style='hover']:hover { frigate-card-menu[data-style='hover']:hover {