Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
       🚧 True to our name, we’re still a work in progress. 🚧
   
       You’re welcome to explore, but account registration is currently invite-only as we finalize the setup. 
       Join our forum or follow Mastodon for updates. 
       Full Wiki launch coming soon!
   

Template:ProjectMeta/styles.css: Difference between revisions

Template page
No edit summary
m Anthony moved page Template:ProjectInfobox/styles.css to Template:ProjectMeta/styles.css without leaving a redirect
(No difference)

Revision as of 00:11, 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);
}

/* ── Status & license badges ──────────────────────────────────────────────────
   These must live here (not only in ProjectCard/styles.css) so they load on
   individual project pages where ProjectCard is never included.
   ───────────────────────────────────────────────────────────────────────────*/
.project-badge-status {
    display: inline-block;
    font-size: 0.72em;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.project-badge-status--active    { background-color: rgba(40,  167,  69, 0.15); color: #28a745; }
.project-badge-status--hiatus    { background-color: rgba(255, 193,   7, 0.20); color: #b8860b; }
.project-badge-status--completed { background-color: rgba(52,  101, 164, 0.15); color: var(--wiki-secondary); }
.project-badge-status--abandoned { background-color: rgba(108, 117, 125, 0.15); color: #6c757d; }

.project-badge-license {
    display: inline-block;
    font-size: 0.72em;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    background-color: var(--color-surface-2);
    border: 1px solid var(--border-color-base);
    color: var(--color-base--subtle);
}

/* ── 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;
    }
}