MediaWiki:Gadget-Tooltip.css: Difference between revisions

Kuhlau (talk | contribs)
m Kuhlau moved page MediaWiki:Tooltip.css to MediaWiki:Gadget-Tooltip.css: improved page loading, tooltip is already a gadget so why we import it separately
Kuhlau (talk | contribs)
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
/*** For [[Template:Tt]] ***/
/*** For [[Template:Tt]] ***/
/* Force disable default hover tooltip on mobile and enable the toggle */
/* Force disable default hover tooltip on mobile and enable the toggle */
.skin-fandommobile .hover-tooltip { display: none; }
.skin-minerva .hover-tooltip { display: none; }
.skin-fandommobile .custom-tt-wrapper.giw-collapsible .mw-collapsible-toggle { display: inline !important; }
.skin-minerva .custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle { display: inline !important; }


/** Text styling **/
/** Text styling **/
/* Override collapsible stylings */
/* Override collapsible stylings */
.custom-tt-wrapper.giw-collapsible .mw-collapsible-toggle {
.custom-tt-wrapper.hnaw-collapsible .mw-collapsible-toggle {
padding: 0;
padding: 0;
border: none;
border: none;
Line 17: Line 17:
font-weight: inherit;
font-weight: inherit;
}
}
.custom-tt-wrapper.giw-collapsible .mw-collapsible-content,
.custom-tt-wrapper.hnaw-collapsible .mw-collapsible-content {
.custom-tt-wrapper.giw-collapsible .mw-collapsible-content ul,
.custom-tt-wrapper.giw-collapsible .mw-collapsible-content ol {
font-weight: normal;
font-weight: normal;
}
}
.text-tooltip { cursor: help; }
.text-tooltip { cursor: help; }


/*** The tooltip's toggle version ***/
/*** The tooltip's toggle version ***/
.toggle-tooltip.giw-collapsible, .text-tooltip {
.toggle-tooltip.hnaw-collapsible, .text-tooltip {
    position: relative;
border-bottom-color: rgb(128, 128, 128);
border-bottom-color: rgb(128, 128, 128);
border-bottom-width: 2px;
border-bottom-width: 2px;
border-bottom-style: dotted;
border-bottom-style: dotted;
> .toggle-tooltip.custom-tt { cursor: pointer; }
}
}


/** Desktop: enabled through gadget **/
/** Desktop: enabled through gadget **/
/* Container */
/* Container */
.skin-fandomdesktop .custom-tt-wrapper:not(.giw-extra-effect-wrapper) {
.skin-vector-legacy .mw-collapsible-content.custom-tt {
.oo-ui-popupWidget-popup {
    position: absolute;
    background: var(--theme-page-background-color);
    z-index: 10005;
    color: var(--theme-page-text-color);
    width: fit-content;
    border-radius: 5px 0 5px 5px;
    height: fit-content;
    border: 1px solid var(--theme-link-color);
    background: var(--theme-page-background-color);
    padding: 6px;
    color: var(--theme-page-text-color);
    text-align: center;
    border-radius: 5px 0 5px 5px;
}
    border: 1px solid var(--theme-link-color);
.oo-ui-popupWidget-anchor {
    min-width: 75px;
--theme-page-background-color--secondary: var(--theme-link-color);
    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-toright { border-radius: 0 5px 5px 5px; }
.skin-vector-legacy .mw-collapsible-content.custom-tt:before {
.skin-fandomdesktop .mw-collapsible-content.custom-tt-toright:before {
    content: "";
border-top:0 solid transparent;
    position: absolute;
border-bottom:10px solid var(--theme-link-color);
    bottom: 100%;
border-right:10px solid transparent;
    top: -20px;
border-left:0 solid transparent;
    width: 0;
left:-1px;
    border-top: 0 solid transparent;
right: unset;
    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) **/
/** Mobile: enabled by default (attr:title does not work) **/
/* Container */
/* Container */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.custom-tt {
.skin-minerva .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.custom-tt {
position: fixed;
position: fixed;
z-index: 10005;
z-index: 10005;
Line 80: Line 86:
}
}
/* Container header */
/* Container header */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.custom-tt:before {
.skin-minerva .custom-tt-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.custom-tt:before {
content: "ⓘ Tooltip content:";
content: "ⓘ Tooltip content:";
display: block;
display: block;
Line 89: Line 95:
}
}
/* Tooltip surrogate toggle on container header */
/* Tooltip surrogate toggle on container header */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded:after {
.skin-minerva .custom-tt-wrapper .mw-collapsible-toggle-expanded:after {
content: "x" !important;
content: "x" !important;
position: fixed;
position: fixed;
Line 98: Line 104:
}
}
/* Tooltip surrogate toggle on backdrop overlay */
/* Tooltip surrogate toggle on backdrop overlay */
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded:before {
.skin-minerva .custom-tt-wrapper .mw-collapsible-toggle-expanded:before {
background: black;
background: black;
position: fixed;
position: fixed;
Line 110: Line 116:




/** For [[Template:Extra Effect]] **/
/* For [[Template:Extra Effect]] */
:root .theme-fandomdesktop-dark, :root .theme-fandommobile-dark {
:root .wgl-darkmode, :root .wgl-theme-dark {
--extra-effect-bg: #0c0c0cd6;
--extra-effect-bg: #0c0c0cd6;
}
}


:root .theme-fandomdesktop-light, :root .theme-fandommobile-light {
:root .wgl-lightmode, :root .wgl-theme-light {
--extra-effect-bg: #ecececd6;
--extra-effect-bg: #ecececd6;
}
}
Line 130: Line 136:
}
}


.mediawiki .giw-extra-effect-wrapper:not(.mw-collapsible) {
.hnaw-extra-effect-wrapper.hnaw-collapsible.mw-collapsible {
padding:0;
padding: 0;
border-bottom-style:solid;
border-bottom-style: solid;
border-bottom-width:1px
border-bottom-width: 1px;
}
}
.giw-extra-effect.oo-ui-popupWidget-popup {
 
font-size:16px;
.mw-collapsible-content.hnaw-extra-effect {
border-radius:5px;
font-size: 16px;
background:var(--extra-effect-bg, #0c0c0cd6);
position: absolute;
backdrop-filter:blur(3px);
z-index: 999999;
border:1px solid var(--theme-border-color);
width: fit-content;
animation:extra-effect-appear 0.25s;
height: fit-content;
}
background: var(--extra-effect-bg, #0c0c0cd6);
.custom-tt + .oo-ui-floatableElement-floatable {
backdrop-filter: blur(3px);
margin: 5px 0px;
border: 1px solid var(--theme-border-color);
.oo-ui-popupWidget-popup {
margin-top: 25px;
padding: 10px;
border-radius: 5px;
}
color: var(--theme-page-text-color);
.oo-ui-clippableElement-clippable {
min-width: 35px;
overflow: visible !important;
max-width: 75vw;
overflow-y: visible !important;
padding: 3px 6px;
max-width: unset !important;
animation: extra-effect-appear 0.25s;
width: fit-content !important;
height: fit-content !important;
}
}
}


.giw-extra-effect .giw-extra-effect-header {
.hnaw-extra-effect .hnaw-extra-effect-header {
display: block;
display: block;
font-weight: bold;
font-weight: bold;
Line 164: Line 167:
}
}


.skin-fandommobile .giw-extra-effect-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.giw-extra-effect {
.skin-minerva .hnaw-extra-effect-wrapper .mw-collapsible-toggle-expanded + .mw-collapsible-content.hnaw-extra-effect {
position: fixed;
position: fixed;
z-index: 10005;
z-index: 10005;
width: 100%;
width: 100%;
height: 300px;
height: 125px;
background: var(--extra-effect-bg, #0c0c0cd6);
background: var(--extra-effect-bg, #0c0c0cd6);
color: var(--theme-page-text-color);
color: var(--theme-page-text-color);
Line 180: Line 183:
overflow-y: scroll;
overflow-y: scroll;
max-width: 100vw;
max-width: 100vw;
}
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded.giw-extra-effect:after {
bottom: 265px;
}
.skin-fandommobile .custom-tt-wrapper .mw-collapsible-toggle-expanded.giw-extra-effect:before {
height: calc(100% - 300px);
}
}