User:CannonProductions/monacobookbeta.css

From MediaWiki
Revision as of 11:55, 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) {
  /* Make the sidebar/nav become a full-screen overlay when it’s shown */
  #column-one {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;

    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;

    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;

    z-index: 999999 !important;
    background: #fff !important;
  }
}


@media (max-width: 720px) {
  #top-ad { height: 65px !important; }
  #top-ad iframe { height: 65px !important; }
}

  /* The banner is 468px wide. Scale it down depending on screen width. */
  #top-ad iframe {
    transform-origin: top left;
  }

  /* Big phones / small tablets */
  @media (min-width: 421px) {
    #top-ad iframe { transform: scale(0.90); }
  }

  /* Typical phones */
  @media (max-width: 420px) {
    #top-ad iframe { transform: scale(0.78); }
  }

  /* Small phones */
  @media (max-width: 360px) {
    #top-ad iframe { transform: scale(0.72); }
  }

  /* Tiny phones */
  @media (max-width: 320px) {
    #top-ad iframe { transform: scale(0.65); }
  }
}

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

  /* Full-width layout (stop the “narrow centered column” effect) */
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: visible !important; /* don’t clip menus/panels */
  }

  #globalWrapper,
  #column-content,
  #content,
  #bodyContent {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;          /* IMPORTANT: no auto-centering */
    padding: 0 !important;
    box-sizing: border-box !important;
  }

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

  /* MonacoBook/older skins often reserve space for the sidebar with margins */
  #column-content,
  #content {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Prevent sideways scroll without breaking dropdowns:
     hide overflow only on the article area, NOT the whole page */
  #content,
  #bodyContent {
    overflow-x: hidden !important;
  }

  /* Make sure the “more” dropdown and tab menus can actually appear */
  #p-cactions,
  #p-cactions .pBody,
  #column-content {
    overflow: visible !important;
  }
  #p-cactions {
    position: relative !important;
    z-index: 10000 !important;
  }

  /* 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;
  }

  /* 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;
  }

  /* 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;
  }

  /* 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;
  }
}

/* ===== Full-screen sidebar on mobile (MonacoBookBeta) ===== */
@media (max-width: 720px) {

  /* Make the whole sidebar become a full-screen overlay */
  #column-one {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;

    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;

    z-index: 999999 !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  /* THIS is the missing piece: stretch the *contents* of the sidebar */
  #column-one .portlet,
  #column-one .pBody,
  #column-one ul,
  #column-one form,
  #column-one fieldset,
  #column-one input,
  #column-one select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
  }

  /* Sidebar logo/header images shouldn’t force weird widths */
  #column-one img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Optional: hide the sidebar ad block on mobile (uncomment if you want) */
  /* #p-ads { display: none !important; } */
}

/* ===== Mobile full-screen sidebar + thumb-friendly controls (MonacoBookBeta) ===== */
@media (max-width: 720px) {

  /* Full-screen overlay sidebar */
  #column-one {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;

    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;

    z-index: 999999 !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }

  /* Remove built-in skin padding that causes the “narrow/indented” look */
  #column-one .portlet,
  #column-one .pBody {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
  }

  /* Make the nav + toolbox lists full width */
  #column-one ul {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
  }
  #column-one li {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Big, full-width “menu rows” */
  #column-one li a {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;

    padding: 14px 16px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;

    /* full-width divider line */
    border-bottom: 1px solid rgba(0,0,0,0.10) !important;
  }

  /* Don’t underline everything; feels more app-like */
  #column-one a {
    text-decoration: none !important;
  }

  /* Images inside sidebar shouldn’t force weird widths */
  #column-one img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Search section: pad it and make controls full-width */
  #p-search .pBody {
    padding: 12px 16px !important;
  }

  #column-one #searchInput,
  #column-one input[type="text"],
  #column-one input[type="search"] {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 18px !important;
    padding: 12px 12px !important;
    box-sizing: border-box !important;
  }

  #column-one input[type="submit"],
  #column-one input[type="button"],
  #column-one button {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;

    font-size: 18px !important;
    padding: 14px 12px !important;
    margin: 10px 0 0 0 !important;

    box-sizing: border-box !important;
  }

  /* Optional: hide sidebar ads on mobile (uncomment if you want) */
  /* #p-ads { display: none !important; } */
}