MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* ===== FULL WIDTH (desktop only) ===== */
/* ===== FULL VIEWPORT WIDTH ===== */
@media (min-width: 1000px) {
.mw-page-container,
    .skin-vector-2022 .mw-page-container,
.mw-page-container-inner {
    .skin-vector-2022 .mw-content-container,
    max-width: 100% !important;
    .skin-vector-2022 #mw-content-container {
     padding: 0 !important;
        max-width: none !important;
     }
}
}


#content,
/* ===== HIDE APPEARANCE PANEL ===== */
.mw-body {
.skin-vector-2022 .mw-portlet-appearance,
     margin: 0 !important;
.skin-vector-2022 #vector-page-tools-pinned-container .mw-portlet-appearance,
    padding: 20px 30px !important;
.skin-vector-2022 .vector-appearance {
    border: none !important;
     display: none !important;
}
}


/* ===== PINNED SIDEBAR ON DESKTOP ===== */
/* ===== HIDE EDIT SECTION LINKS ===== */
@media (min-width: 1024px) {
.mw-editsection {
    #mw-panel,
     display: none !important;
    .mw-sidebar,
    .vector-menu-portal {
        position: sticky !important;
        top: 60px !important;
     }
 
    .mw-table-of-contents-container {
        position: sticky !important;
        top: 60px !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
    }
}
}


/* ===== CARD LAYOUT ===== */
/* ===== CARD LAYOUT ===== */
.card {
.card {
     background: #fff;
     background: var(--background-color-base, #fff);
     border-radius: 10px;
     border-radius: 10px;
     box-shadow: 0 2px 12px rgba(0,0,0,0.1);
     box-shadow: 0 2px 12px rgba(0,0,0,0.1);
Line 39: Line 28:
     transition: transform 0.2s ease, box-shadow 0.2s ease;
     transition: transform 0.2s ease, box-shadow 0.2s ease;
     height: 100%;
     height: 100%;
    display: flex;
    flex-direction: column;
}
}


Line 46: Line 37:
}
}


/* ===== ROW / COLUMN GRID ===== */
.row {
.row {
     display: flex !important;
     display: flex !important;
     flex-wrap: wrap !important;
     flex-wrap: wrap !important;
     gap: 24px !important;
     gap: 20px !important;
     padding: 16px 0 !important;
     padding: 16px 20px !important;
    box-sizing: border-box !important;
}
}


.column {
.column {
     flex: 1 1 280px !important;
     flex: 1 1 260px !important;
     min-width: 260px !important;
    max-width: min(100%, calc(33.333% - 14px)) !important;
     max-width: 380px !important;
     min-width: 0 !important;
     box-sizing: border-box !important;
}
}


/* ===== IMAGES ===== */
.fakeimg {
.fakeimg {
     overflow: hidden;
     overflow: hidden;
     height: 220px;
     height: clamp(140px, 25vw, 220px);
     background: #f0f0f0;
     background: #f0f0f0;
}
}
Line 68: Line 63:
.fakeimg a img {
.fakeimg a img {
     width: 100% !important;
     width: 100% !important;
     height: 220px !important;
     height: 100% !important;
     object-fit: cover !important;
     object-fit: cover !important;
     display: block !important;
     display: block !important;
}
}


/* ===== CARD CONTENT ===== */
.cha-cont {
.cha-cont {
     padding: 16px !important;
     padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}
}


Line 83: Line 82:
     letter-spacing: 0.8px !important;
     letter-spacing: 0.8px !important;
     display: block !important;
     display: block !important;
     margin-bottom: 6px !important;
     margin: 0 0 6px 0 !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
}
}


.cha-cont h2 {
.cha-cont h2 {
     font-size: 16px !important;
     font-size: 16px !important;
     margin: 0 0 14px !important;
     margin: 0 0 12px 0 !important;
     color: #1a1a2e !important;
     color: #1a1a2e !important;
     line-height: 1.4 !important;
     line-height: 1.4 !important;
     border: none !important;
     border: none !important;
    flex-grow: 1 !important;
}
}


/* ===== BUTTONS ===== */
/* ===== BUTTONS ===== */
.btn-grp {
.btn-grp {
     margin-top: 10px;
     margin-top: auto !important;
    padding-top: 8px !important;
}
}


.btn {
.btn-2 {
     display: inline-block !important;
    background-color: #2e7d32 !important;
     padding: 8px 18px !important;
    color: #fff !important;
     display: block !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
     padding: 10px 18px !important;
     border-radius: 5px !important;
     border-radius: 5px !important;
     font-size: 13px !important;
     font-size: 13px !important;
     font-weight: 600 !important;
     font-weight: 600 !important;
    cursor: pointer !important;
     text-decoration: none !important;
     text-decoration: none !important;
}
.btn-2 {
    background-color: #2e7d32 !important;
    color: #fff !important;
}
}


Line 127: Line 130:
.hero-img {
.hero-img {
     width: 100% !important;
     width: 100% !important;
     max-height: 420px !important;
     max-height: clamp(180px, 35vw, 420px) !important;
     overflow: hidden !important;
     overflow: hidden !important;
}
}
Line 134: Line 137:
.hero-img a img {
.hero-img a img {
     width: 100% !important;
     width: 100% !important;
     max-height: 420px !important;
     height: clamp(180px, 35vw, 420px) !important;
     object-fit: cover !important;
     object-fit: cover !important;
     display: block !important;
     display: block !important;
Line 141: Line 144:
/* ===== BANNER ===== */
/* ===== BANNER ===== */
.banner-cont {
.banner-cont {
     background: #f8f9fa !important;
     background: var(--background-color-base, #fff) !important;
    border-left: 4px solid #2e7d32 !important;
     padding: 24px 20px !important;
     margin: 20px 0 !important;
     box-sizing: border-box !important;
     border-radius: 4px !important;
}
}


Line 154: Line 156:
}
}


/* ===== SECTION TITLES ===== */
/* ===== TITLES ===== */
.title h1 {
    font-size: clamp(22px, 5vw, 32px) !important;
    margin: 16px 20px !important;
    color: #1a1a2e !important;
    border-bottom: 2px solid #2e7d32 !important;
    padding-bottom: 12px !important;
}
 
.ch-title {
.ch-title {
     font-size: 22px !important;
     font-size: clamp(18px, 4vw, 22px) !important;
     color: #1a1a2e !important;
     color: #1a1a2e !important;
     margin: 24px 0 8px !important;
     margin: 20px 20px 8px !important;
     padding-bottom: 8px !important;
     padding-bottom: 8px !important;
     border-bottom: 2px solid #2e7d32 !important;
     border-bottom: 2px solid #2e7d32 !important;
}
}


/* ===== RESPONSIVE ===== */
/* ===== GOOGLE TRANSLATE ===== */
@media (max-width: 768px) {
#google-translate-sidebar {
     .row {
    padding: 8px 5px !important;
        flex-direction: column !important;
}
    }
 
    .column {
#google_translate_element {
        max-width: 100% !important;
     padding: 4px 0 !important;
     }
}
     .fakeimg,
 
     .fakeimg img,
#google_translate_element .goog-te-gadget {
     .fakeimg a img {
    font-size: 0 !important;
}
 
#google_translate_element select,
#google_translate_element .goog-te-gadget select {
    width: 100% !important;
     padding: 5px !important;
    border-radius: 4px !important;
    border: 1px solid #ddd !important;
    font-size: 12px !important;
    background: #fff !important;
    cursor: pointer !important;
}
 
#google_translate_element .goog-te-gadget span {
    display: none !important;
}
 
.goog-te-banner-frame {
    display: none !important;
}
/* ===== MOBILE — single column ===== */
@media screen and (max-width: 479px) {
     .hero-img,
     .hero-img img,
     .hero-img a img {
        max-height: 180px !important;
         height: 180px !important;
         height: 180px !important;
     }
     }
}
}
/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Full width on mobile */
    #content, .mw-body {
        padding: 10px 15px !important;
    }


    /* Stack cards */
body {
     .row {
     top: 0 !important;
        flex-direction: column !important;
}
        gap: 16px !important;
    }


/* ===== MOBILE ===== */
@media (max-width: 479px) {
     .column {
     .column {
         max-width: 100% !important;
         max-width: 100% !important;
         min-width: unset !important;
         flex-basis: 100% !important;
        width: 100% !important;
     }
     }


    /* Hero image */
     .row {
     .hero-img,
        gap: 14px !important;
    .hero-img img,
         padding: 12px !important;
    .hero-img a img {
         max-height: 200px !important;
     }
     }
}


    /* Card images */
/* ===== TABLET (2-column grid) ===== */
    .fakeimg,
@media (min-width: 480px) and (max-width: 999px) {
     .fakeimg img,
     .column {
    .fakeimg a img {
        max-width: calc(50% - 10px) !important;
         height: 160px !important;
         flex-basis: calc(50% - 10px) !important;
     }
     }


    /* Typography */
     .row {
     .cha-cont h2 {
         gap: 14px !important;
         font-size: 14px !important;
        padding: 14px !important;
     }
     }
 
}
     .banner-cont p {
/* ===== STICKY SIDEBAR (desktop only) ===== */
         font-size: 13px !important;
@media screen and (min-width: 1000px) {
    .mw-sidebar,
    #vector-main-menu-pinned-container,
     .vector-main-menu-pinned-container {
         position: sticky !important;
        top: 0 !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
     }
     }


     .ch-title {
     /* Hide scrollbar but keep functionality */
         font-size: 18px !important;
    #vector-main-menu-pinned-container::-webkit-scrollbar {
         width: 4px;
     }
     }
 
     #vector-main-menu-pinned-container::-webkit-scrollbar-thumb {
    /* Hide sidebar on mobile */
         background: #ccc;
     #mw-panel,
        border-radius: 4px;
    .mw-sidebar {
         display: none !important;
     }
     }
}


    /* Full width content when sidebar hidden */
/* ===== HIDE TRANSLATE FROM TOOLS MENU ===== */
    #mw-content-text {
#p-tb #t-uls,
        margin-left: 0 !important;
#p-tb li:has(a[href*="Special:Translate"]) {
        width: 100% !important;
    display: none !important;
    }
}


    /* Buttons full width on mobile */
/* ===== TRANSLATE IN SIDEBAR STYLING ===== */
    .btn-grp {
#p-sidebar-translate {
        width: 100% !important;
    margin-top: 4px !important;
    }
}


    .btn {
#p-sidebar-translate .vector-menu-heading {
        display: block !important;
    display: none !important;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}
}


@media (max-width: 480px) {
#sidebar-translate-link {
     .fakeimg,
    display: flex !important;
     .fakeimg img,
    align-items: center !important;
     .fakeimg a img {
    gap: 6px !important;
        height: 140px !important;
    padding: 6px 10px !important;
     }
    color: #2e7d32 !important;
     font-weight: 600 !important;
     font-size: 13px !important;
     text-decoration: none !important;
    border-radius: 4px !important;
     transition: background 0.2s !important;
}


    #content, .mw-body {
#sidebar-translate-link:hover {
        padding: 8px 10px !important;
    background: #e8f5e9 !important;
     }
     color: #1b5e20 !important;
}
}