Template:ProjectMeta/styles.css: Difference between revisions
Template page
More actions
m Anthony moved page Template:ProjectInfobox/styles.css to Template:ProjectMeta/styles.css without leaving a redirect |
Removed status & license badge (refactored to its own "Template:ProjectBadges/styles.css") Β |
||
| Line 103: | Line 103: | ||
Β Β Β border-top: 1px solid; | Β Β Β border-top: 1px solid; | ||
Β Β Β border-top-color: var(--border-color-base); | Β Β Β border-top-color: var(--border-color-base); | ||
} | } | ||
Latest revision as of 00:13, 3 April 2026
/* Template:ProjectInfobox/styles.css */
.project-infobox {
float: right;
clear: right;
width: 280px;
background-color: var(--color-surface-1);
border: 1px solid;
border-top-color: var(--border-color-base);
border-right-color: var(--border-color-base);
border-bottom-color: var(--border-color-base);
border-left-color: var(--border-color-base);
border-radius: 4px;
overflow: hidden;
margin: 0 0 16px 24px;
font-size: 0.9em;
box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
/* ββ Image container ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Fixed at 280Γ280px to match the infobox width β always a perfect square.
overflow:hidden clips anything outside the box.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ*/
.project-infobox-image {
width: 100%;
height: 280px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--color-surface-2);
border-bottom: 1px solid;
border-bottom-color: var(--border-color-base);
}
/* ββ Image element ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
object-fit:cover scales the image to fill the square without stretching.
object-position:center top anchors to the top of the image so the most
important part of artwork or portraits is visible.
width/height:100% ensures the image fills the container fully.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ*/
.project-infobox-image img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
object-position: center top;
}
.project-infobox-image-fallback {
padding: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.project-infobox-title {
font-weight: bold;
font-size: 1.1em;
padding: 10px 14px 6px;
color: var(--color-base);
text-align: center;
}
.project-infobox-badges {
display: flex;
flex-wrap: wrap;
gap: 5px;
padding: 0 14px 10px;
justify-content: center;
}
.project-infobox-table {
width: 100%;
border-collapse: collapse;
font-size: 0.92em;
}
.project-infobox-table tr {
border-top: 1px solid;
border-top-color: var(--border-color-base);
}
.project-infobox-table th {
padding: 6px 10px 6px 14px;
font-weight: bold;
color: var(--color-base--subtle);
text-align: left;
white-space: nowrap;
width: 40%;
background-color: var(--color-surface-2);
}
.project-infobox-table td {
padding: 6px 14px 6px 10px;
color: var(--color-base);
}
.project-infobox-tags {
display: flex;
flex-wrap: wrap;
gap: 4px;
padding: 10px 14px;
border-top: 1px solid;
border-top-color: var(--border-color-base);
}
/* ββ Suppress parser-injected paragraphs βββββββββββββββββββββββββββββββββββββ
MediaWiki's parser injects <p><br></p> before <table> when it follows a
</div> in template context. There is no wikitext workaround β hiding it
in CSS is the correct solution.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ*/
.project-infobox > p {
display: none;
margin: 0;
padding: 0;
}
/* ββ Mobile Screen InfoBox Push Text below βββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ*/
@media screen and (max-width: 480px) {
.project-infobox {
float: none;
clear: both;
width: 100%;
margin: 0 0 16px 0;
box-sizing: border-box;
}
.project-infobox-image {
height: auto;
max-height: 280px;
}
}