Template:Sandbox/Aurelain/Hint/styles.css: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
/* Positioning */ | /* Positioning */ | ||
position: absolute; | position: absolute; | ||
z-index: 100; | z-index: 100; | ||
| Line 57: | Line 54: | ||
visibility: visible; | visibility: visible; | ||
opacity: 1; | opacity: 1; | ||
} | |||
/* Placement: top */ | |||
.wiki-hint-top .wiki-hint-floating { | |||
bottom: 130%; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
} | |||
/* Placement: bottom */ | |||
.wiki-hint-top .wiki-hint-floating { | |||
top: 130%; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
} | } | ||
Revision as of 09:49, 23 June 2026
/* Container for the hint */
.wiki-hint {
position: relative;
display: inline;
border-bottom: 1px dotted #555; /* Visual cue that it's hoverable */
cursor: help;
}
.wiki-hint-no-border {
border-bottom: none;
}
/* The hidden floating text */
.wiki-hint .wiki-hint-floating {
visibility: hidden;
opacity: 0;
/* Positioning */
position: absolute;
z-index: 100;
/* Styling */
background-color: #191b2c;
border: solid 1px #d6bc7c;
color: #fff;
text-align: center;
padding: 6px 10px;
border-radius: 4px;
white-space: nowrap; /* Prevents awkward wrapping */
font-size: 0.9em;
line-height: 1.2;
/* Smooth fade-in transition */
transition: opacity 0.2s ease, visibility 0.2s ease;
/* Box shadow for a clean look */
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
/* Little arrow pointing down at the content */
.wiki-hint .wiki-hint-floating::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #d6bc7c transparent transparent transparent;
}
/* Reveal on hover */
.wiki-hint:hover .wiki-hint-floating {
visibility: visible;
opacity: 1;
}
/* Placement: top */
.wiki-hint-top .wiki-hint-floating {
bottom: 130%;
left: 50%;
transform: translateX(-50%);
}
/* Placement: bottom */
.wiki-hint-top .wiki-hint-floating {
top: 130%;
left: 50%;
transform: translateX(-50%);
}


