Difference between revisions of "MediaWiki:Common.css"

From Yugipedia
Jump to: navigation, search
(add a link icon for links to Wikipedia)
(rm styles for deleted template)
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
/*<nowiki>
 
/*<nowiki>
 
 
Some CSS is loaded via a default, hidden gadget:
 
Some CSS is loaded via a default, hidden gadget:
 
* CSS from Wikimedia is in [[MediaWiki:Gadget-Wikimedia.css]]
 
* CSS from Wikimedia is in [[MediaWiki:Gadget-Wikimedia.css]]
 
* card table CSS is in [[MediaWiki:Gadget-Cardtable.css]]
 
* card table CSS is in [[MediaWiki:Gadget-Cardtable.css]]
 
Please keep this in mind when adding or looking for CSS.
 
Please keep this in mind when adding or looking for CSS.
 
 
*/
 
*/
 
 
/** CSS placed here will be applied to all skins **/
 
/** CSS placed here will be applied to all skins **/
 
+
/* Necessary for the ads. */
 +
#footer, .minerva-footer {
 +
padding-bottom: 6em;
 +
}
 
/* Remove serifs from headers. */
 
/* Remove serifs from headers. */
 
.mw-body h1, .mw-body-content h1, .mw-body-content h2 {
 
.mw-body h1, .mw-body-content h1, .mw-body-content h2 {
 
font-family: sans-serif;
 
font-family: sans-serif;
 
}
 
}
 
+
/* Floatable headers for tables */
/**********************************/
+
/* based on https://css-tricks.com/position-sticky-and-table-headers/ */
/** Card galleries and lists. */
+
table.floatable-header {
/** These are temporary; may be implmented as a gadget later. */
+
position: relative;
/* Card gallery ToC. */
+
border-collapse: separate;
.card-gallery__toc {
+
border-spacing: 0;
background-color: #f8f9fa;
+
}
border: 1px solid #CCC;
+
.floatable-header th[scope="col"],
 +
.floatable-header th[scope="colgroup"] {
 +
position: sticky;
 +
top: 0;
 +
}
 +
/* this is stupidly fragile, but it works... feel free to suggest better versions, though */
 +
.floatable-header tr:nth-child(2) th[scope="col"],
 +
.floatable-header tr:nth-child(2) th[scope="colgroup"] {
 +
top: 29px;
 +
}
 +
/* position:sticky does weird things to cell borders, so we have to reset them here */
 +
/* I hate all of this; if anyone has better ideas, I'm all ears */
 +
table.wikitable.floatable-header th,
 +
table.wikitable.floatable-header td {
 +
border-style: none solid solid none;
 +
}
 +
/* the reset creates a double-thick border on the bottom and right edges of the table (only in Firefox?), so remove it here */
 +
table.wikitable.floatable-header tr:last-child th,
 +
table.wikitable.floatable-header tr:last-child td {
 +
border-bottom-style: none;
 +
}
 +
/* ...and *that* reset removes the bottom border of the header row on tables with a single header row, so restore *it* */
 +
table.wikitable.floatable-header thead tr:last-child th,
 +
table.wikitable.floatable-header thead tr:last-child td {
 +
border-bottom-style: solid;
 
}
 
}
.card-gallery__toc ul {
+
table.wikitable.floatable-header th:last-child,
display: flex;
+
table.wikitable.floatable-header td:last-child {
flex-wrap: wrap;
+
border-right-style: none;
align-items: center;
 
justify-content: center;
 
margin: 0;
 
 
}
 
}
.card-gallery__toc__entry {
+
/* fix borders in Edge (sometimes - see https://css-tricks.com/position-sticky-and-table-headers/#comment-1749745 ) */
display: inline-block;
+
@supports (-ms-ime-align: auto) {
padding: 0.25em;
+
background-clip: padding-box;
 
}
 
}
.card-gallery__toc__entry::before { font-weight: bold; }
+
/**********************************/
.card-gallery__toc__entry:first-child::before { content: 'Go to:\20'; }
+
/** Card galleries and lists. */
.card-gallery__toc__entry:not(:first-child)::before { content: '• '; }
+
/** TODO move to TemplateStyles */
 
 
 
/* Card gallery errors. */
 
/* Card gallery errors. */
 
.card-gallery__errors { color: red; }
 
.card-gallery__errors { color: red; }
 
 
/* Card gallery itself. */
 
/* Card gallery itself. */
 
.card-gallery__gallery {
 
.card-gallery__gallery {
Line 50: Line 69:
 
.card-gallery__gallery .mw-gallery-traditional {
 
.card-gallery__gallery .mw-gallery-traditional {
 
display: initial; /* In the odd case flex is not supported. */
 
display: initial; /* In the odd case flex is not supported. */
    display: flex;
+
display: flex;
    justify-content: space-around; /* Because not all support the above. */
+
justify-content: space-around; /* Because not all support the above. */
    justify-content: space-evenly;
+
justify-content: space-evenly;
    flex-wrap: wrap;
+
flex-wrap: wrap;
 +
}
 +
/** Lua reporter */
 +
.reporter__warnings {
 +
color: darkgoldenrod;
 +
font-weight: bold;
 +
}
 +
.reporter__errors {
 +
color: red;
 +
font-weight: bold;
 
}
 
}
 
/** End possible temporary styles. */
 
/** End possible temporary styles. */
 
/**********************************/
 
/**********************************/
 
 
/* Card <gallery> styles. */
 
/* Card <gallery> styles. */
 +
/* only used (?) on hardcoded gallery elements on Card Gallery pages */
 
.card-galleries { /* TODO: Cleanup after updating Module:Set gallery. */
 
.card-galleries { /* TODO: Cleanup after updating Module:Set gallery. */
 
border-collapse: collapse;
 
border-collapse: collapse;
Line 69: Line 97:
 
color: #FFF;
 
color: #FFF;
 
border: 1px solid #999;
 
border: 1px solid #999;
margin: 0;
 
 
padding: 3px;
 
padding: 3px;
 
}
 
}
 
.card-galleries td {
 
.card-galleries td {
margin: 0;
 
 
padding: 0;
 
padding: 0;
 
text-align: center;
 
text-align: center;
 
}
 
}
.card-galleries table.gallery {
+
.card-galleries ul.gallery {
 
width: 100%;
 
width: 100%;
 
margin: 0;
 
margin: 0;
 
border: 0;
 
border: 0;
 
}
 
}
.card-galleries table.gallery td {
+
.card-galleries ul.gallery td {
 
background-color: transparent;
 
background-color: transparent;
 
}
 
}
.card-galleries table.gallery .gallerybox {
+
.card-galleries ul.gallery .gallerybox {
 
background-color: #F9F9F9;
 
background-color: #F9F9F9;
 
border: 1px solid #CCC;
 
border: 1px solid #CCC;
 
margin: 0 auto;
 
margin: 0 auto;
 
}
 
}
.card-galleries table.gallery .gallerybox .thumb {
+
.card-galleries ul.gallery .gallerybox .thumb {
 
background-color: transparent;
 
background-color: transparent;
 
border: 0;
 
border: 0;
Line 103: Line 129:
 
white-space: normal;
 
white-space: normal;
 
text-align: center;
 
text-align: center;
font: sans-serif;
+
font-family: sans-serif;
 
padding: 0;
 
padding: 0;
 
}
 
}
 
.card-galleries .mw-gallery-traditional { /* TODO: Cleanup after updating Module:Set gallery */
 
.card-galleries .mw-gallery-traditional { /* TODO: Cleanup after updating Module:Set gallery */
 
display: initial; /* In the odd case flex is not supported. */
 
display: initial; /* In the odd case flex is not supported. */
    display: flex;
+
display: flex;
    justify-content: space-around; /* Because not all support the above. */
+
justify-content: space-around; /* Because not all support the above. */
    justify-content: space-evenly;
+
justify-content: space-evenly;
    flex-wrap: wrap;
+
flex-wrap: wrap;
 
}
 
}
 
.thumb {
 
.thumb {
Line 119: Line 145:
 
}
 
}
 
.noFile {
 
.noFile {
word-break: break-all; /* Because some browsers don't support break-word. */
+
word-break: break-word; /* Deprecated, but used here as fallback. */
word-break: break-word; /* https://developer.mozilla.org/en-US/docs/Web/CSS/word-break */
+
overflow-wrap: anywhere; /* Fairly recent. */
}
 
 
 
 
 
 
 
/* For {{Set gallery}} headers. */
 
.gallery-header {
 
font-size: 110%;
 
font-weight: bold;
 
text-align: center;
 
padding: 3px;
 
border-bottom: 1px solid #CCC;
 
border-top: 1px solid #CCC;
 
}
 
.gallery-header:first-child { /* Except for first instance. */
 
border-top: 0;
 
}
 
 
 
/* Anime and manga card galleries */
 
.anime-card-gallery .image-no-lightbox {
 
background-image: url('https://ms.yugipedia.com/thumb/9/94/Back-Anime-2.png/127px-Back-Anime-2.png');
 
}
 
.manga-card-gallery .image-no-lightbox {
 
background-image: url('https://ms.yugipedia.com/thumb/d/d7/Back-JP-Manga.png/140px-Back-JP-Manga.png');
 
background-repeat: no-repeat;
 
}
 
.manga-card-gallery-color .image-no-lightbox {
 
background-image: url('https://ms.yugipedia.com/thumb/f/fe/Back-JP-Manga-DM-color.png/140px-Back-JP-Manga-DM-color.png');
 
background-repeat: no-repeat;
 
}
 
 
 
.anime-card-gallery .image-no-lightbox,
 
.manga-card-gallery .image-no-lightbox,
 
.manga-card-gallery-color .image-no-lightbox {
 
font-size: 0.1px;
 
color: transparent;
 
}
 
.anime-card-gallery .wikia-gallery-item,
 
.manga-card-gallery .wikia-gallery-item,
 
.manga-card-gallery-color .wikia-gallery-item {
 
text-align:center;
 
}
 
.anime-card-gallery .thumbimage,
 
.manga-card-gallery .thumbimage,
 
.manga-card-gallery-color .thumbimage,
 
.anime-card-gallery .thumb .gallery-image-wrapper,
 
.manga-card-gallery .thumb .gallery-image-wrapper,
 
.manga-card-gallery-color .thumb .gallery-image-wrapper {
 
border-width: 0;
 
}
 
.anime-card-gallery .thumbimage[src*="-NC."],
 
.manga-card-gallery .thumbimage[src*="-NC."],
 
.manga-card-gallery-color .thumbimage[src*="-NC."],
 
.anime-card-gallery .thumbimage[src*="-NC-"],
 
.manga-card-gallery .thumbimage[src*="-NC-"],
 
.manga-card-gallery-color .thumbimage[src*="-NC-"] {
 
border-width: 1px;
 
}
 
 
 
/* Card errata styles */
 
table.card-errata {
 
width: 100%;
 
}
 
.card-errata caption {
 
background-color: #337C97;
 
color: #FFF;
 
}
 
.card-errata th {
 
background-color: #337C97 !important;
 
color: #FFF;
 
width: 33.33%;
 
}
 
.card-errata .twocolumn th {
 
width: 50%;
 
}
 
.card-errata .lores td,
 
.card-errata .images td {
 
vertical-align: top;
 
}
 
.card-errata .names td,
 
.card-errata .types td,
 
.card-errata .thumbcaption {
 
text-align: center;
 
}
 
 
 
.card-errata ins {
 
text-decoration: inherit;
 
border-bottom: 1px solid #000;
 
background-color: #FFC;
 
}
 
.card-errata del {
 
text-decoration: line-through;
 
color: #F66;
 
}
 
.card-errata .original {
 
opacity: 0.5;
 
}
 
.card-errata .original ins,
 
.card-errata .original del {
 
background-color: inherit;
 
color: inherit;
 
border-bottom: inherit;
 
}
 
 
 
.card-errata .blank {
 
background-color: #DDD;
 
}
 
 
 
/* Newer card errata styling (testing) */
 
.errata-list {
 
display: -ms-flexbox;
 
display: -webkit-flex;
 
display: flex;
 
flex-wrap: wrap;
 
}
 
.errata-item-heading {
 
background-color: #337C97;
 
color: #FFF;
 
font-size: 1em;
 
font-weight: bold;
 
text-align: center;
 
margin: 0;
 
padding:.2em;
 
}
 
.errata-item {
 
border: 1px solid #aaa;
 
box-sizing: border-box;
 
display: -ms-flexbox;
 
display: -webkit-flex;
 
display: flex;
 
width: 100%;
 
vertical-align: bottom;
 
flex-direction: column;
 
}
 
.errata-item-lore {
 
padding: .5em;
 
}
 
.errata-item-image {
 
border-top: 1px solid #aaa;
 
display: -ms-flexbox;
 
display: -webkit-flex;
 
display: flex;
 
margin-top: auto;
 
padding: 1em .5em;
 
text-align: center;
 
}
 
.errata-item-image img {
 
height: 220px;
 
}
 
.errata-item-caption {
 
text-align: center;
 
}
 
@media screen and (min-width: 600px) {
 
.errata-item {
 
width: 50%;
 
}
 
}
 
@media screen and (min-width: 700px) {
 
.errata-item {
 
width: 33%;
 
}
 
}
 
@media screen and (min-width: 1100px) {
 
.errata-item {
 
width: 25%;
 
}
 
 
}
 
}
 
 
/* Card lists */
 
/* Card lists */
 +
/* TODO: Move to TemplateStyles */
 +
/* the mw-datatable class offers row highlighting on hover as well, but doesn't seem to interact nicely with SMW queries
 +
  and is also Vector desktop-specific (see e.g. [[mwphab:T287997]]) */
 
.card-list {
 
.card-list {
 
width: 100%;
 
width: 100%;
Line 294: Line 157:
 
}
 
}
 
.card-list tr th[colspan], .card-list caption {
 
.card-list tr th[colspan], .card-list caption {
font-size: 110%;
 
margin-top: 15px;
 
 
padding: 3px;
 
padding: 3px;
 
border: 1px solid #CCC;
 
border: 1px solid #CCC;
 
border-bottom: 0;
 
border-bottom: 0;
 
}
 
}
.card-list tr th[colspan] a, .card-list caption a {
+
.card-list tr:hover th[scope=row], .card-list tr:hover th[scope=rowgroup], .card-list tr:hover td {
/* TODO: come up with a color that isn't eye-gougingly horrible
 
we'll also need to cover the :active, :hover, and :visited selectors */
 
}
 
.card-list tr:hover td {
 
 
background-color: #EEE;
 
background-color: #EEE;
 
}
 
}
 
+
/* .wikitable has a 1em bottom margin that appears in Tabbers
/* DDM list */
+
  say, for example, if it's used to implement set lists which are then transcluded onto set pages, in a Tabber */
ul.manga-ddm-list {
+
.tabber .set-list .wikitable {
margin: 0;
+
margin-bottom: 0;
list-style: none;
 
}
 
.manga-ddm-list > li {
 
display: flex;
 
padding: 0.5em;
 
margin: 0;
 
}
 
.manga-ddm-list-image {
 
min-width: 9em;
 
text-align: center;
 
}
 
.manga-ddm-list-image img {
 
height: auto;
 
max-width: 100%;
 
}
 
.manga-ddm-list-stats {
 
padding-left: 1em;
 
width: 100%;
 
}
 
.manga-ddm-list-stats .hlist {
 
border: solid #fff;
 
border-width: 1px 0;
 
padding: .25em 0;
 
}
 
 
 
.manga-ddm-list-dragon {
 
background-image: linear-gradient(#fff, #f99);
 
}
 
.manga-ddm-list-warrior {
 
background-image: linear-gradient(#fff, #b7eaf0);
 
}
 
.manga-ddm-list-spellcaster {
 
background-image: linear-gradient(#fff, #f9f9f9);
 
}
 
.manga-ddm-list-item,
 
[class*="manga-ddm-list-???"] {
 
background-image: linear-gradient(#fff, #c0c0c0);
 
 
}
 
}
  
Line 357: Line 177:
 
display: none;
 
display: none;
 
}
 
}
 
+
/* Infoboxes */
 +
body {
 +
    --bg-color-infobox: #f8f9fa;
 +
    --bg-color-infobox-caption: #bbf;
 +
    --bg-color-infobox-heading: #ccf;
 +
    --bg-color-infobox-label: #ddf;
 +
    --bg-color-infobox-sublabel: #eef;
 +
    --border-color-infobox: #a2a9b1;
 +
    --color-infobox: #222;
 +
}
 +
.infobox {
 +
    background-color: var(--bg-color-infobox);
 +
    border-color: var(--border-color-infobox);
 +
    color: var(--color-infobox);
 +
}
 +
.infobox-yugipedia caption {
 +
    background-color: var(--bg-color-infobox-caption);
 +
    border-color: var(--border-color-infobox);
 +
}
 +
.infobox-yugipedia th {
 +
    background-color: var(--bg-color-infobox-heading);
 +
}
 +
.infobox-yugipedia th[scope="row"],
 +
.infobox-yugipedia .collapsible th,
 +
.infobox-yugipedia .infobox-subheading {
 +
    background-color: var(--bg-color-infobox-label);
 +
}
 +
.infobox-yugipedia .collapsible th[scope="row"] {
 +
    background-color: var(--bg-color-infobox-sublabel);
 +
}
 
/* Need to deprecate this */
 
/* Need to deprecate this */
 
.infobox-subheading {
 
.infobox-subheading {
background-color: #DDD;
 
 
font-weight: bold;
 
font-weight: bold;
 
}
 
}
 
 
/* Indentation to mark beginning of list items in infoboxes */
 
/* Indentation to mark beginning of list items in infoboxes */
 
.infobox td ul {
 
.infobox td ul {
margin-left: .3em !important;
+
margin: 0;
 
}
 
}
 
.infobox td li {
 
.infobox td li {
 
list-style: none;
 
list-style: none;
}
 
 
/* Lyrics highlighting */
 
.high-light {
 
width: 100%;
 
font-size: 90%;
 
text-align: left;
 
border: 1px solid #AAA;
 
margin: 1em 1em 1em 0;
 
background-color: #F9F9F9;
 
}
 
.high-light th {
 
background-color: #337C97;
 
color: #FFF;
 
text-align: center;
 
}
 
.high-light tr:hover {
 
background-color: #EEF;
 
}
 
.high-light .section-begin td {
 
border-top: 1px solid #337C97;
 
 
}
 
}
  
 
/* hlist varieties: comma, slash, plus, minus, pipe */
 
/* hlist varieties: comma, slash, plus, minus, pipe */
.hcomma dd::after,
+
/* the doubled ".hlist" selector is necessary to work around specificity of other stuff */
.hcomma li::after {
+
.hlist.hlist.hcomma dd:not(:last-child)::after,
 +
.hlist.hlist.hcomma li:not(:last-child)::after {
 
content: ",\20";
 
content: ",\20";
 
font-weight: normal;
 
font-weight: normal;
 
}
 
}
.hslash dd::after,
+
.hlist.hlist.hslash dd:not(:last-child)::after,
.hslash li::after {
+
.hlist.hlist.hslash li:not(:last-child)::after {
 
content: " / ";
 
content: " / ";
 
font-weight: normal;
 
font-weight: normal;
 
}
 
}
.hplus dd::after,
+
.hlist.hlist.hplus dd:not(:last-child)::after,
.hplus li::after {
+
.hlist.hlist.hplus li:not(:last-child)::after {
 
content: " + ";
 
content: " + ";
 
font-weight: normal;
 
font-weight: normal;
 
}
 
}
 
+
.hlist.hlist.hplus dd:not(:last-child):lang(ja)::after,
.hplus dd:lang(ja)::after,
+
.hlist.hlist.hplus li:not(:last-child):lang(ja)::after {
.hplus li:lang(ja)::after {
+
content: "+";
content: " + ";
 
}
 
.hplus.inline ul {
 
display: inline;
 
 
}
 
}
.hminus dd::after,
+
.hlist.hlist.hminus dd:not(:last-child)::after,
.hminus li::after,
+
.hlist.hlist.hminus li:not(:last-child)::after,
.hdash dd::after,
+
.hlist.hlist.hdash dd:not(:last-child)::after,
.hdash li::after {
+
.hlist.hlist.hdash li:not(:last-child)::after {
 
content: " - ";
 
content: " - ";
 
font-weight: normal;
 
font-weight: normal;
 
}
 
}
.hminus dd:lang(ja)::after,
+
.hlist.hlist.hminus dd:not(:last-child):lang(ja)::after,
.hminus li:lang(ja)::after,
+
.hlist.hlist.hminus li:not(:last-child):lang(ja)::after,
.hdash dd:lang(ja)::after,
+
.hlist.hlist.hdash dd:not(:last-child):lang(ja)::after,
.hdash li:lang(ja)::after{
+
.hlist.hlist.hdash li:not(:last-child):lang(ja)::after{
 
content: " - ";
 
content: " - ";
 
}
 
}
.hpipe dd::after,
+
.hlist.hlist.hpipe dd:not(:last-child)::after,
.hpipe li::after {
+
.hlist.hlist.hpipe li:not(:last-child)::after {
 
content: " | ";
 
content: " | ";
 
font-weight: normal;
 
font-weight: normal;
 
}
 
}
/* prevent a delimiter from appearing after the last item */
 
.hlist dd:last-child::after,
 
.hlist dt:last-child::after,
 
.hlist li:last-child::after {
 
content: none;
 
}
 
/* For IE8 */
 
.hlist dd.hlist-last-child::after,
 
.hlist dt.hlist-last-child::after,
 
.hlist li.hlist-last-child::after {
 
content: none;
 
}
 
/* ...but that hides the closing parenthesis on sublists, so we have to re-add it */
 
.hlist dl dl dd:last-child::after,
 
.hlist dl dl dt:last-child::after,
 
.hlist ol ol li:last-child::after,
 
.hlist ul ul li:last-child::after {
 
content: ")";
 
font-weight: normal;
 
}
 
/* For IE8 */
 
.hlist dl dl dd.hlist-last-child::after,
 
.hlist dl dl dt.hlist-last-child::after,
 
.hlist ol ol li.hlist-last-child::after,
 
.hlist ul ul li.hlist-last-child::after {
 
content: ")";
 
font-weight: normal;
 
}
 
 
 
/* Tabber stuff:
 
/* Tabber stuff:
 
* background
 
* background
* smaller text in tabs when there're too many
+
* smaller text in tabs when there are too many
 
* even smaller text
 
* even smaller text
 
*/
 
*/
Line 472: Line 266:
 
background-color: #FFF;
 
background-color: #FFF;
 
}
 
}
.smalltabs .tabbernav li {
+
.smalltabs .tabbernav {
font-size: smaller;
+
font-size: .625rem;
 
}
 
}
.smallertabs .tabbernav li {
+
.smallertabs .tabbernav {
font-size: xx-small;
+
font-size: .5625rem;
 
}
 
}
 
 
/* prev/next navigation */
 
/* prev/next navigation */
 
.nav-prev {
 
.nav-prev {
Line 494: Line 287:
 
content: " →";
 
content: " →";
 
}
 
}
 
/* quotes in page titles ({{Quoted title}}) */
 
.quoted-title::before,
 
.quoted-title::after {
 
content: '"';
 
}
 
 
 
/* hide content in non-mobile devices
 
/* hide content in non-mobile devices
 
   to hide content on mobile devices, use the "nomobile" class */
 
   to hide content on mobile devices, use the "nomobile" class */
Line 506: Line 292:
 
display: none;
 
display: none;
 
}
 
}
 
+
/* If JavaScript is enabled, hide image switcher links, until after the script has loaded. */
/* most people don't need to worry about SMW warnings/notices */
+
.client-js .image-switcher {
.smw-editpage-help,
+
visibility: hidden;
.smwttactivepersist,
+
}
.smwttpersist {
+
/* most editors don't need to worry about semantic annotations,
 +
  and we don't want them being added directly to articles anyways */
 +
.smw-editpage-help {
 
display: none;
 
display: none;
 
}
 
}
/* make the left column in facttables not take up half the available width */
 
.smwpropname {
 
width: 25%;
 
}
 
 
 
/* make image thumbnail borders transparent so they don't look horrible on colored backgrounds */
 
/* make image thumbnail borders transparent so they don't look horrible on colored backgrounds */
 
div.thumb {
 
div.thumb {
 
border: transparent;
 
border: transparent;
 
}
 
}
 
/* [[Template:LoadBox]] with navbox */
 
.loadbox-navbox {
 
padding: 2px !important;
 
margin: 1em 0 0 !important;
 
clear: both;
 
}
 
.loadbox-navbox > p {
 
background-color: #CCC;
 
text-align: center;
 
margin: 0;
 
padding: 0 3px;
 
}
 
.loadbox-navbox > p > b {
 
font-size: 110%;
 
}
 
 
.loadbox-navbox .navbox {
 
margin: 0 -2px -2px;
 
border: 0;
 
}
 
.loadbox-navbox .navbox > tbody > tr:first-child {
 
display: none;
 
}
 
 
/* Forum formatting -Algorithm & -Splaka (is this actually still needed?) */
 
.forumheader { border: 1px solid #aaa; background-color: #f9f9f9; margin-top: 1em; padding: 12px; }
 
.forumlist td.forum_edited a { color: black; text-decoration: none; }
 
.forumlist td.forum_title a { padding-left: 20px; }
 
.forumlist td.forum_title a.forum_new { font-weight: bold; background: url('https://yugipedia.com/wiki/Special:Redirect/file/Forum_new.gif') center left no-repeat; padding-left: 20px; }
 
.forumlist td.forum_title a.forum_new:visited { font-weight: normal; background: none; padding-left: 20px; }
 
.forumlist th.forum_title { padding-left: 20px; }
 
 
 
/* redirects in special pages (e.g. Special:AllPages) */
 
/* redirects in special pages (e.g. Special:AllPages) */
 
.allpagesredirect a {
 
.allpagesredirect a {
Line 560: Line 310:
 
padding-left: 13px;
 
padding-left: 13px;
 
}
 
}
 
 
/* Adjust the word breaking for fullwidth text */
 
/* Adjust the word breaking for fullwidth text */
 
:lang(ja-Latn),
 
:lang(ja-Latn),
Line 567: Line 316:
 
word-break: keep-all;
 
word-break: keep-all;
 
}
 
}
 
/* Firefox ruby support */
 
@-moz-document url-prefix() {
 
/* http://web.nickshanks.com/stylesheets/ruby.css */
 
ruby {
 
display: inline-table;
 
text-align: center;
 
white-space: nowrap;
 
text-indent: 0;
 
margin: 0;
 
vertical-align: 55%;
 
}
 
ruby > rb {
 
display: table-row-group;
 
line-height: 100%;
 
}
 
ruby > rt {
 
display: table-header-group;
 
font-size: 60%;
 
line-height: 50%;
 
letter-spacing: 0;
 
}
 
rp {
 
display: none;
 
}
 
}
 
 
 
/* links to official websites */
 
/* links to official websites */
div#content a[href^="http://www.db.yugioh-card.com"],
+
.mw-body-content a[href^="http://www.db.yugioh-card.com"],
div#content a[href^="https://www.db.yugioh-card.com"],
+
.mw-body-content a[href^="https://www.db.yugioh-card.com"],
div#content a[href^="//www.db.yugioh-card.com"],
+
.mw-body-content a[href^="//www.db.yugioh-card.com"],
div#content a[href^="http://db.yugioh-card.com"],
+
.mw-body-content a[href^="http://db.yugioh-card.com"],
div#content a[href^="https://db.yugioh-card.com"],
+
.mw-body-content a[href^="https://db.yugioh-card.com"],
div#content a[href^="//db.yugioh-card.com"] {
+
.mw-body-content a[href^="//db.yugioh-card.com"] {
 
background-image: url('https://yugipedia.com/wiki/Special:Redirect/file/Official_card_database_favicon.png');
 
background-image: url('https://yugipedia.com/wiki/Special:Redirect/file/Official_card_database_favicon.png');
 
}
 
}
div#content a[href^="http://www.yugioh.com/cards"],
+
.mw-body-content a[href^="http://www.yugioh.com/cards"],
div#content a[href^="https://www.yugioh.com/cards"],
+
.mw-body-content a[href^="https://www.yugioh.com/cards"],
div#content a[href^="//www.yugioh.com/cards"],
+
.mw-body-content a[href^="//www.yugioh.com/cards"],
div#content a[href^="http://yugioh.com/cards"],
+
.mw-body-content a[href^="http://yugioh.com/cards"],
div#content a[href^="https://yugioh.com/cards"],
+
.mw-body-content a[href^="https://yugioh.com/cards"],
div#content a[href^="//yugioh.com/cards"] {
+
.mw-body-content a[href^="//yugioh.com/cards"] {
 
background-image: url('https://yugipedia.com/wiki/Special:Redirect/file/Yugioh.com_anime_site_favicon.png');
 
background-image: url('https://yugipedia.com/wiki/Special:Redirect/file/Yugioh.com_anime_site_favicon.png');
 
padding-right: 16px;
 
padding-right: 16px;
 
}
 
}
 
 
/* links to Wikipedia */
 
/* links to Wikipedia */
div#content a[href^="http://en.wikipedia.org"],
+
.mw-body-content a[href^="http://en.wikipedia.org"],
div#content a[href^="https://en.wikipedia.org"],
+
.mw-body-content a[href^="https://en.wikipedia.org"],
div#content a[href^="//en.wikipedia.org"] {
+
.mw-body-content a[href^="//en.wikipedia.org"] {
    background-image: url(https://yugipedia.com/wiki/Special:Redirect/file/Wikipedia-favicon.png);
+
background: url(https://yugipedia.com/wiki/Special:Redirect/file/Wikipedia-favicon.png) no-repeat top right;
 +
background-size: .75em;
 +
padding-right: .8em;
 
}
 
}
/* interwiki links to wikipedia ([[wikipedia:Foobar]]) */
+
/* links to FANDOM/Wikia */
div#content a.extiw[href^="http://en.wikipedia.org"],
+
.mw-body-content a[href*="wikia.com"],
div#content a.extiw[href^="https://en.wikipedia.org"],
+
.mw-body-content a[href*="fandom.com"] {
div#content a.extiw[href^="//en.wikipedia.org"] {
+
background: url("https://yugipedia.com/wiki/Special:Redirect/file/Fandom favicon.png") no-repeat center right;
background-position: center right;
+
background-size: 16px;
    background-repeat: no-repeat;
+
padding-right: 18px;
    padding-right: 19px;
+
}
 +
/* Fix content jumping on top ad change. */
 +
div#content div#top-ad { /* can't be overwritten by anything! */
 +
height: 90px !important;
 
}
 
}
 
 
/* Fix bottom ad overlapping side bar. */
 
/* Fix bottom ad overlapping side bar. */
 
#bottom-ad {
 
#bottom-ad {
Line 636: Line 361:
 
margin-left: 11em
 
margin-left: 11em
 
}
 
}
 +
}
 +
/* Better center SiteNotice post-"Dismissable SiteNotice" installation */
 +
.sitedir-ltr .mw-dismissable-notice-body,
 +
.sitedir-rtl .mw-dismissable-notice-body {
 +
margin: 0;
 
}
 
}
 
/* </nowiki> */
 
/* </nowiki> */

Latest revision as of 21:10, 27 February 2024

/*<nowiki>
Some CSS is loaded via a default, hidden gadget:
* CSS from Wikimedia is in [[MediaWiki:Gadget-Wikimedia.css]]
* card table CSS is in [[MediaWiki:Gadget-Cardtable.css]]
Please keep this in mind when adding or looking for CSS.
*/
/** CSS placed here will be applied to all skins **/
/* Necessary for the ads. */
#footer, .minerva-footer {
	padding-bottom: 6em;
}
/* Remove serifs from headers. */
.mw-body h1, .mw-body-content h1, .mw-body-content h2 {
	font-family: sans-serif;
}
/* Floatable headers for tables */
/* based on https://css-tricks.com/position-sticky-and-table-headers/ */
table.floatable-header {
	position: relative;
	border-collapse: separate;
	border-spacing: 0;
}
.floatable-header th[scope="col"],
.floatable-header th[scope="colgroup"] {
	position: sticky;
	top: 0;
}
/* this is stupidly fragile, but it works... feel free to suggest better versions, though */
.floatable-header tr:nth-child(2) th[scope="col"],
.floatable-header tr:nth-child(2) th[scope="colgroup"] {
	top: 29px;
}
/* position:sticky does weird things to cell borders, so we have to reset them here */
/* I hate all of this; if anyone has better ideas, I'm all ears */
table.wikitable.floatable-header th,
table.wikitable.floatable-header td {
	border-style: none solid solid none;
}
/* the reset creates a double-thick border on the bottom and right edges of the table (only in Firefox?), so remove it here */
table.wikitable.floatable-header tr:last-child th,
table.wikitable.floatable-header tr:last-child td {
	border-bottom-style: none;
}
/* ...and *that* reset removes the bottom border of the header row on tables with a single header row, so restore *it* */
table.wikitable.floatable-header thead tr:last-child th,
table.wikitable.floatable-header thead tr:last-child td {
	border-bottom-style: solid;
}
table.wikitable.floatable-header th:last-child,
table.wikitable.floatable-header td:last-child {
	border-right-style: none;
}
/* fix borders in Edge (sometimes - see https://css-tricks.com/position-sticky-and-table-headers/#comment-1749745 ) */
@supports (-ms-ime-align: auto) {
	background-clip: padding-box;
}
/**********************************/
/** Card galleries and lists. */
/** TODO move to TemplateStyles */
/* Card gallery errors. */
.card-gallery__errors { color: red; }
/* Card gallery itself. */
.card-gallery__gallery {
	border-collapse: collapse;
	border: 1px solid #CCC;
	margin: 0.5em auto;
	text-align: center;
}
.card-gallery__gallery .mw-gallery-traditional {
	display: initial; /* In the odd case flex is not supported. */
	display: flex;
	justify-content: space-around; /* Because not all support the above. */
	justify-content: space-evenly;
	flex-wrap: wrap;
}
/** Lua reporter */
.reporter__warnings {
	color: darkgoldenrod;
	font-weight: bold;
}
.reporter__errors {
	color: red;
	font-weight: bold;
}
/** End possible temporary styles. */
/**********************************/
/* Card <gallery> styles. */
/* only used (?) on hardcoded gallery elements on Card Gallery pages */
.card-galleries { /* TODO: Cleanup after updating Module:Set gallery. */
	border-collapse: collapse;
	border: 1px solid #CCC;
	margin: 0.5em auto;
	text-align: center;
}
.card-galleries th {
	background-color: #337C97;
	color: #FFF;
	border: 1px solid #999;
	padding: 3px;
}
.card-galleries td {
	padding: 0;
	text-align: center;
}
.card-galleries ul.gallery {
	width: 100%;
	margin: 0;
	border: 0;
}
.card-galleries ul.gallery td {
	background-color: transparent;
}
.card-galleries ul.gallery .gallerybox {
	background-color: #F9F9F9;
	border: 1px solid #CCC;
	margin: 0 auto;
}
.card-galleries ul.gallery .gallerybox .thumb {
	background-color: transparent;
	border: 0;
	margin: 0 auto;
	padding: 10px 0 0 !important;
}
.card-galleries .thumb neutral,
.card-galleries .image lightbox,
.card-galleries .lightbox-caption {
	border: 0;
	background-color: transparent;
	white-space: normal;
	text-align: center;
	font-family: sans-serif;
	padding: 0;
}
.card-galleries .mw-gallery-traditional { /* TODO: Cleanup after updating Module:Set gallery */
	display: initial; /* In the odd case flex is not supported. */
	display: flex;
	justify-content: space-around; /* Because not all support the above. */
	justify-content: space-evenly;
	flex-wrap: wrap;
}
.thumb {
	display: flex;
	align-items: center;
	justify-content: center;
}
.noFile {
	word-break: break-word; /* Deprecated, but used here as fallback. */
	overflow-wrap: anywhere; /* Fairly recent. */
}
/* Card lists */
/* TODO: Move to TemplateStyles */
/* the mw-datatable class offers row highlighting on hover as well, but doesn't seem to interact nicely with SMW queries
   and is also Vector desktop-specific (see e.g. [[mwphab:T287997]]) */
.card-list {
	width: 100%;
	clear: both;
}
.card-list tr th[colspan], .card-list caption {
	padding: 3px;
	border: 1px solid #CCC;
	border-bottom: 0;
}
.card-list tr:hover th[scope=row], .card-list tr:hover th[scope=rowgroup], .card-list tr:hover td {
	background-color: #EEE;
}
/* .wikitable has a 1em bottom margin that appears in Tabbers
   say, for example, if it's used to implement set lists which are then transcluded onto set pages, in a Tabber */
.tabber .set-list .wikitable {
	margin-bottom: 0;
}

/* hide some stuff on rollback/mover requests pages */
.page-Yu-Gi-Oh_Requests_for_rollback_requests #wpSummary,
.page-Yu-Gi-Oh_Requests_for_rollback_requests #wpSummaryLabel,
.page-Yu-Gi-Oh_Requests_for_mover_requests #wpSummary,
.page-Yu-Gi-Oh_Requests_for_mover_requests #wpSummaryLabel {
	display: none;
}
/* Infoboxes */
body {
    --bg-color-infobox: #f8f9fa;
    --bg-color-infobox-caption: #bbf;
    --bg-color-infobox-heading: #ccf;
    --bg-color-infobox-label: #ddf;
    --bg-color-infobox-sublabel: #eef;
    --border-color-infobox: #a2a9b1;
    --color-infobox: #222;
}
.infobox {
    background-color: var(--bg-color-infobox);
    border-color: var(--border-color-infobox);
    color: var(--color-infobox);
}
.infobox-yugipedia caption {
    background-color: var(--bg-color-infobox-caption);
    border-color: var(--border-color-infobox);
}
.infobox-yugipedia th {
    background-color: var(--bg-color-infobox-heading);
}
.infobox-yugipedia th[scope="row"],
.infobox-yugipedia .collapsible th,
.infobox-yugipedia .infobox-subheading {
    background-color: var(--bg-color-infobox-label);
}
.infobox-yugipedia .collapsible th[scope="row"] {
    background-color: var(--bg-color-infobox-sublabel);
}
/* Need to deprecate this */
.infobox-subheading {
	font-weight: bold;
}
/* Indentation to mark beginning of list items in infoboxes */
.infobox td ul {
	margin: 0;
}
.infobox td li {
	list-style: none;
}

/* hlist varieties: comma, slash, plus, minus, pipe */
/* the doubled ".hlist" selector is necessary to work around specificity of other stuff */
.hlist.hlist.hcomma dd:not(:last-child)::after,
.hlist.hlist.hcomma li:not(:last-child)::after {
	content: ",\20";
	font-weight: normal;
}
.hlist.hlist.hslash dd:not(:last-child)::after,
.hlist.hlist.hslash li:not(:last-child)::after {
	content: " / ";
	font-weight: normal;
}
.hlist.hlist.hplus dd:not(:last-child)::after,
.hlist.hlist.hplus li:not(:last-child)::after {
	content: " + ";
	font-weight: normal;
}
.hlist.hlist.hplus dd:not(:last-child):lang(ja)::after,
.hlist.hlist.hplus li:not(:last-child):lang(ja)::after {
	content: "+";
}
.hlist.hlist.hminus dd:not(:last-child)::after,
.hlist.hlist.hminus li:not(:last-child)::after,
.hlist.hlist.hdash dd:not(:last-child)::after,
.hlist.hlist.hdash li:not(:last-child)::after {
	content: " - ";
	font-weight: normal;
}
.hlist.hlist.hminus dd:not(:last-child):lang(ja)::after,
.hlist.hlist.hminus li:not(:last-child):lang(ja)::after,
.hlist.hlist.hdash dd:not(:last-child):lang(ja)::after,
.hlist.hlist.hdash li:not(:last-child):lang(ja)::after{
	content: " - ";
}
.hlist.hlist.hpipe dd:not(:last-child)::after,
.hlist.hlist.hpipe li:not(:last-child)::after {
	content: " | ";
	font-weight: normal;
}
/* Tabber stuff:
	* background
	* smaller text in tabs when there are too many
	* even smaller text
*/
.tabbertab {
	background-color: #FFF;
}
.smalltabs .tabbernav {
	font-size: .625rem;
}
.smallertabs .tabbernav {
	font-size: .5625rem;
}
/* prev/next navigation */
.nav-prev {
	float: left;
	text-align: left;
}
.nav-prev li::before {
	content: "← ";
}
.nav-next {
	float: right;
	text-align: right;
}
.nav-next li::after {
	content: " →";
}
/* hide content in non-mobile devices
   to hide content on mobile devices, use the "nomobile" class */
.mobile-show {
	display: none;
}
/* If JavaScript is enabled, hide image switcher links, until after the script has loaded. */
.client-js .image-switcher {
	visibility: hidden;
}
/* most editors don't need to worry about semantic annotations,
   and we don't want them being added directly to articles anyways */
.smw-editpage-help {
	display: none;
}
/* make image thumbnail borders transparent so they don't look horrible on colored backgrounds */
div.thumb {
	border: transparent;
}
/* redirects in special pages (e.g. Special:AllPages) */
.allpagesredirect a {
	background: url('data:image/gif;base64,R0lGODlhCgAKAKL/AP///4ODg4MAAAAAAMDAwAAAAAAAAAAAACH5BAEAAAQALAAAAAAKAAoAQAMTSLrc8ks0Jqeq5GE8uYuOJnZMAgA7') center left no-repeat;
	padding-left: 13px;
}
/* Adjust the word breaking for fullwidth text */
:lang(ja-Latn),
:lang(ko-Latn),
:lang(zh-Latn) {
	word-break: keep-all;
}
/* links to official websites */
.mw-body-content a[href^="http://www.db.yugioh-card.com"],
.mw-body-content a[href^="https://www.db.yugioh-card.com"],
.mw-body-content a[href^="//www.db.yugioh-card.com"],
.mw-body-content a[href^="http://db.yugioh-card.com"],
.mw-body-content a[href^="https://db.yugioh-card.com"],
.mw-body-content a[href^="//db.yugioh-card.com"] {
	background-image: url('https://yugipedia.com/wiki/Special:Redirect/file/Official_card_database_favicon.png');
}
.mw-body-content a[href^="http://www.yugioh.com/cards"],
.mw-body-content a[href^="https://www.yugioh.com/cards"],
.mw-body-content a[href^="//www.yugioh.com/cards"],
.mw-body-content a[href^="http://yugioh.com/cards"],
.mw-body-content a[href^="https://yugioh.com/cards"],
.mw-body-content a[href^="//yugioh.com/cards"] {
	background-image: url('https://yugipedia.com/wiki/Special:Redirect/file/Yugioh.com_anime_site_favicon.png');
	padding-right: 16px;
}
/* links to Wikipedia */
.mw-body-content a[href^="http://en.wikipedia.org"],
.mw-body-content a[href^="https://en.wikipedia.org"],
.mw-body-content a[href^="//en.wikipedia.org"] {
	background: url(https://yugipedia.com/wiki/Special:Redirect/file/Wikipedia-favicon.png) no-repeat top right;
	background-size: .75em;
	padding-right: .8em;
}
/* links to FANDOM/Wikia */
.mw-body-content a[href*="wikia.com"],
.mw-body-content a[href*="fandom.com"] {
	background: url("https://yugipedia.com/wiki/Special:Redirect/file/Fandom favicon.png") no-repeat center right;
	background-size: 16px;
	padding-right: 18px;
}
/* Fix content jumping on top ad change. */
div#content div#top-ad { /* can't be overwritten by anything! */
	height: 90px !important;
}
/* Fix bottom ad overlapping side bar. */
#bottom-ad {
	margin-left: 10em;
}
@media screen and (min-width: 982px) {
	#bottom-ad {
		margin-left: 11em
	}
}
/* Better center SiteNotice post-"Dismissable SiteNotice" installation */
.sitedir-ltr .mw-dismissable-notice-body,
.sitedir-rtl .mw-dismissable-notice-body {
	margin: 0;
}
/* </nowiki> */