Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 100: Line 100:


/* ================================================================= */
/* ================================================================= */
/* MAIN PAGE FLEX LAYOUT (Right Sidebar -> Bottom on Mobile)       */
/* MAIN PAGE LAYOUT (CSS GRID VERSION)                             */
/* ================================================================= */
/* ================================================================= */


/* 1. The Container Wrapper */
.jule-main-layout {
.jule-main-layout {
     display: flex;
     display: grid;
     flex-wrap: wrap; /* Allows wrapping */
     /* DESKTOP: Content takes available space (1fr), Sidebar is fixed 300px */
     gap: 20px;       /* Space between Content and Sidebox */
    grid-template-columns: minmax(0, 1fr) 300px;
     align-items: flex-start;
     gap: 20px;
     align-items: start; /* Prevents stretching height */
     margin-top: 1em;
     margin-top: 1em;
}
}


/* 2. The Content Area (Banner + Grid) */
/* Force the sidebox to fill the grid cell and stop floating */
.jule-main-content {
.jule-main-layout .jule-sidebox {
    flex: 1;          /* Takes up all remaining space */
     width: 100% !important;
    min-width: 0;      /* Prevents flexbox overflow bugs */
    flex-basis: 600px; /* Trigger wrap if content gets squeezed below 600px */
}
 
/* 3. The Sidebar Wrapper */
.jule-main-sidebar {
     flex: 0 0 300px;   /* Fixed width: 300px */
}
 
/* 4. OVERRIDE: Reset the Sidebox module when inside this layout */
.jule-main-sidebar .jule-sidebox {
     float: none !important;
     float: none !important;
    width: 100% !important;
     margin: 0 !important;
     margin: 0 !important;
}
}


/* 5. MOBILE / TABLET BEHAVIOR */
/* MOBILE / TABLET BREAKPOINT */
/* When the screen is smaller than 950px, force the wrap */
/* When screen is smaller than 900px, switch to 1 column */
@media (max-width: 950px) {
@media (max-width: 900px) {
     .jule-main-content {
     .jule-main-layout {
         flex-basis: 100%;
         grid-template-columns: 1fr; /* Stack vertically */
    }
    .jule-main-sidebar {
        flex-basis: 100%;
        width: 100%;
     }
     }
}
}

Revision as of 05:18, 27 January 2026

/* Slider Container */
.jule-slider {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-1); /* Fallback bg */
    border-radius: 8px;
    margin: 0 auto;
}

/* Individual Slides */
.jule-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Smooth fade duration */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

/* The Active Slide */
.jule-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Force images to cover the area (Object-Fit) */
.jule-slide .slide-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
}

/* LinkGridBanner Fixes */
.linkgrid-banner img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block !important;
}

/* Mobile: Cards become full width */
@media (max-width: 768px) { 
    .citizen-card-grid > div { max-width: 100% !important; }
}

/* ================================================================= */
/* MOBILE RESPONSIVENESS & LAYOUT FIXES FOR JULE'S RNG WIKI         */
/* ================================================================= */

/* 1. LinkGrid & LinkGridBanner Images */
.linkgrid-banner img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block !important;
}

/* 2. Sidebox Desktop Defaults */
.jule-sidebox {
    float: right;
    width: 300px;
    margin: 0 0 1rem 1rem;
    clear: right;
}

/* 3. MOBILE RULES (Max Width 768px) */
@media screen and (max-width: 768px) {
    
    /* Make LinkGrid cards full width */
    .jule-grid-card {
        max-width: 100% !important;
        flex-basis: 100% !important;
    }

    /* Make Sidebox float normally and take full width */
    .jule-sidebox {
        float: none !important;
        width: 100% !important;
        margin: 0 0 1.5em 0 !important;
    }

    /* Shrink the Main Banner padding */
    .jule-main-banner {
        padding: 1em !important;
    }

    /* Shrink the Slider height so it isn't huge on phones */
    .jule-main-banner .jule-slider {
        height: 200px !important;
    }
}

/* ================================================================= */
/* MAIN PAGE LAYOUT (CSS GRID VERSION)                              */
/* ================================================================= */

.jule-main-layout {
    display: grid;
    /* DESKTOP: Content takes available space (1fr), Sidebar is fixed 300px */
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start; /* Prevents stretching height */
    margin-top: 1em;
}

/* Force the sidebox to fill the grid cell and stop floating */
.jule-main-layout .jule-sidebox {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* MOBILE / TABLET BREAKPOINT */
/* When screen is smaller than 900px, switch to 1 column */
@media (max-width: 900px) {
    .jule-main-layout {
        grid-template-columns: 1fr; /* Stack vertically */
    }
}