mirror of
https://github.com/chetscmd/Hover-Tooltips-Obsidian.git
synced 2026-07-22 06:43:03 +00:00
102 lines
2.2 KiB
CSS
102 lines
2.2 KiB
CSS
.tooltip-word {
|
|
cursor: help;
|
|
display: inline;
|
|
text-decoration-line: underline;
|
|
text-decoration-style: dotted;
|
|
text-decoration-color: var(--text-muted);
|
|
text-decoration-thickness: 2px;
|
|
text-underline-offset: 3px;
|
|
text-decoration-skip-ink: none;
|
|
transition: color 0.25s ease, text-decoration-color 0.25s ease;
|
|
}
|
|
|
|
.tooltip-word:hover {
|
|
color: var(--text-accent);
|
|
text-decoration-color: var(--text-accent);
|
|
}
|
|
|
|
.tooltip-text {
|
|
position: fixed;
|
|
z-index: 2147483647;
|
|
visibility: hidden;
|
|
opacity: 0;
|
|
width: max-content;
|
|
max-width: 400px;
|
|
min-width: 150px;
|
|
background-color: var(--background-primary);
|
|
color: var(--text-normal);
|
|
text-align: left;
|
|
border-radius: 10px;
|
|
padding: 12px 14px;
|
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--background-modifier-border);
|
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
font-size: 1em;
|
|
line-height: 1.4;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
transform-origin: bottom center;
|
|
user-select: text;
|
|
-webkit-user-select: text;
|
|
-moz-user-select: text;
|
|
-ms-user-select: text;
|
|
}
|
|
|
|
.tooltip-text.visible {
|
|
visibility: visible;
|
|
opacity: 1;
|
|
transform: translateY(-5px);
|
|
}
|
|
|
|
.tooltip-text a.internal-link {
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
color: var(--text-accent);
|
|
font-weight: 500;
|
|
user-select: auto;
|
|
}
|
|
|
|
.tooltip-text a.external-link {
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
color: var(--text-accent-hover);
|
|
font-weight: 500;
|
|
user-select: auto;
|
|
}
|
|
|
|
.tooltip-text a.internal-link:hover,
|
|
.tooltip-text a.external-link:hover {
|
|
text-decoration: underline;
|
|
text-decoration-thickness: 2px;
|
|
}
|
|
|
|
.tooltip-text code {
|
|
background-color: var(--background-secondary);
|
|
padding: 2px 4px;
|
|
border-radius: 4px;
|
|
font-family: var(--font-monospace);
|
|
font-size: 0.9em;
|
|
user-select: text;
|
|
}
|
|
|
|
.tooltip-text strong {
|
|
font-weight: 700;
|
|
}
|
|
|
|
.tooltip-text em {
|
|
font-style: italic;
|
|
}
|
|
|
|
.tooltip-text mark {
|
|
background-color: var(--text-highlight-bg);
|
|
color: var(--text-normal);
|
|
padding: 1px 2px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.tooltip-text {
|
|
max-width: 280px;
|
|
font-size: 0.95em;
|
|
padding: 10px 12px;
|
|
}
|
|
}
|