MannedTooth (talk | contribs) No edit summary |
MannedTooth (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
/* Template:Tab2 */ |
/* Template:Tab2 */ |
||
/* centering image in {{Media}} for infoboxes */ |
/* centering image in {{Media}} for infoboxes */ |
||
− | div.media-template div.tabcontents.vertical-centered-content > div.content > figure |
+ | div.media-template div.tabcontents.vertical-centered-content > div.content > figure { |
position: relative; |
position: relative; |
||
top: 50%; |
top: 50%; |
Revision as of 07:00, 24 December 2020
/* General styles */
.no-mobile {
display: none;
}
/* Infoboxes */
/* INFOBOXES */
table.infobox {
padding: 5px;
border-radius: var(--roundy-border-radius);
}
table.infobox tr.infobox-field td div.infobox-field-content {
max-height: 175px;
overflow: auto;
}
/* Template:Tab2 */
/* centering image in {{Media}} for infoboxes */
div.media-template div.tabcontents.vertical-centered-content > div.content > figure {
position: relative;
top: 50%;
transform: translateY(-50%);
}
/* General notes:
* The classes here are applied by JS and Lua scripts at MediaWiki:Gadget-Tabs.js and Module:UtilsLayout/Tabs, respectively.
*
* The > selector is used here to account for the possibility of tabs nested within tabs (e.g. Template:Media)
* The different tab containers may have different styling options set,
* so it's important that styles are only applied to direct children rather than all descendants
*/
.tabcontainer {
display: flex;
flex-wrap: wrap;
}
.tabcontainer--align-x-center {
justify-content: center;
}
.tabcontainer--stretch > .tab {
flex: 1 0 0;
}
.tabcontainer--columns > .tab {
flex: 1 0 100%;
}
.tabcontainer-top {
margin-top: 4px;
margin-bottom: 8px;
}
.tabcontainer-bottom {
margin-top: 8px;
margin-bottom: 4px;
}
.tab {
min-width: fit-content;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
}
.tab--label-align-y-bottom {
align-items: flex-end;
}
.tabcontents > .content {
display: none;
}
.tabcontents > .content.content--active {
display: block;
}
.tabcontents--align-x-center {
margin: 0 auto;
}
.tabcontents--align-x-center > .content {
text-align: center;
}
.tabcontents--align-x-right {
margin-left: auto;
}
.tabcontents--align-x-right > .content {
text-align: right;
}
/* No need to add class for top vertical alignment because "start" is the default CSS value for align-self */
.tabcontents--align-y-center > .content {
align-self: center;
}
.tabcontents--align-y-bottom > .content {
align-self: end;
}
/* The idea behind fixed width/height is to overlap all the images one over the other,
* so that the container takes on the width/height of the largest tab.
*/
.tabcontents--fixed-width, .tabcontents--fixed-height {
display: grid;
grid-template-columns: 1fr;
}
.tabcontents--fixed-width > .content, .tabcontents--fixed-height > .content {
display: block;
grid-row: 1;
grid-column: 1;
}
.tabcontents--fixed-width > .content:not(.content--active), .tabcontents--fixed-height > .content:not(.content--active) {
visibility: hidden;
}
.tabcontents--fixed-width:not(.tabcontents--fixed-height) > .content:not(.content--active) {
height: 0;
}
.tabcontents--fixed-height:not(.tabcontents--fixed-width) > .content:not(.content--active) {
width: 0;
}
.tabcontainer .tab.explain { /* See MediaWiki:Gadget-Tooltips */
text-decoration: none;
float: none;
}
/* Template:Main Page Games */
div.game-container {
margin: 0 auto;
display: flex;
flex-flow: row wrap;
justify-content: center;
}
div.game-container div.game {
width: 100%;
height: 150px;
margin: 0 0 14px 0;
overflow: hidden;
display: inline-block;
position: relative;
font-size: 0;
}
div.game-container div.game span.year {
bottom: 12px;
right: 16px;
left: auto;
color: rgba(255, 255, 255, 0.9);
position: absolute;
font-size: 12px;
z-index: 10;
}
div.game-container div.game > a {
width: 100%;
height: 100%;
text-align: left;
box-sizing: border-box;
padding: 5%;
justify-content: flex-start;
clip: auto;
box-shadow: inset rgba(255, 255, 255, 0.1) 0 0 0 1px;
z-index: 1;
font-style: normal;
color: rgba(255, 255, 255, 0.9);
position: absolute;
line-height: 29px;
font-size: 25px;
text-decoration: none;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
flex-direction: column;
}
div.game-container div.game img {
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
vertical-align: middle;
}