MediaWiki:Common.css: Difference between revisions

From PoliticalSG
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
/* --- INFOBOX STYLING --- */
.infobox-container {
.infobox-container {
     width: 30%;
     width: 30%;
Line 31: Line 33:
}
}


.infobox-person {
    float: right;
    clear: right;
    width: 310px;
    margin: 0 0 1em 1em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    font-size: 88%;
    line-height: 1.5em;
}
.infobox-political-party {
    width: 280px;
    min-width: 200px;
    max-width: 320px;
    float: right;
    clear: right;
    margin: 0 0 1em 1.5em;
    font-size: 88%;
    line-height: 1.5;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
}
/* --- UI CLEANUP --- */
/* Hide wiki UI elements — archive site, not community wiki */
/* Hide wiki UI elements — archive site, not community wiki */
#ca-history { display: none; }
#ca-history { display: none; }
Line 38: Line 65:
#p-tb { display: none; }      /* Toolbox sidebar */
#p-tb { display: none; }      /* Toolbox sidebar */


/* --- MOBILE AD STYLING --- */
/* Centers the mobile ad banner under the article title */
.wiki-mobile-ad-container {
    display: block;
    text-align: center;
    margin: 15px auto;
    max-width: 100%;
}


/* --- DESKTOP AD SIDEBAR STYLING --- */
/* --- MOBILE RESPONSIVE OVERRIDES --- */
/* Rips the player out of the layout and floats it on the right side of the screen */
@media screen and (max-width: 768px) {
@media screen and (min-width: 1100px) {
 
     .wiki-desktop-ad-sidebar {
    /* THE ULTIMATE OVERRIDE: Target the exact inline style string directly */
    div[style*="width:30%"],
    div[style*="width: 30%"],
    div[style*="float:right"],
     div[style*="float: right"] {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        clear: both !important;
         display: block !important;
         display: block !important;
        position: fixed;
    }
        right: 25px;        /* Distance from the right edge of the screen */
 
        top: 160px;          /* Distance from the top header */
    /* Force the wikitable inside it to stop cropping and stretch to 100% */
        width: 300px;        /* Matches standard ad layout width */
    div[style*="width:30%"] table.wikitable,
         height: 600px;       /* TEMPORARY: Gives it height so we can see the test box */
    div[style*="width: 30%"] table.wikitable,
         background-color: rgba(255, 0, 0, 0.1); /* TEMPORARY: Light red tint */
    .mw-parser-output table.wikitable {
         border: 2px dashed red;                 /* TEMPORARY: Red dotted line */
         width: 100% !important;
         z-index: 9999;       /* Keeps it floating above content */
         max-width: 100% !important;
         min-width: 100% !important;
         display: table !important;
     }
     }
}
}


/* --- RESPONSIVE VISIBILITY CONTROLS --- */
/* --- DESKTOP AD (base of page) --- */
/* If the screen is too narrow (like a laptop), hide the desktop sidebar so it doesn't overlap text */
.wiki-desktop-ad-sidebar {
@media screen and (max-width: 1099px) {
    width: 100%;
    max-width: 640px;
    margin: 20px auto;
    display: block;
    overflow: hidden;
}
@media screen and (max-width: 600px) {
     .wiki-desktop-ad-sidebar {
     .wiki-desktop-ad-sidebar {
         display: none !important;
         display: none !important;
Line 71: Line 111:
}
}


/* If the user is on a desktop, completely hide the mobile banner container */
/* --- MOBILE AD --- */
.wiki-mobile-ad-container {
    display: block;
    text-align: center;
    margin: 10px auto;
    max-width: 100%;
    overflow: hidden;
}
@media screen and (min-width: 601px) {
@media screen and (min-width: 601px) {
     .wiki-mobile-ad-container {
     .wiki-mobile-ad-container {

Latest revision as of 13:02, 24 May 2026

/* CSS placed here will be applied to all skins */

/* --- INFOBOX STYLING --- */
.infobox-container {
    width: 30%;
    max-width: 350px;
    margin-left: 15px;
    margin-top: 0px;
    float: right;
    clear: right;
}

.infobox-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.infobox-image {
    text-align: center;
    padding: 5px;
}

.infobox-header, .infobox-section {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
}

.infobox-field {
    font-weight: bold;
    width: 35%;
}

.infobox-person {
    float: right;
    clear: right;
    width: 310px;
    margin: 0 0 1em 1em;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
    font-size: 88%;
    line-height: 1.5em;
}

.infobox-political-party {
    width: 280px;
    min-width: 200px;
    max-width: 320px;
    float: right;
    clear: right;
    margin: 0 0 1em 1.5em;
    font-size: 88%;
    line-height: 1.5;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
}

/* --- UI CLEANUP --- */
/* Hide wiki UI elements — archive site, not community wiki */
#ca-history { display: none; }
#ca-talk { display: none; }
#ca-edit { display: none; }
#ca-ve-edit { display: none; } /* Visual editor tab if installed */
#p-tb { display: none; }       /* Toolbox sidebar */


/* --- MOBILE RESPONSIVE OVERRIDES --- */
@media screen and (max-width: 768px) {

    /* THE ULTIMATE OVERRIDE: Target the exact inline style string directly */
    div[style*="width:30%"],
    div[style*="width: 30%"],
    div[style*="float:right"],
    div[style*="float: right"] {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
        margin-top: 15px !important;
        margin-bottom: 15px !important;
        clear: both !important;
        display: block !important;
    }

    /* Force the wikitable inside it to stop cropping and stretch to 100% */
    div[style*="width:30%"] table.wikitable,
    div[style*="width: 30%"] table.wikitable,
    .mw-parser-output table.wikitable {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        display: table !important;
    }
}

/* --- DESKTOP AD (base of page) --- */
.wiki-desktop-ad-sidebar {
    width: 100%;
    max-width: 640px;
    margin: 20px auto;
    display: block;
    overflow: hidden;
}
@media screen and (max-width: 600px) {
    .wiki-desktop-ad-sidebar {
        display: none !important;
    }
}

/* --- MOBILE AD --- */
.wiki-mobile-ad-container {
    display: block;
    text-align: center;
    margin: 10px auto;
    max-width: 100%;
    overflow: hidden;
}
@media screen and (min-width: 601px) {
    .wiki-mobile-ad-container {
        display: none !important;
    }
}