MediaWiki:Gadget-Tooltip.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tags: Mobile edit Mobile web edit |
No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
.skin-minerva .hover-tooltip { display: none; } | .skin-minerva .hover-tooltip { display: none; } | ||
.skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle { display: none !important; } | .skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle { display: none !important; } | ||
/* Colors */ | |||
:root .wgl-darkmode, :root .wgl-theme-dark { | |||
--tooltip-bg: #0c0c0cd6; | |||
} | |||
:root .wgl-lightmode, :root .wgl-theme-light { | |||
--tooltip-bg: #ecececd6; | |||
} | |||
/** Text styling **/ | /** Text styling **/ | ||
| Line 33: | Line 42: | ||
/** Desktop: enabled through gadget **/ | /** Desktop: enabled through gadget **/ | ||
/* Container */ | /* Container */ | ||
.skin-vector-legacy . | .skin-vector-legacy .custom-tt-wrapper .oo-ui-popupWidget-popup { | ||
background: var(--tooltip-bg); | |||
color: var(--theme-page-text-color); | |||
border: 1px solid var(--theme-accent-color); | |||
border-radius: 5px; | |||
padding: 6px; | |||
min-width: 75px; | |||
text-align: center; | |||
} | } | ||
/* Arrow */ | /* Arrow */ | ||
.skin-vector-legacy .mw-collapsible-content.custom-tt:before { | .skin-vector-legacy .mw-collapsible-content.custom-tt:before { | ||
| Line 70: | Line 71: | ||
position: fixed; | position: fixed; | ||
z-index: 10005; | z-index: 10005; | ||
width: 100%; | width: calc(100% - 1em + 2px); | ||
height: 125px; | height: 125px; | ||
background: var(--tooltip-bg); | |||
color: var(--theme-page-text-color); | color: var(--theme-page-text-color); | ||
border-radius: | border-radius: 20px 20px 5px 5px; | ||
border: 1px solid var(--theme-accent-color); | border: 1px solid var(--theme-accent-color); | ||
box-shadow: 1px 5px 5px 1px black; | |||
min-width: 150px; | min-width: 150px; | ||
min-height: 25px; | min-height: 25px; | ||
padding: 6px; | padding: 6px 0 6px 12px; | ||
bottom: 0; | bottom: 0; | ||
left: 0; | left: 0; | ||
margin: 0; | margin: 0; | ||
overflow-y: | overflow-y: auto; | ||
} | } | ||
| Line 117: | Line 119: | ||
} | } | ||
*/ | */ | ||
.custom-tt-wrapper .hnaw-extra-effect-header { | |||
display: block; | |||
font-weight: bold; | |||
font-size: larger; | |||
} | |||
/* Undo default ooui */ | /* Undo default ooui */ | ||
| Line 125: | Line 133: | ||
} | } | ||
@keyframes extra-effect-appear { | @keyframes extra-effect-appear { | ||
| Line 144: | Line 145: | ||
} | } | ||
} | } | ||
e | |||
Revision as of 19:13, 15 July 2026
/*** For [[Template:Tt]] ***/
/* Force disable default hover tooltip on mobile and enable the toggle */
.skin-minerva .hover-tooltip { display: none; }
.skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle { display: none !important; }
/* Colors */
:root .wgl-darkmode, :root .wgl-theme-dark {
--tooltip-bg: #0c0c0cd6;
}
:root .wgl-lightmode, :root .wgl-theme-light {
--tooltip-bg: #ecececd6;
}
/** 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 {
font-weight: normal;
}
.text-tooltip { cursor: help; }
/*** The tooltip's toggle version ***/
.toggle-tooltip.hnaw-collapsible, .text-tooltip {
display: inline-block;
position: relative;
border-bottom-color: rgb(128, 128, 128);
border-bottom-width: 2px;
border-bottom-style: dotted;
}
/** Desktop: enabled through gadget **/
/* Container */
.skin-vector-legacy .custom-tt-wrapper .oo-ui-popupWidget-popup {
background: var(--tooltip-bg);
color: var(--theme-page-text-color);
border: 1px solid var(--theme-accent-color);
border-radius: 5px;
padding: 6px;
min-width: 75px;
text-align: center;
}
/* Arrow */
.skin-vector-legacy .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-accent-color);
border-left: 10px solid transparent;
border-right: 0 solid transparent;
right: -1px;
z-index: 10005;
}
/* Bottom of Page Container (Mobile) */
.skin-minerva .custom-tt-wrapper .oo-ui-widget:not(.oo-ui-element-hidden) {
position: fixed;
z-index: 10005;
width: calc(100% - 1em + 2px);
height: 125px;
background: var(--tooltip-bg);
color: var(--theme-page-text-color);
border-radius: 20px 20px 5px 5px;
border: 1px solid var(--theme-accent-color);
box-shadow: 1px 5px 5px 1px black;
min-width: 150px;
min-height: 25px;
padding: 6px 0 6px 12px;
bottom: 0;
left: 0;
margin: 0;
overflow-y: auto;
}
/* Container header */
.skin-minerva .custom-tt-wrapper .oo-ui-widget:not(.oo-ui-element-hidden):before {
content: "ⓘ Tooltip content:";
display: block;
text-align: left;
margin: 2px 0;
width: 100%;
border-bottom: 1px solid var(--theme-accent-color);
}
/* Tooltip surrogate toggle on container header */
.skin-minerva .custom-tt-wrapper .oo-ui-widget:not(.oo-ui-element-hidden):after {
content: "×" !important;
position: fixed;
z-index: 10006;
bottom: 90px;
right: 15px;
font-size: 30px;
}
/* Tooltip surrogate toggle on backdrop overlay */
/* not sure what this does so hiding it for now
.skin-minerva .custom-tt-wrapper .oo-ui-widget:not(.oo-ui-element-hidden):before {
background: black;
position: fixed;
height: calc(100% - 125px);
width: 100%;
top: 0;
left: 0;
opacity: 0.6;
z-index: 10004;
}
*/
.custom-tt-wrapper .hnaw-extra-effect-header {
display: block;
font-weight: bold;
font-size: larger;
}
/* Undo default ooui */
.custom-tt-wrapper .oo-ui-popupWidget-popup {
border: none;
background-color: inherit;
border-radius: inherit;
}
@keyframes extra-effect-appear {
from {
transform: translate(0px, 15px);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}
e