MediaWiki:Common.css

From Librarian Chick
Revision as of 00:00, 24 March 2026 by Maintenance script (talk | contribs) (Logo: always left-aligned at sidebar boundary)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Logo: left edge always aligned with sidebar/content boundary */
#p-logo {
    position: fixed;
    left: 160px;
    top: 5px;
    z-index: 1000;
}
.mw-wiki-logo {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    /* Never wider than the viewport minus the sidebar */
    width: min(416px, calc(100vw - 170px)) !important;
    height: 100px !important;
    aspect-ratio: 416 / 100;
    display: block;
}
#mw-head      { top: 110px; }
#mw-head-base { height: 110px; }
#mw-page-base { padding-top: 110px; }
#mw-panel     { padding-top: 110px; }

/* Scale the reserved band down on narrow screens */
@media (max-width: 700px) {
    .mw-wiki-logo { height: 72px !important; }
    #mw-head      { top: 82px; }
    #mw-head-base { height: 82px; }
    #mw-page-base { padding-top: 82px; }
    #mw-panel     { padding-top: 82px; }
}
@media (max-width: 480px) {
    .mw-wiki-logo { height: 48px !important; }
    #mw-head      { top: 58px; }
    #mw-head-base { height: 58px; }
    #mw-page-base { padding-top: 58px; }
    #mw-panel     { padding-top: 58px; }
}