MediaWiki:Minerva.less/infobox.less
< MediaWiki:Minerva.less
Перейти к навигации
Перейти к поиску
Версия от 22:54, 26 марта 2023; GodSatanist (обсуждение | вклад) (Новая страница: «// <pre> →==================== infoboxes ====================: :root { --infobox-background: @white; --infobox-header-color: #444444; --infobox-header-text-color: @white; --infobox-border-color: #eeeeee; --infobox-subheader-color: #eeeeee; --infobox-subheader-text-color: #36414f; } .infobox { font-size: 85%; background-color: var(--infobox-background); border: 1px solid var(--infobox-border-color); box-...»)
// <pre>
/* ====================
infoboxes
==================== */
:root {
--infobox-background: @white;
--infobox-header-color: #444444;
--infobox-header-text-color: @white;
--infobox-border-color: #eeeeee;
--infobox-subheader-color: #eeeeee;
--infobox-subheader-text-color: #36414f;
}
.infobox {
font-size: 85%;
background-color: var(--infobox-background);
border: 1px solid var(--infobox-border-color);
box-shadow: @box-shadow;
table-layout: fixed;
// override defaults
// our infoboxes shouldn't be scrollable anyway
.content & {
display: table;
caption {
display: table-caption;
}
}
.infobox-header {
color: var(--infobox-header-text-color);
font-size: 1.15em;
background: var(--infobox-header-color);
padding: .5em 0;
text-align: center;
}
.infobox-subheader {
background: var(--infobox-subheader-color);
line-height: 2em;
text-align: center;
a {
color: var(--infobox-subheader-text-color);
}
}
th:not(.infobox-nested):not(.infobox-subheader):not(.infobox-header) {
text-align: right;
vertical-align: top;
border-right: .175em solid var(--infobox-subheader-color);
padding: 0.2em 0.5em;
}
caption.infobox-caption {
text-align: center;
}
td {
padding: 0.25em 0.5em;
line-height: 1.6em;
padding-bottom: .6em;
&.infobox-nested {
padding: 0.25em 0;
line-height: 1em;
}
}
.infobox-padding {
height: 0.5em;
padding: 0;
border: 0;
}
.infobox-image {
text-align: center;
// for inventory icon in infobox item
&.inventory-image {
height: 32px; // functions as min-height
}
}
.infobox-nested {
text-align: center;
&+.infobox-nested {
border-left: 0.175em solid var(--infobox-subheader-color);
}
}
.infobox-full-width-content {
max-width: 300px;
text-align: center;
overflow-x: hidden;
padding: 0;
}
}
// (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-bonuses {
float: none;
table-layout: fixed;
font-size: 100%;
// revert gadget display: table; to allow
// table to be scrollable
table.infobox-switch& {
display: block !important;
}
// this infobox should be scrollable
.content & {
display: block;
}
tbody {
border: 1px solid var(--infobox-border-color);
}
.infobox-bonuses-image {
text-align: center;
vertical-align: middle;
border: 1px solid var(--infobox-border-color);
}
.infobox-bonuses-image-caption {
font-size: 0.85em;
}
.infobox-subheader {
background: var(--infobox-subheader-color);
color: var(--infobox-header-text-color);
line-height: 2em;
border-top: none;
border-bottom: none;
a {
color: var(--infobox-header-text-color);
}
&+.infobox-subheader {
border-left: 0.175em solid var(--infobox-border-color);
}
}
a {
font-weight: bold;
}
}
.infobox-buttons {
margin-top: 0.5em;
text-align: center;
}
.infobox-bottom-links {
display: none;
}
// Hides advanced data. Class gets replaced by .advanced-data-display
// if the showAdvancedData gadget is enabled.
.advanced-data {
display: none;
}
@media screen and (min-width: 720px) {
.content table.infobox {
float: right;
margin-top: 0.5em;
margin-left: 1em;
width: 300px !important; // Needed to compete with !important for .content table
&.skill-info {
float: none;
margin: 0 0 1em 0;
}
&.infobox-bonuses {
display: table;
float: none;
margin: 0;
width: 100% !important;
max-width: 600px;
}
}
}
// [[Template:Multi Infobox]] styles
.multi-infobox {
margin-top: 0.5em;
margin-bottom: 2.5em;
.tabber {
margin: 0;
.tabbernav {
text-align: center;
margin-left: 0;
}
// extra specific to override base style
.mw-body & .tabbertab {
padding: 5px;
}
}
table.infobox {
margin: 0;
}
.infobox-buttons {
margin-top: 0;
}
}
@media screen and (min-width: 720px) {
.multi-infobox {
float: right;
margin-left: 1em;
width: 300px;
}
}