MediaWiki:Common.css: Difference between revisions

From Vanilla Plus
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
.image-link {
.custom-tooltip {
     position: relative;
     position: relative;
     cursor: pointer;
     text-decoration: none;
    border-bottom: 1px dotted black; /* Adds a dotted underline to make it look like a link */
}
}


.tooltip-content {
.image-preview {
    display: none; /* Hide the tooltip by default */
     position: absolute;
     position: absolute;
     top: 1.5em;
     top: 100%;
     left: 0;
     left: 50%;
     background: white;
     transform: translateX(-50%);
     border: 1px solid black;
     width: 200px; /* Adjust as needed */
     padding: 5px;
     height: 200px; /* Adjust as needed */
     z-index: 100;
     background-size: cover;
     width: auto;
     background-position: center;
     max-width: 250px;
     background-repeat: no-repeat;
     box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    display: none;
    border: 1px solid #ccc;
     z-index: 10;
}
}


.custom-tooltip:hover .tooltip-content {
.image-link:hover + .image-preview {
     display: block; /* Show the tooltip on hover */
     display: block;
}
}

Latest revision as of 19:04, 13 February 2025

.image-link {
    position: relative;
    text-decoration: none;
}

.image-preview {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px; /* Adjust as needed */
    height: 200px; /* Adjust as needed */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: none;
    border: 1px solid #ccc;
    z-index: 10;
}

.image-link:hover + .image-preview {
    display: block;
}