MediaWiki:Gadget-Tooltip.css
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/*** For [[Template:Tt]] ***/
/* Force disable default hover tooltip on mobile and enable the toggle */
.skin-fandommobile .hover-tooltip { display: none; }
.skin-fandommobile .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle { display: inline !important; }
/** Text styling **/
/* Override collapsible stylings */
.custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle {
padding: 0;
border: none;
position: relative;
/* Allow text selection */
-moz-user-select: inherit;
-webkit-user-select: inherit;
-ms-user-select: inherit;
user-select: inherit;
font-weight: inherit;
}
.custom-tt-wrapper.hnaw-collapsible .mw-collapsible-content {
font-weight: normal;
}
.text-tooltip { cursor: help; }
/*** The tooltip's toggle version ***/
.toggle-tooltip.hnaw-collapsible, .text-tooltip {
position: relative;
border-bottom-color: rgb(128, 128, 128);
border-bottom-width: 2px;
border-bottom-style: dotted;
}
/** Desktop: enabled through gadget **/
/* Container */
.skin-fandomdesktop .mw-collapsible-content.custom-tt {
position: absolute;
z-index: 10005;
width: fit-content;
height: fit-content;
background: var(--theme-page-background-color);
color: var(--theme-page-text-color);
border-radius: 5px 0 5px 5px;
border: 1px solid var(--theme-link-color);
min-width: 75px;
min-height: 25px;
padding: 6px;
margin-top: 35px;
text-align: center;
top: 0;
right: 10%;
text-wrap: wrap;
}
/* Arrow */
.skin-fandomdesktop .mw-collapsible-content.custom-tt:before {
content: "";
position: absolute;
bottom: 100%;
top: -20px;
width: 0;
border-top: 0 solid transparent;
border-bottom: 10px solid var(--theme-link-color);
border-left: 10px solid transparent;
border-right: 0 solid transparent;
right: -1px;
z-index: 10005;
}
/** Mobile: enabled by default (attr:title does not work) **/
/* Container */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.custom-tt {
position: fixed;
z-index: 10005;
width: 100%;
height: 125px;
background: var(--theme-page-background-color);
color: var(--theme-page-text-color);
border-radius: 0 0 5px 5px;
border: 1px solid var(--theme-link-color);
min-width: 150px;
min-height: 25px;
padding: 6px;
text-align: center;
bottom: 0;
left: 0;
margin: 0;
overflow-y: scroll;
}
/* Container header */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.custom-tt:before {
content: "ⓘ Tooltip content:";
display: block;
text-align: left;
margin: 2px 0;
width: 100%;
border-bottom: 1px solid var(--theme-link-color);
}
/* Tooltip surrogate toggle on container header */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded:after {
content: "x" !important;
position: fixed;
z-index: 10006;
bottom: 90px;
right: 15px;
font-size: 30px;
}
/* Tooltip surrogate toggle on backdrop overlay */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded:before {
background: black;
position: fixed;
height: calc(100% - 125px);
width: 100%;
top: 0;
left: 0;
opacity: 0.6;
z-index: 10004;
}
/* For [[Template:Extra Effect]] */
:root .theme-fandomdesktop-dark, :root .theme-fandommobile-dark {
--extra-effect-bg: #0c0c0cd6;
}
:root .theme-fandomdesktop-light, :root .theme-fandommobile-light {
--extra-effect-bg: #ecececd6;
}
@keyframes extra-effect-appear {
from {
transform: translate(0px, 15px);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
.hnaw-extra-effect-wrapper.hnaw-collapsible.mw-collapsible {
padding: 0;
border-bottom-style: solid;
border-bottom-width: 1px;
}
.mw-collapsible-content.hnaw-extra-effect {
font-size: 16px;
position: absolute;
z-index: 999999;
width: fit-content;
height: fit-content;
background: var(--extra-effect-bg, #0c0c0cd6);
backdrop-filter: blur(3px);
border: 1px solid var(--theme-border-color);
margin-top: 25px;
border-radius: 5px;
color: var(--theme-page-text-color);
min-width: 35px;
max-width: 75vw;
padding: 3px 6px;
animation: extra-effect-appear 0.25s;
}
.hnaw-extra-effect .hnaw-extra-effect-header {
display: block;
font-weight: bold;
border-bottom: 1px solid var(--theme-border-color);
margin-bottom: 2px;
}
.skin-fandommobile .hnaw-extra-effect-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.hnaw-extra-effect {
position: fixed;
z-index: 10005;
width: 100%;
height: 125px;
background: var(--extra-effect-bg, #0c0c0cd6);
color: var(--theme-page-text-color);
border-radius: 0 0 5px 5px;
border: 1px solid var(--theme-border-color);
min-width: 150px;
min-height: 25px;
bottom: 0;
left: 0;
margin: 0;
overflow-y: scroll;
max-width: 100vw;
}