MediaWiki:Gadget-QDmodal.css
After saving, you may need to bypass your browser's cache to see the changes. For further information, see Wikipedia:Bypass your cache.
- In most Windows and Linux browsers: Hold down Ctrl and press F5.
- In Safari: Hold down ⇧ Shift and click the Reload button.
- In Chrome and Firefox for Mac: Hold down both ⌘ Cmd+⇧ Shift and press R.
/*
QDmodal - flexbox-based modal library
Modified to remove Wikia-specific code; used with [[MediaWiki:Gadget-QDmodal.js]]
@author OneTwoThreeFall
@source <https://dev.fandom.com/wiki/QDmodal>
@source <https://dev.fandom.com/wiki/MediaWiki:QDmodal.css>
*/
body.qdmodal-is-visible {
/* add a margin equivalent to the scrollbar width to
prevent page content moving due to hidden overflow */
margin-inline-end: var(--qdmodal-scrollbar-width, 0);
overflow-y: hidden;
}
.qdmodal-container {
background-color: rgba(0, 0, 0, 0.4);
font-size: 14px;
line-height: 22px;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 101; /* #p-personal has z-index of 100 */
}
/* show MW notifications above QDmodal */
body.qdmodal-is-visible #mw-notification-area {
z-index: 801;
}
/* correct layering when a OOUI modal is opened while QDmodal is visible */
/* if we're inert and OOUI's modal isn't, it's likely OOUI wants to be top-most - let's make it so */
.oo-ui-windowManager-modal:not([inert]):has(~ .qdmodal-container[inert]) {
z-index: 801;
}
.qdmodal {
color: var(--text-color);
background-color: var(--body-main);
border-radius: 3px;
display: flex;
flex-direction: column;
max-height: calc(100% - 70px);
max-width: calc(100% - 70px);
overflow: hidden;
}
@media (max-height: 500px) {
.qdmodal {
max-height: 100%;
}
}
@media (max-width: 500px) {
.qdmodal {
max-width: 100%;
}
}
.qdmodal > section {
flex-grow: 1;
padding: 20px;
min-height: 40px;
overflow-y: auto;
position: relative;
/* use native scrolling in modal on iOS */
-webkit-overflow-scrolling: touch;
}
.qdmodal > header,
.qdmodal > footer {
display: flex;
background-color: var(--wikitable-header-bg);
}
.qdmodal > header {
min-height: 22px;
padding: 12px 20px;
}
.qdmodal > footer {
align-items: center;
flex-direction: row-reverse;
flex-shrink: 0;
min-height: 27px;
overflow-x: auto;
padding: 9px;
}
.qdmodal > footer:empty {
display: none;
}
.qdmodal > header > h3 {
flex-grow: 1;
color: inherit;
font-size: 1.3em;
font-weight: bold;
margin: 0;
-webkit-mask-image: linear-gradient(to left, transparent, black 3em);
mask-image: linear-gradient(to left, transparent, black 3em);
overflow: hidden;
padding: 0;
padding-inline-end: 3em;
white-space: nowrap;
}
.qdmodal > header > h3:dir(rtl) {
-webkit-mask-image: linear-gradient(to right, transparent, black 3em);
mask-image: linear-gradient(to right, transparent, black 3em);
}
.qdmodal-close {
width: 28px;
height: 28px;
min-width: 28px;
margin: -12px -20px;
margin-left: 0;
padding: 9px;
}
.qdmodal-close > path {
stroke: currentColor;
stroke-linecap: round;
}
.qdmodal-button {
background-color: var(--wikitable-bg-lighter);
border: 1px solid var(--wikitable-header-border);
border-radius: 3px;
box-sizing: content-box;
color: inherit;
font-size: 0.9em;
line-height: 1;
cursor: default;
white-space: nowrap;
display: block;
height: 1em;
margin-inline-start: 12px;
padding: 6px 12px;
}
.qdmodal-button[href] {
cursor: pointer;
}
.qdmodal-button:visited {
color: inherit;
}
.qdmodal-button[disabled] {
opacity: 0.6;
pointer-events: none;
}
.qdmodal-close,
.qdmodal-button {
transition: background-color 0.2s;
}
.qdmodal-close:hover,
.qdmodal-button:hover {
background-color: var(--body-light);
border-color: var(--wikitable-header-border);
color: inherit;
text-decoration: none;
}
/* remove [ and ] brackets from rollback button */
.qdmodal .mw-rollback-link::before,
.qdmodal .mw-rollback-link::after {
content: none;
}
@keyframes qdmodal-rotate {
to {
transform: rotate(1turn);
}
}
.qdmodal-spinner {
animation: qdmodal-rotate 1.5s steps(12) infinite;
height: 50px;
left: calc(50% - 25px);
position: absolute;
top: calc(50% - 25px);
vertical-align: middle;
width: 50px;
}
.qdmodal-spinner-container {
margin: calc(var(--qdmodal-spinner-size, 50px) / -2) 0;
overflow: hidden;
}
.qdmodal-spinner-container > .qdmodal-spinner {
position: static;
width: var(--qdmodal-spinner-size, 50px);
height: var(--qdmodal-spinner-size, 50px);
}
.qdmodal-spinner > path {
opacity: 0.2;
stroke: currentColor;
stroke-linecap: round;
stroke-width: 2px;
transform-origin: center;
}
.qdmodal-spinner > path:nth-of-type(1) {
transform: rotate(0deg);
}
.qdmodal-spinner > path:nth-of-type(2) {
transform: rotate(30deg);
}
.qdmodal-spinner > path:nth-of-type(3) {
transform: rotate(60deg);
}
.qdmodal-spinner > path:nth-of-type(4) {
transform: rotate(90deg);
}
.qdmodal-spinner > path:nth-of-type(5) {
transform: rotate(120deg);
opacity: 0.3;
}
.qdmodal-spinner > path:nth-of-type(6) {
transform: rotate(150deg);
opacity: 0.4;
}
.qdmodal-spinner > path:nth-of-type(7) {
transform: rotate(180deg);
opacity: 0.5;
}
.qdmodal-spinner > path:nth-of-type(8) {
transform: rotate(210deg);
opacity: 0.6;
}
.qdmodal-spinner > path:nth-of-type(9) {
transform: rotate(240deg);
opacity: 0.7;
}
.qdmodal-spinner > path:nth-of-type(10) {
transform: rotate(270deg);
opacity: 0.8;
}
.qdmodal-spinner > path:nth-of-type(11) {
transform: rotate(300deg);
opacity: 0.9;
}
.qdmodal-spinner > path:nth-of-type(12) {
transform: rotate(330deg);
opacity: 1;
}
/* dark mode */
.wgl-theme-dark .qdmodal .mw-ajax-loader,
.wgl-theme-browntown .qdmodal .mw-ajax-loader {
filter: invert(1);
}