MediaWiki:Mobile.css

Revision as of 22:24, 31 March 2026 by ST (talk | contribs)

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.
h2, h3, h4 {color:red;background-color:blue}

body {
  background-color: lightgrey;
  color: blue;
}

h1 {
  background-color: black;
  color: white;
}
@media (max-width: 800px) {
  #mw-panel, .mw-sidebar, .vectorSidebar {
    display: none !important;
  }
  #content, #mw-content-text {
    margin-left: 0 !important;
    padding-left: 1rem !important;
  }
}
/* Tame the Minerva logo/title and make the clickable area comfortable */
@media (max-width: 800px) {
  .minerva-logo, .minerva-logo-link img, .mw-logo {
    max-height: 36px !important;
    width: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }

  .minerva-header .site-title, .minerva-header .minerva-title {
    font-size: 1rem !important;
    line-height: 1.2 !important;
    padding: 0.15rem 0.35rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .minerva-logo-link {
    display: inline-block;
    padding: 4px 6px;
    text-decoration: none;
  }
}

/* Mobile custom hamburger + overlay (max-width 800px) */
@media (max-width: 800px) {
  .custom-mobile-hamburger {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    z-index: 9998;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
  }

  .custom-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9997;
    display: none;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 56px;
  }

  .custom-mobile-panel {
    background: #fff;
    width: 84%;
    max-width: 320px;
    height: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    padding: 0.5rem 0;
    overflow-y: auto;
  }

  .custom-mobile-panel a {
    display: block;
    padding: 0.75rem 1rem;
    color: #0645AD;
    text-decoration: none;
    border-bottom: 1px solid #eee;
  }

  .custom-mobile-panel a:hover {
    background: #f6f8fb;
  }

  .custom-mobile-close {
    display: block;
    padding: 0.5rem;
    text-align: right;
    font-size: 18px;
    color: #333;
  }
}