Skip to content

Commit 7c948a4

Browse files
Copilotmvadari
andcommitted
Fix CSS tooltip implementation to properly hide tooltip content with !important and absolute positioning
Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
1 parent f69eb67 commit 7c948a4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

site/assets/style.css

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -838,28 +838,28 @@ footer {
838838
color: var(--text-color);
839839
}
840840

841+
/* Hide tooltip text by default */
841842
.tooltip .tooltip-text {
842-
visibility: hidden;
843+
position: absolute !important;
844+
visibility: hidden !important;
845+
opacity: 0 !important;
843846
width: 300px;
844847
background-color: var(--color-gray-7);
845848
color: var(--text-color);
846849
text-align: left;
847850
border-radius: 6px;
848851
padding: 12px;
849-
position: absolute;
850-
z-index: 10000;
852+
z-index: 99999;
851853
bottom: 125%;
852854
left: 50%;
853855
margin-left: -150px;
854-
opacity: 0;
855856
transition: opacity 0.3s;
856857
border: 1px solid var(--border-color);
857858
font-size: 14px;
858859
font-weight: 400;
859860
line-height: 1.4;
860861
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
861862
pointer-events: none;
862-
display: none;
863863
}
864864

865865
.tooltip .tooltip-text::after {
@@ -890,9 +890,8 @@ footer {
890890
color: var(--link-color);
891891
}
892892

893-
/* JavaScript will handle tooltip positioning */
893+
/* Show tooltip on hover */
894894
.tooltip:hover .tooltip-text {
895-
visibility: visible;
896-
opacity: 1;
897-
display: block;
895+
visibility: visible !important;
896+
opacity: 1 !important;
898897
}

0 commit comments

Comments
 (0)