Skip to content

Commit 6ef8016

Browse files
committed
try tooltip trick
1 parent d4f4da0 commit 6ef8016

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

docs/docusaurus.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const config: Config = {
144144
position: 'right',
145145
className: 'header-forums-link',
146146
'aria-label': 'SparkFun Community Forums',
147+
html: '<span class="tooltip">This is the tooltip!</span>'
147148
},
148149
],
149150
},

docs/src/css/custom.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,34 @@ html[data-theme='dark'] footer {
184184
--docsearch-key-gradient: linear-gradient(-26.5deg,
185185
var(--ifm-color-emphasis-200) 0%,
186186
var(--ifm-color-emphasis-100) 100%);
187+
}
188+
189+
.tooltip-link {
190+
position: relative;
191+
text-decoration: none;
192+
}
193+
194+
.tooltip {
195+
visibility: hidden;
196+
opacity: 0;
197+
background: #333;
198+
color: #fff;
199+
padding: 6px 10px;
200+
border-radius: 4px;
201+
font-size: 14px;
202+
white-space: nowrap;
203+
204+
/* Position above the link */
205+
position: absolute;
206+
bottom: 125%;
207+
left: 50%;
208+
transform: translateX(-50%);
209+
210+
transition: opacity 0.2s ease;
211+
}
212+
213+
/* Show on hover */
214+
.tooltip-link:hover .tooltip {
215+
visibility: visible;
216+
opacity: 1;
187217
}

0 commit comments

Comments
 (0)