MediaWiki:Vector.css: Difference between revisions

From D4RPoMM
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* ------------------------------
/* ---------------------------------------------
   HIDE sidebar portals for anon
   HIDE sidebar blocks for anonymous users only
------------------------------- */
  --------------------------------------------- */


/* Hide all sidebar content blocks (navigation, toolbox, etc.) for anonymous users */
/* Hides all sidebar blocks except the logo for anonymous users */
body:not(.mw-user-loggedin) #mw-panel .portal {
body:not(.mw-user-loggedin) #mw-panel .portal {
     display: none;
     display: none !important;
}
}


/* Keep the logo visible */
/* Show personal tools (login link) */
body:not(.mw-user-loggedin) #p-logo {
body:not(.mw-user-loggedin) #p-personal {
     display: block;
     display: block !important;
}
}


/* Ensure the logo image shows up */
/* Ensure the logo is always visible */
body:not(.mw-user-loggedin) #p-logo,
body:not(.mw-user-loggedin) #p-logo a,
body:not(.mw-user-loggedin) #p-logo a,
body:not(.mw-user-loggedin) #p-logo a img {
body:not(.mw-user-loggedin) #p-logo a img {
     display: block;
     display: block !important;
     visibility: visible;
     visibility: visible !important;
}
 
/* Keep personal tools (login link) visible */
body:not(.mw-user-loggedin) #p-personal {
    display: block;
}
}


/* Add a fake empty block for visual balance */
/* Add dummy sidebar space for layout balance */
body:not(.mw-user-loggedin) #mw-panel::after {
body:not(.mw-user-loggedin) #mw-panel::after {
     content: '';
     content: '';
     display: block;
     display: block;
     height: 400px; /* Tweak this value */
     height: 400px; /* Adjust this if needed */
    background: transparent;
}
}


/* ------------------------------
/* ---------------------------------------------
   LOGGED-IN USERS: No override needed
   RESET sidebar visibility for logged-in users
   Let default styling show everything
   --------------------------------------------- */
------------------------------- */


/* Remove any display overrides that may have crept in */
/* Force show sidebar portals for logged-in users */
body.mw-user-loggedin #mw-panel .portal {
body.mw-user-loggedin #mw-panel .portal {
     display: block;
     display: block !important;
     visibility: visible;
     visibility: visible !important;
}
 
/* Restore background if it was removed for anons */
body.mw-user-loggedin #mw-panel {
    background: #f8f9fa !important;
    padding-top: 1em;
}
}

Revision as of 22:56, 23 April 2025

/* ---------------------------------------------
   HIDE sidebar blocks for anonymous users only
   --------------------------------------------- */

/* Hides all sidebar blocks except the logo for anonymous users */
body:not(.mw-user-loggedin) #mw-panel .portal {
    display: none !important;
}

/* Show personal tools (login link) */
body:not(.mw-user-loggedin) #p-personal {
    display: block !important;
}

/* Ensure the logo is always visible */
body:not(.mw-user-loggedin) #p-logo,
body:not(.mw-user-loggedin) #p-logo a,
body:not(.mw-user-loggedin) #p-logo a img {
    display: block !important;
    visibility: visible !important;
}

/* Add dummy sidebar space for layout balance */
body:not(.mw-user-loggedin) #mw-panel::after {
    content: '';
    display: block;
    height: 400px;  /* Adjust this if needed */
}

/* ---------------------------------------------
   RESET sidebar visibility for logged-in users
   --------------------------------------------- */

/* Force show sidebar portals for logged-in users */
body.mw-user-loggedin #mw-panel .portal {
    display: block !important;
    visibility: visible !important;
}

/* Restore background if it was removed for anons */
body.mw-user-loggedin #mw-panel {
    background: #f8f9fa !important;
    padding-top: 1em;
}