MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
Created page with "→CSS placed here will be applied to all skins: .portable-infobox { float: right; clear: right; margin: 0 0 1em 1em; padding: 0.5em; width: 300px; background-color: #1e2a35; border: 1px solid #444; font-size: 0.9em; } .pi-title { text-align: center; font-size: 1.2em; font-weight: bold; padding: 0.5em; background-color: #2a3f52; } .pi-image img { width: 100%; height: auto; } .pi-header { background-col..." |
No edit summary |
||
| Line 46: | Line 46: | ||
.pi-data-value { | .pi-data-value { | ||
flex: 1; | flex: 1; | ||
} | |||
/* Main table */ | |||
table.wikitable { | |||
width: 100%; | |||
border-collapse: collapse; | |||
background-color: #1e2a35; | |||
border: 1px solid #444; | |||
} | |||
/* Header row */ | |||
table.wikitable th { | |||
background-color: #2a3f52; | |||
color: #e8e8e8; | |||
padding: 0.5em 1em; | |||
border: 1px solid #444; | |||
text-align: left; | |||
} | |||
/* Data cells */ | |||
table.wikitable td { | |||
padding: 0.4em 1em; | |||
border: 1px solid #444; | |||
color: #e8e8e8; | |||
} | |||
/* Alternating rows */ | |||
table.wikitable tr:nth-child(even) { | |||
background-color: #243040; | |||
} | |||
table.wikitable tr:hover { | |||
background-color: #2f4255; | |||
} | |||
@media screen and (max-width: 768px) { | |||
table.wikitable thead { | |||
display: none; | |||
} | |||
table.wikitable tr { | |||
display: block; | |||
margin-bottom: 1em; | |||
border: 1px solid #444; | |||
} | |||
table.wikitable td { | |||
display: block; | |||
text-align: right; | |||
padding-left: 50%; | |||
position: relative; | |||
border: none; | |||
border-bottom: 1px solid #444; | |||
} | |||
table.wikitable td::before { | |||
content: attr(data-label); | |||
position: absolute; | |||
left: 0.5em; | |||
font-weight: bold; | |||
text-align: left; | |||
} | |||
} | } | ||
Revision as of 14:27, 15 March 2026
/* CSS placed here will be applied to all skins */
.portable-infobox {
float: right;
clear: right;
margin: 0 0 1em 1em;
padding: 0.5em;
width: 300px;
background-color: #1e2a35;
border: 1px solid #444;
font-size: 0.9em;
}
.pi-title {
text-align: center;
font-size: 1.2em;
font-weight: bold;
padding: 0.5em;
background-color: #2a3f52;
}
.pi-image img {
width: 100%;
height: auto;
}
.pi-header {
background-color: #2a3f52;
padding: 0.3em 0.5em;
font-weight: bold;
text-align: center;
}
.pi-data {
display: flex;
padding: 0.3em 0.5em;
border-top: 1px solid #444;
}
.pi-data-label {
flex: 0 0 40%;
font-weight: bold;
color: #aaa;
}
.pi-data-value {
flex: 1;
}
/* Main table */
table.wikitable {
width: 100%;
border-collapse: collapse;
background-color: #1e2a35;
border: 1px solid #444;
}
/* Header row */
table.wikitable th {
background-color: #2a3f52;
color: #e8e8e8;
padding: 0.5em 1em;
border: 1px solid #444;
text-align: left;
}
/* Data cells */
table.wikitable td {
padding: 0.4em 1em;
border: 1px solid #444;
color: #e8e8e8;
}
/* Alternating rows */
table.wikitable tr:nth-child(even) {
background-color: #243040;
}
table.wikitable tr:hover {
background-color: #2f4255;
}
@media screen and (max-width: 768px) {
table.wikitable thead {
display: none;
}
table.wikitable tr {
display: block;
margin-bottom: 1em;
border: 1px solid #444;
}
table.wikitable td {
display: block;
text-align: right;
padding-left: 50%;
position: relative;
border: none;
border-bottom: 1px solid #444;
}
table.wikitable td::before {
content: attr(data-label);
position: absolute;
left: 0.5em;
font-weight: bold;
text-align: left;
}
}