User:CannonProductions/monacobookbeta.css

From MediaWiki
Revision as of 10:59, 30 December 2025 by CannonProductions (talk | contribs)
Jump to navigationJump 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.
@media (max-width: 720px) {
  /* Banner: keep scaling, and prevent it from forcing width */
  #top-ad {
    width: 100% !important;
    overflow: hidden !important;
  }
  #top-ad iframe {
    transform: scale(0.77);
    transform-origin: top left;
  }
}

/* ===== Mobile width/overflow fixes for TFWiki (MonacoBook-ish skins) ===== */
@media (max-width: 720px) {

  /* 1) Make wrappers fluid (NO global overflow-x hidden, so drawers/menus can show) */
  html, body {
    width: 100% !important;
  }

  #globalWrapper,
  #column-content,
  #content,
  #bodyContent {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important; /* keep centered when the skin expects centering */
    box-sizing: border-box !important;
  }

  /* Optional: breathing room */
  #content, #bodyContent {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* 2) Main Page uses two columns (.mainleft/.mainright) — stack them on mobile */
  #mw-content-text .mainleft,
  #mw-content-text .mainright {
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-align: center; /* keeps their existing “portal” vibe */
  }

  /* 3) Media should never force horizontal scroll */
  img, video, iframe {
    max-width: 100% !important;
    height: auto !important;
  }
  .thumb, .thumbinner {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 4) Wide tables/navboxes: scroll *the table*, not the whole page */
  #mw-content-text table.wikitable,
  #mw-content-text .navbox,
  #mw-content-text table.navbox {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* 5) Infoboxes: keep them from floating wide */
  .infobox {
    float: none !important;
    margin: 0 auto 1em auto !important;
    max-width: 100% !important;
  }

  /* 6) Long unbroken text/URLs/code can push width */
  .mw-parser-output {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  pre, code {
    white-space: pre-wrap !important;
    word-break: break-word !important;
  }
}