MediaWiki:Vector.css: Difference between revisions

From D4RPoMM
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* ============================================================
/* ==========================
  Rules for Anonymous Users (mw-user-logged-out)
  = GLOBAL VISIBILITY RULES =
  Hide all elements inside the left sidebar (#mw-panel)
   ========================== */
   except for the logo (#p-logo) and the main page link (#n-mainpage)
  ============================================================ */


/* Hide Toolbox only for anonymous users */
/* Hide all sidebar blocks for anonymous users */
.mw-anon-user #p-tb {
.mw-anon-user #mw-panel > .portal {
     display: none !important;
     display: none !important;
}
}


/* Make sure the site logo and the main page link are displayed */
/* Show only the 'Personal tools' (top-right login link) */
body.mw-user-logged-out #p-logo,
.mw-anon-user #p-personal {
body.mw-user-logged-out #n-mainpage {
     display: block !important;
     display: block !important;
}
}


/* ============================================================
/* Ensure the logo remains visible */
  In the personal tools (#p-personal) for logged-out users,
.mw-anon-user #p-logo {
  hide all items except the login link (#pt-login)
     display: block !important;
  ============================================================ */
body.mw-user-logged-out #p-personal * {
     display: none !important;
}
}
body.mw-user-logged-out #pt-login {
 
     display: inline-block !important;
/* Just in case: also show the actual logo image inside */
.mw-anon-user #p-logo a,
.mw-anon-user #p-logo a img {
     display: block !important;
    visibility: visible !important;
}
}


/* ============================================================
/* Optional: clean up the empty sidebar space */
  In the toolbox (#p-tb) for logged-out users,
.mw-anon-user #mw-panel {
  hide all items except the print/export link (#t-print)
     padding-top: 0;
  ============================================================ */
     background: none;
body.mw-user-logged-out #p-tb * {
     display: none !important;
}
body.mw-user-logged-out #t-print {
     display: inline-block !important;
}
}


/* ============================================================
/* Optional: center content a bit more for anonymous users */
  Rules for Logged-In Users (mw-user-logged-in)
.mw-anon-user #content {
  Restore the full standard sidebar and tool items.
     margin-left: 0 !important;
  (These rules override the above for logged-in users.)
  ============================================================ */
body.mw-user-logged-in #mw-panel * {
    display: block !important;
}
body.mw-user-logged-in #p-personal * {
     display: inline-block !important;
}
body.mw-user-logged-in #p-tb * {
    display: inline-block !important;
}
}

Revision as of 22:43, 23 April 2025

/* ==========================
   = GLOBAL VISIBILITY RULES =
   ========================== */

/* Hide all sidebar blocks for anonymous users */
.mw-anon-user #mw-panel > .portal {
    display: none !important;
}

/* Show only the 'Personal tools' (top-right login link) */
.mw-anon-user #p-personal {
    display: block !important;
}

/* Ensure the logo remains visible */
.mw-anon-user #p-logo {
    display: block !important;
}

/* Just in case: also show the actual logo image inside */
.mw-anon-user #p-logo a,
.mw-anon-user #p-logo a img {
    display: block !important;
    visibility: visible !important;
}

/* Optional: clean up the empty sidebar space */
.mw-anon-user #mw-panel {
    padding-top: 0;
    background: none;
}

/* Optional: center content a bit more for anonymous users */
.mw-anon-user #content {
    margin-left: 0 !important;
}