Template:Infobox/styles.css
来自互联网一战博物馆
/* [[Category:模板样式]] */
/* [[lzh:Template:Infobox/styles.css]] */
.notaninfobox {
position: relative;
clear: right;
margin: 0 0 1em 1em;
width: 300px;
font-size: 90%;
float: right;
border: 1px solid black;
padding: 2px;
overflow: auto;
z-index: 1;
overflow-wrap: anywhere;
}
@media all and (max-width: 511px) {
.notaninfobox {
float: none;
margin-left: 0;
width: auto;
}
}
@media all and (max-width: 337px) {
.notaninfobox {
margin-left: -16px;
margin-right: -16px;
border-left: none;
border-right: none;
}
}
.notaninfobox > .infobox-title {
font-weight: bold;
text-align: center;
font-size: 120%;
border: none;
}
.infobox-imagearea {
text-align: center;
padding: 4px;
}
.infobox-imagearea > div:not(:first-child) {
padding-top: 1em;
}
/* Horizontally centre animated images */
.infobox-imagearea .animated {
display: inline-flex;
align-items: center;
}
.notaninfobox .infobox-rows {
display: grid;
grid-template-columns: max-content 1fr;
gap: 1px;
}
.notaninfobox .infobox-rows .infobox-row {
display: contents;
}
.notaninfobox .infobox-row .infobox-row-label,
.notaninfobox .infobox-row .infobox-row-field {
padding: 4px;
}
.notaninfobox .infobox-row .infobox-row-label {
font-weight: bold;
display: flex;
align-items: center;
}
.notaninfobox .infobox-rows .infobox-row:nth-child(2n) .infobox-row-label,
.notaninfobox .infobox-rows .infobox-row:nth-child(2n) .infobox-row-field {
background-color: var(--border-color);
}
/* Infoboxes with tabber */
.tabber-container-infobox .tabber .tabbertab,
.tabber-container-infobox ul.tabbernav li a,
.tabber-container-infobox ul.tabbernav li.tabberactive a {
background: none;
border: none;
}
.tabber-container-infobox .tabber .tabbertab {
padding: 0;
}
.tabber-container-infobox ul.tabbernav {
font: inherit;
font-size: 100%;
}
.tabber-container-infobox ul.tabbernav li a:hover {
color: #000;
}
.tabber-container-infobox ul.tabbernav > li {
margin-bottom: 5px;
padding: 0;
}
.tabber-container-infobox ul.tabbernav > li > a {
color: #595959;
padding-bottom: 1px;
display: block;
}
/* To prevent the tabs from jumping around when they become active or inactive
* due to the font-weight changing from normal to bold and vice versa, add an
* invisible ::before which contains the same text as the tab's text, but
* bolded. This way the element in which unbolded text sits is sized according
* to the bolded text, preventing it from resizing upon being selected.
*/
.tabber-container-infobox ul.tabbernav > li > a::before {
display: block;
content: attr(alt);
font-weight: bold;
height: 0;
color: transparent;
overflow: hidden;
visibility: hidden;
}
.tabber-container-infobox ul.tabbernav > li.tabberactive {
border: none;
}
.tabber-container-infobox ul.tabbernav > li.tabberactive > a {
font-weight: bold;
color: var(--link-color);
border-bottom: 2px solid var(--border-color);
}
.infobox-rows p {
margin: 0;
}
/* Merge adjacent dls in the infobox, since they're usually supposed to be one,
* but the wiki screws up sometimes.
*/
.infobox-rows dl + dl {
margin-top: -0.4em;
}
.infobox-rows dl:last-child {
margin-bottom: 0.2em;
}
.infobox-footer {
text-align: center;
}