MediaWiki:Vector.less/infobox.less
< MediaWiki:Vector.less
Jump to navigation
Jump to search
Revision as of 22:43, 4 October 2022 by Jacmob (talk | contribs) (Created page with "// <pre> →==================== infoboxes ====================: .infobox { background: @infobox-background; border: 1px solid @infobox-border-color; font-size: .85em; width: 300px; // fixed size so image always fills entire width margin: .5em 0 1em 1em; border-collapse: collapse; box-shadow: @box-shadow; float: right; table-layout: fixed; word-break: break-word; .infobox-header { color: var(--infobox-text...")
//
/* ====================
infoboxes
==================== */
.infobox {
background: @infobox-background;
border: 1px solid @infobox-border-color;
font-size: .85em;
width: 300px; // fixed size so image always fills entire width
margin: .5em 0 1em 1em;
border-collapse: collapse;
box-shadow: @box-shadow;
float: right;
table-layout: fixed;
word-break: break-word;
.infobox-header {
color: var(--infobox-text-color);
font-size: 1.15em;
line-height: 1.4em;
background: @infobox-header-color;
padding: .5em 0;
white-space: normal;
a {
color: var(--infobox-text-color);
font-size: 1.15em;
font-weight: bold;
}
}
.infobox-subheader {
background: @infobox-subheader-color;
color: var(--infobox-text-color);
line-height: 2em;
a {
color: var(--infobox-text-color);
}
&+.infobox-subheader {
border-left: 2px solid @BODY_LIGHT;
}
}
.infobox-image {
text-align: center;
// for inventory icon in infobox item
&.inventory-image {
height: 32px; // functions as min-height
}
// keep infobox images from sticking together
a.image + a.image {
margin-left: .1em;
}
img {
max-width: 300px;
height: auto;
}
}
// browsers get your shit together https://caniuse.com/#feat=css-not-sel-list
th:not(.infobox-header):not(.infobox-subheader):not(.infobox-nested) {
text-align: right;
vertical-align: top;
border-right: 2px solid @infobox-subheader-color;
padding: 0.2em 0.5em;
}
th {
white-space: nowrap;
}
td {
padding: 0.25em 0.5em;
line-height: 1.6em;
&.infobox-nested {
padding: 0.25em 0;
line-height: 1em;
}
}
.infobox-padding {
height: 0.5em;
padding: 0;
border: 0;
}
.infobox-nested {
text-align: center;
&+.infobox-nested {
border-left: 2px solid @infobox-subheader-color;
}
}
.infobox-cell-hidden {
display: none;
}
.infobox-template-links {
text-align: center;
}
.infobox-full-width-content {
max-width: 300px;
text-align: center;
overflow: hidden;
padding: 0;
}
.infobox-caption {
font-weight: bold;
}
&.skill-info {
float: none;
margin: 1em 0;
}
.infobox-media-player {
// ui will be hidden otherwise
overflow: visible;
}
}
/* =============================
infobox-specific styles
============================= */
.infobox-item {
th {
width: 75px;
}
.infobox-image {
.pixelate()
}
}
.infobox-bonuses {
clear: left;
float: none;
word-break: break-word;
font-size: 100%;
.infobox-bonuses-image {
width: 125px;
text-align: center;
vertical-align: middle;
border: 1px solid @infobox-border-color;
}
.infobox-bonuses-image-caption {
font-size: 0.85em;
}
.infobox-subheader {
width: 250px;
}
a {
font-weight: bold;
}
}
// (dirty trick) Hide a silly bug in switch infoboxes:
// switching between versions where there is a Quantity box followed by text will cause the text to be duplicated on switch
// This currently only occurs where the text consists of "? (edit)" links, so hiding consecutive edit links works to hide this
// This should ideally be fixed for real though, instead of just hiding it.
.skill-info a[href$="?action=edit"] + a[href$="?action=edit"] {
display: none;
}
// Infobox Room door layout
.poh-room {
background-color: var(--infobox-room-poh-color);
margin: auto;
width: 100px;
img {
display: block;
}
}
.poh-room-row {
display: flex;
}
.poh-room-text {
margin: auto;
width: 92px;
}
// [view] and [talk] links
.infobox-bottom-links {
clear: right;
float: right;
font-size: xx-small;
margin-top: -1.5em;
}
// switch infobox buttons
.infobox-buttons {
text-align: center;
max-width: 300px;
display: none;
.button {
margin: 0 3px;
}
}
.infobox-switch-resources {
display: none;
}
/* infobox bonuses switch buttons */
.switch-infobox {
.switch-infobox-triggers,
.loading-button {
clear: left;
}
}
/* Infobox Pure max hit items */
.infobox-pure .max-hit-list {
list-style: none;
margin-left: 0;
a {
display: inline-block;
min-width: 32px;
min-height: 32px;
text-align: center;
}
}
// Hides advanced data. Class gets replaced by .advanced-data-display
// if the showAdvancedData gadget is enabled.
.advanced-data {
display: none;
}
// Template:Multi Infobox styles
.multi-infobox {
float: right;
margin-left: 5px;
.tabber {
margin: 0;
.tabbernav {
text-align: center;
margin: 0;
a {
padding: 0.5em 0.8em;
}
}
.tabbertab {
padding: 5px;
}
}
.infobox {
margin: 0;
}
}
/*
The following styles were used as a temporary fix for TabberNeue.
We're currently using old Tabber because TabberNeue breaks if a tab
dynamically changes size, such as multi-infobox.
*/
/*
.multi-infobox {
float: right;
.infobox {
margin: 0;
}
.tabber__header {
justify-content: center;
font: bold 12px Verdana,sans-serif;
}
.tabber__tab {
padding: 0.5em 0.8em;
}
.tabber__panel {
padding: 0;
}
.tabber__panel--active {
padding: 5px;
}
// fade scroll hack
.tabber__panel::after {
content: ;
display: block;
position: absolute;
background-image: var(--tabber-fade-scroll);
height: 30px;
width: 300px;
bottom: 0;
right: 6px;
pointer-events: none;
}
}*/