MediaWiki:Gadget-Tooltip.css: Difference between revisions
Appearance
udpate skins |
No edit summary |
||
| (40 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
/* Force disable default hover tooltip on mobile and enable the toggle */ | /* Force disable default hover tooltip on mobile and enable the toggle */ | ||
.skin-minerva .hover-tooltip { display: none; } | .skin-minerva .hover-tooltip { display: none; } | ||
.skin-minerva . | |||
/* Colors */ | |||
.skin-vector-legacy.wgl-darkmode, .skin-vector-legacy.wgl-theme-dark { --tooltip-bg: #0c0c0cd6; --color-ee: #00a29a; } | |||
.skin-vector-legacy.wgl-lightmode, .skin-vector-legacy.wgl-theme-light { --tooltip-bg: #ecececd6; --color-ee: #00a29a; } | |||
.skin-minerva.wgl-lightmode, .skin-minerva.wgl-theme-light { --tooltip-bg: #0c0c0c; --color-ee: #00a29a; } | |||
.skin-minerva.wgl-lightmode, .skin-minerva.wgl-theme-light { --tooltip-bg: #ececec; --color-ee: #00a29a; } | |||
/** Text styling **/ | /** Text styling **/ | ||
/* Override collapsible stylings */ | /* Override collapsible stylings */ | ||
.custom-tt-wrapper. | .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-toggle { | ||
padding: 0; | padding: 0; | ||
border: none; | border: none; | ||
| Line 17: | Line 22: | ||
font-weight: inherit; | font-weight: inherit; | ||
} | } | ||
.custom-tt-wrapper. | .custom-tt-wrapper.hnaw-collapsible { | ||
font-weight: normal; | font-weight: normal; | ||
} | |||
.custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content, | |||
.custom-tt-wrapper.hnaw-collapsible .custom-tt.mw-collapsible-toggle { | |||
float: none !important; | |||
display: inline-block !important; | |||
} | } | ||
. | .skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-default::before, | ||
.skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-default::after { | |||
content: ""; | |||
} | |||
.custom-tt { cursor: help; } | |||
/*** The tooltip's toggle version ***/ | /*** The tooltip's toggle version ***/ | ||
.toggle-tooltip. | .toggle-tooltip.hnaw-collapsible, .text-tooltip { | ||
display: inline-block; | |||
position: relative; | |||
text-decoration: underline; | |||
font-weight: bold; | |||
color: var(--color-ee); | |||
} | } | ||
/** Desktop: enabled through gadget **/ | /** Desktop: enabled through gadget **/ | ||
/* Container */ | /* Container */ | ||
.skin-vector-legacy .custom-tt-wrapper | .skin-vector-legacy .custom-tt-wrapper .oo-ui-popupWidget-popup, | ||
.skin-vector-legacy .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; | |||
} | } | ||
.skin-vector-legacy .mw-collapsible-content.custom-tt | /* Arrow (need to fix) */ | ||
.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.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content { | |||
.skin-minerva .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content | |||
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- | 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; | ||
} | } | ||
/* Container header */ | /* Container header */ | ||
.skin-minerva .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content | .skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content:before { | ||
content: "ⓘ Tooltip content:"; | content: "ⓘ Tooltip content:"; | ||
display: block; | display: block; | ||
| Line 86: | Line 101: | ||
margin: 2px 0; | margin: 2px 0; | ||
width: 100%; | width: 100%; | ||
border-bottom: 1px solid var(--theme- | border-bottom: 1px solid var(--theme-accent-color); | ||
} | } | ||
/* Tooltip surrogate toggle on container header */ | /* Tooltip surrogate toggle on container header */ | ||
.skin-minerva .custom-tt-wrapper .mw-collapsible-toggle-expanded:after { | .skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content:after { | ||
content: " | content: "×" !important; | ||
position: fixed; | position: fixed; | ||
z-index: 10006; | z-index: 10006; | ||
| Line 97: | Line 113: | ||
font-size: 30px; | font-size: 30px; | ||
} | } | ||
.custom-tt-wrapper .tt-header, | |||
.oo-ui-popupWidget-popup .tt-header { | |||
display: block; | |||
font-weight: bold; | |||
font-size: larger; | |||
} | } | ||
.hnaw-ee .oo-ui-popupWidget-body div, | |||
.hnaw-ee .mw-collapsible-content.custom-tt { | |||
text-align: left !important; | |||
- | |||
} | } | ||
/* Undo default ooui - bottom is placeholder for lack of better selection class */ | |||
-- | .custom-tt-wrapper .oo-ui-popupWidget-popup, | ||
.oo-ui-popupWidget-popup { | |||
border: none; | |||
background-color: transparent; | |||
border-radius: none; | |||
} | } | ||
| Line 128: | Line 143: | ||
opacity: 1; | opacity: 1; | ||
} | } | ||
} | } | ||
Latest revision as of 18:06, 16 July 2026
/*** For [[Template:Tt]] ***/
/* Force disable default hover tooltip on mobile and enable the toggle */
.skin-minerva .hover-tooltip { display: none; }
/* Colors */
.skin-vector-legacy.wgl-darkmode, .skin-vector-legacy.wgl-theme-dark { --tooltip-bg: #0c0c0cd6; --color-ee: #00a29a; }
.skin-vector-legacy.wgl-lightmode, .skin-vector-legacy.wgl-theme-light { --tooltip-bg: #ecececd6; --color-ee: #00a29a; }
.skin-minerva.wgl-lightmode, .skin-minerva.wgl-theme-light { --tooltip-bg: #0c0c0c; --color-ee: #00a29a; }
.skin-minerva.wgl-lightmode, .skin-minerva.wgl-theme-light { --tooltip-bg: #ececec; --color-ee: #00a29a; }
/** Text styling **/
/* Override collapsible stylings */
.custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.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;
}
.custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content,
.custom-tt-wrapper.hnaw-collapsible .custom-tt.mw-collapsible-toggle {
float: none !important;
display: inline-block !important;
}
.skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-default::before,
.skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle-default::after {
content: "";
}
.custom-tt { cursor: help; }
/*** The tooltip's toggle version ***/
.toggle-tooltip.hnaw-collapsible, .text-tooltip {
display: inline-block;
position: relative;
text-decoration: underline;
font-weight: bold;
color: var(--color-ee);
}
/** Desktop: enabled through gadget **/
/* Container */
.skin-vector-legacy .custom-tt-wrapper .oo-ui-popupWidget-popup,
.skin-vector-legacy .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 (need to fix) */
.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.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content {
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.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content: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.hnaw-collapsible .mw-collapsible-toggle-expanded + .custom-tt.mw-collapsible-content:after {
content: "×" !important;
position: fixed;
z-index: 10006;
bottom: 90px;
right: 15px;
font-size: 30px;
}
.custom-tt-wrapper .tt-header,
.oo-ui-popupWidget-popup .tt-header {
display: block;
font-weight: bold;
font-size: larger;
}
.hnaw-ee .oo-ui-popupWidget-body div,
.hnaw-ee .mw-collapsible-content.custom-tt {
text-align: left !important;
}
/* Undo default ooui - bottom is placeholder for lack of better selection class */
.custom-tt-wrapper .oo-ui-popupWidget-popup,
.oo-ui-popupWidget-popup {
border: none;
background-color: transparent;
border-radius: none;
}
@keyframes extra-effect-appear {
from {
transform: translate(0px, 15px);
opacity: 0;
}
to {
transform: translate(0, 0);
opacity: 1;
}
}