Jump to content

MediaWiki:Vector-2022.css: Difference between revisions

From Zenith
No edit summary
No edit summary
Line 1: Line 1:
/* ==========================================================================
/* Wikipedia-like PortableInfobox styling for Vector 2022 */
  PortableInfobox - Exact Wikipedia Vector (2022) Match
#mw-content-text .portable-infobox {
  ========================================================================== */
    box-sizing: border-box;
    float: right;
    clear: right;
    width: 22em;
    max-width: 100%;
    margin: 0.5em 0 1em 1em;
    padding: 0.2em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    color: #202122;
    font-size: 88%;
    line-height: 1.5;
}
 
/* Title */
#mw-content-text .portable-infobox .pi-title {
    margin: 0;
    padding: 0.2em;
    background: transparent;
    color: inherit;
    font-size: 1.25em;
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
}


.portable-infobox {
/* Section headings */
    /* Precise Design Tokens from en.wikipedia.org */
#mw-content-text .portable-infobox .pi-header {
    --pi-background: #f8f9fa !important;             /* Wikipedia off-white body background */
    padding: 0.2em;
     --pi-secondary-background: transparent !important; /* No default dark title/header boxes */
     background: #eaecf0;
     --pi-border-color: #a2a9b1 !important;           /* Standard MediaWiki UI gray border */
     color: inherit;
     --pi-text-color: #202122 !important;             /* Standard body text color */
     font-weight: bold;
     --pi-header-text-color: #000000 !important;
     text-align: center;
}


    /* Structural Framework */
/* Data rows and labels */
    font-family: sans-serif !important;
#mw-content-text .portable-infobox .pi-data {
    font-size: 88% !important;                      /* Wikipedia standard metadata text scaling */
     display: grid;
    line-height: 1.5em !important;
     grid-template-columns: minmax(7em, 1fr) minmax(0, 2fr);
    width: 22em !important;                          /* Fixed desktop width specification */
     gap: 0.2em 0.5em;
     float: right !important;
     padding: 0.2em;
     clear: right !important;
     border: 0;
     margin: 0.5em 0 1em 1.4em !important;
     background: transparent;
     padding: 0.4em !important;                       /* Inner padding frame */
   
    /* Flattening Fandom Styles to Native Tables */
     border: 1px solid var(--pi-border-color) !important;
    border-radius: 0px !important;                  /* Strictly sharp corners, no rounded edges */
    box-shadow: none !important;                    /* Removes card-style drop shadows */
     background-color: var(--pi-background) !important;
}
}


/* Infobox Header Title (e.g., Person Name, Place Name) */
#mw-content-text .portable-infobox .pi-data-label {
.portable-infobox .pi-title {
     color: inherit;
     font-size: 125% !important;                     /* Scaled up slightly */
     font-weight: bold;
     font-weight: bold !important;
    text-align: center !important;
    padding: 0.2em 0.4em !important;
    background-color: transparent !important;
    line-height: 1.2em !important;
}
}


/* Major Subsection Headers (Replaces background blocks with thin border lines) */
#mw-content-text .portable-infobox .pi-data-value {
.portable-infobox .pi-header {
     min-width: 0;
     font-size: 100% !important;
    font-weight: bold !important;
    text-align: center !important;
    background-color: transparent !important;        /* Wikipedia headers are transparent, not gray blocks */
    border: none !important;
    border-top: 1px solid var(--pi-border-color) !important; /* Thin line dividing sections */
    padding: 0.5em 0.2em 0.3em 0.2em !important;
    margin-top: 0.5em !important;
}
}


/* Image Frame Elements */
/* Images and captions */
.portable-infobox .pi-media,
#mw-content-text .portable-infobox .pi-image {
.portable-infobox .pi-image {
    padding: 0.2em;
     text-align: center !important;
     text-align: center;
    padding: 0.3em 0 !important;
}
}
.portable-infobox .pi-image-caption {
 
     font-size: 92% !important;                       /* Slightly smaller caption size */
#mw-content-text .portable-infobox .pi-image img {
     line-height: 1.4em !important;
     max-width: 100%;
    color: #54595d !important;                      /* Wikipedia secondary text gray (#54595d) */
     height: auto;
     padding: 0.3em 0.5em 0 0.5em !important;
}
     text-align: left !important;                     /* Left-aligned captions */
 
#mw-content-text .portable-infobox .pi-caption {
     padding: 0.2em;
    font-size: 90%;
    line-height: 1.4;
     text-align: center;
}
}


/* Left Grid Column (Data Labels / Keys) */
/* Remove PortableInfobox theme colors and decorative borders */
.portable-infobox .pi-data-label {
#mw-content-text .portable-infobox .pi-secondary-background {
    font-weight: bold !important;
     background: transparent;
    text-align: left !important;
    padding: 0.3em 0.6em 0.3em 0.2em !important;    /* Tight text gutter padding */
    width: 35% !important;                          /* Proportional table column split */
    vertical-align: top !important;
     background: transparent !important;
}
}


/* Right Grid Column (Data Values) */
#mw-content-text .portable-infobox .pi-border-color {
.portable-infobox .pi-data-value {
     border-color: #a2a9b1;
     text-align: left !important;
    padding: 0.3em 0.2em 0.3em 0 !important;
    vertical-align: top !important;
    background: transparent !important;
}
}


/* Clean Row Spacing fixes */
/* Stack rows and avoid floated infoboxes on narrow screens */
.portable-infobox .pi-data {
@media screen and (max-width: 720px) {
    border-bottom: none !important;                 /* Prevents row dividers from breaking the look */
    #mw-content-text .portable-infobox {
        float: none;
        clear: both;
        width: 100%;
        margin: 1em 0;
    }
}
}

Revision as of 11:10, 23 October 2026

/* Wikipedia-like PortableInfobox styling for Vector 2022 */
#mw-content-text .portable-infobox {
    box-sizing: border-box;
    float: right;
    clear: right;
    width: 22em;
    max-width: 100%;
    margin: 0.5em 0 1em 1em;
    padding: 0.2em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    color: #202122;
    font-size: 88%;
    line-height: 1.5;
}

/* Title */
#mw-content-text .portable-infobox .pi-title {
    margin: 0;
    padding: 0.2em;
    background: transparent;
    color: inherit;
    font-size: 1.25em;
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
}

/* Section headings */
#mw-content-text .portable-infobox .pi-header {
    padding: 0.2em;
    background: #eaecf0;
    color: inherit;
    font-weight: bold;
    text-align: center;
}

/* Data rows and labels */
#mw-content-text .portable-infobox .pi-data {
    display: grid;
    grid-template-columns: minmax(7em, 1fr) minmax(0, 2fr);
    gap: 0.2em 0.5em;
    padding: 0.2em;
    border: 0;
    background: transparent;
}

#mw-content-text .portable-infobox .pi-data-label {
    color: inherit;
    font-weight: bold;
}

#mw-content-text .portable-infobox .pi-data-value {
    min-width: 0;
}

/* Images and captions */
#mw-content-text .portable-infobox .pi-image {
    padding: 0.2em;
    text-align: center;
}

#mw-content-text .portable-infobox .pi-image img {
    max-width: 100%;
    height: auto;
}

#mw-content-text .portable-infobox .pi-caption {
    padding: 0.2em;
    font-size: 90%;
    line-height: 1.4;
    text-align: center;
}

/* Remove PortableInfobox theme colors and decorative borders */
#mw-content-text .portable-infobox .pi-secondary-background {
    background: transparent;
}

#mw-content-text .portable-infobox .pi-border-color {
    border-color: #a2a9b1;
}

/* Stack rows and avoid floated infoboxes on narrow screens */
@media screen and (max-width: 720px) {
    #mw-content-text .portable-infobox {
        float: none;
        clear: both;
        width: 100%;
        margin: 1em 0;
    }
}