MediaWiki:Common.css: Difference between revisions

Use absolute hashed URLs for Fantasy UI backgrounds
made stats box smaller
 
(24 intermediate revisions by 2 users not shown)
Line 164: Line 164:


.header-stats {
.header-stats {
     width: 300px;
     width: 190px;
     flex-shrink: 0;
     flex-shrink: 0;
     background: linear-gradient(to bottom, #fcf6e8, #f1e7d3) !important;
     background: linear-gradient(to bottom, #fcf6e8, #f1e7d3) !important;
Line 170: Line 170:
     box-shadow: 0 4px 10px rgba(61, 43, 31, 0.15);
     box-shadow: 0 4px 10px rgba(61, 43, 31, 0.15);
     border: 1px solid rgba(179, 160, 125, 0.4);
     border: 1px solid rgba(179, 160, 125, 0.4);
     padding: 20px 25px;
     padding: 12px 16px;
     box-sizing: border-box;
     box-sizing: border-box;
}
}
Line 181: Line 181:
     display: flex;
     display: flex;
     justify-content: space-between;
     justify-content: space-between;
     margin-bottom: 8px;
     margin-bottom: 5px;
     font-size: 0.95em;
     font-size: 0.8em;
     border-bottom: 1px dashed rgba(179, 160, 125, 0.6);
     border-bottom: 1px dashed rgba(179, 160, 125, 0.6);
     padding-bottom: 8px;
     padding-bottom: 5px;
}
}
.header-stats li:last-child {
.header-stats li:last-child {
Line 233: Line 233:
}
}
.categories-grid {
.categories-grid {
     grid-template-columns: repeat(4, 1fr);
     grid-template-columns: repeat(3, 1fr);
     background: none;
     background: none;
     border: none;
     border: none;
Line 286: Line 286:
     border-radius: 8px;
     border-radius: 8px;
     overflow: hidden;
     overflow: hidden;
     box-shadow: 0 4px 10px rgba(61, 43, 31, 0.1);
     box-shadow: 0 8px 18px rgba(20, 12, 4, 0.25);
     border: 1px solid rgba(179, 160, 125, 0.3);
     border: 1px solid rgba(179, 160, 125, 0.3);
     transition: all 0.2s ease;
     transition: all 0.2s ease;
Line 294: Line 294:
.category-card:hover {
.category-card:hover {
     transform: translateY(-4px);
     transform: translateY(-4px);
     box-shadow: 0 10px 20px rgba(61, 43, 31, 0.15), 0 0 15px rgba(255, 215, 0, 0.15);
     box-shadow: 0 16px 28px rgba(20, 12, 4, 0.35), 0 0 15px rgba(255, 215, 0, 0.15);
     border-color: #b3a07d;
     border-color: #b3a07d;
}
}
.tile-top.tile-image {
.tile-top.tile-image {
     background: radial-gradient(circle, #ffffff 0%, #f1e7d3 100%) !important;
     background: radial-gradient(circle, #ffffff 0%, #f1e7d3 100%) !important;
     height: 120px;
     height: 220px;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
Line 307: Line 307:
}
}
.tile-top.tile-image img {
.tile-top.tile-image img {
     max-width: 80px;
     max-width: 175px;
     max-height: 80px;
     max-height: 175px;
     object-fit: contain;
     object-fit: contain;
     filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
     filter: drop-shadow(0 14px 16px rgba(20, 12, 4, 0.5));
     transition: transform 0.2s ease;
     transition: transform 0.2s ease, filter 0.2s ease;
}
}
.category-card:hover .tile-top.tile-image img {
.category-card:hover .tile-top.tile-image img {
     transform: scale(1.05);
     transform: scale(1.05);
    filter: drop-shadow(0 18px 20px rgba(20, 12, 4, 0.6));
}
}
.tile-bottom.link-button {
.tile-bottom.link-button {
Line 847: Line 848:
     }
     }


     /* Sidebar: starts at top:0 so logo naturally overlaps the banner */
     /* Sidebar: fixed to the viewport so it stays visible while the page
      content scrolls, instead of scrolling away with it. */
     #mw-panel {
     #mw-panel {
         position: absolute !important;
         position: fixed !important;
         top: 0 !important;
         top: 0 !important;
         left: 0 !important;
         left: 0 !important;
         width: 165px !important;
         width: 165px !important;
        height: 100vh !important;
        overflow-y: auto !important;
         padding-top: 0 !important;
         padding-top: 0 !important;
         z-index: 10 !important;
         z-index: 10 !important;
Line 890: Line 894:
     }
     }
     #content {
     #content {
         margin-top: 20px !important;
         margin-top: 70px !important;
         margin-left: 10px !important;
         margin-left: 10px !important;
         margin-right: 10px !important;
         margin-right: 10px !important;
Line 902: Line 906:
         display: none !important;
         display: none !important;
     }
     }
    /* The stock "Not logged in / Talk / Contributions / Log in" toolbar has
      nowhere sensible to sit once the header collapses on mobile, so hide
      it rather than let it float over the page. */
    #p-personal {
        display: none !important;
    }
    /* Sidebar becomes a slide-in drawer, opened via #mobile-nav-toggle
      (added by Common.js). Off-screen by default. */
     #mw-panel {
     #mw-panel {
         position: static !important;
         position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 240px !important;
        max-width: 80vw !important;
        height: 100vh !important;
        overflow-y: auto !important;
        background: #f1e7d3 !important;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.4) !important;
        z-index: 500 !important;
        padding: 60px 15px 20px 15px !important;
        box-sizing: border-box !important;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }
    #mw-panel.mobile-nav-open {
        transform: translateX(0);
     }
     }
     #p-logo {
     #p-logo {
Line 915: Line 943:
     .vector-menu-tabs .vector-menu-content-list > li {
     .vector-menu-tabs .vector-menu-content-list > li {
         margin-bottom: 2px !important;
         margin-bottom: 2px !important;
    }
    #mobile-nav-toggle {
        display: block !important;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 600;
        background: #3d2b1f;
        color: #f1e7d3;
        border: 2px solid #b3a07d;
        border-radius: 4px;
        padding: 8px 14px;
        font-size: 1.1em;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }
    #mobile-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 400;
    }
    #mobile-nav-backdrop.mobile-nav-open {
        display: block;
     }
     }
}
/* Hamburger toggle/backdrop only exist for the mobile drawer; keep them
  fully inert on desktop widths. */
#mobile-nav-toggle, #mobile-nav-backdrop {
    display: none;
}
}


Line 1,203: Line 1,265:
     margin-left: auto;
     margin-left: auto;
     margin-right: auto;
     margin-right: auto;
}
/* Fix Watch Tab Text Overlap */
#ca-watch a, #ca-unwatch a {
    width: 30px !important;
    padding: 0 !important;
    justify-content: center !important;
}
#ca-watch a span, #ca-unwatch a span {
    display: none !important;
}
/* Fix Personal Tools Position and Overlap */
#p-personal {
    position: absolute !important;
    top: -50px !important;
    right: 10px !important;
    z-index: 200 !important;
    margin: 0 !important;
}
@media screen and (max-width: 1000px) {
    #p-personal {
        top: -15px !important;
        right: 0 !important;
        transform: scale(0.85);
        transform-origin: top right;
    }
}
/* ==========================================================================
  MOBILE / NARROW WINDOW FIXES
  Fixed-column grids on the main page (and any other page) don't shrink
  below their content's natural width, which forces the whole page to
  scroll horizontally on phones and narrow windows. Collapse them to fewer
  columns instead of letting them overflow, and give grid/flex children an
  explicit min-width so they're actually allowed to shrink.
  ========================================================================== */
/* Force normal document-level scrolling. Something (base skin CSS, not
  wiki-editable) was letting <body> become its own independent scroll
  container while <html> stayed pinned to the viewport height - which
  made position:absolute elements like the tab bar (whose containing
  block is the html-level initial containing block) behave as if fixed,
  overlapping content instead of scrolling away with it normally. */
html, body {
    height: auto !important;
    overflow-y: visible !important;
}
html {
    overflow-x: hidden;
}
.mainpage-container, .mainpage-layout, .mainpage-header, .mainpage-left, .mainpage-right,
.tile-row, .updates-row, .categories-grid, .popular-grid, .skills-grid,
.update-card, .category-card, .skill-item, .header-intro, .header-stats {
    min-width: 0;
}
/* Any image, table, or file thumbnail (including the Interactive Map's
  <imagemap>) should shrink to fit rather than force a scrollbar. Explicit
  width/height attributes are kept by the browser for the image's own
  scaling math (and for <imagemap> AREA coordinate scaling), so this is
  safe even for the world map. */
img, .thumb, .thumbinner, .image {
    max-width: 100% !important;
    height: auto !important;
}
@media screen and (max-width: 700px) {
    .categories-grid, .popular-grid, .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .updates-row {
        grid-template-columns: 1fr !important;
    }
}
@media screen and (max-width: 460px) {
    .categories-grid, .popular-grid, .skills-grid {
        grid-template-columns: 1fr !important;
    }
    /* The leaderboard widgets have a hardcoded inline min-width:300px that
      stops them shrinking on the narrowest phones; override it. */
    .leaderboards-row {
        flex-direction: column !important;
    }
    .widget-box {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}
/* Item/monster infobox portrait is a fixed 250px; on very narrow screens
  that can be wider than the infobox itself is allowed to shrink to. */
@media screen and (max-width: 460px) {
    .infobox {
        width: 100% !important;
        max-width: 320px;
    }
}
/* Forced refresh 2 */
/* ==========================================================================
  MINERVA MOBILE MENU - injected navigation sections
  Styled to fit Minerva's own native look (plain, light gray), not the
  OSRS/parchment desktop theme, since this only ever renders on Minerva.
  ========================================================================== */
.wov-minerva-nav-heading {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #72777d;
    padding: 14px 16px 6px 16px;
    border-top: 1px solid #eaecf0;
}
#wov-minerva-extra-nav .toggle-list__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
#wov-minerva-extra-nav .toggle-list-item__anchor {
    display: block;
    padding: 10px 16px;
    color: #202122;
    text-decoration: none;
    font-size: 0.95em;
}
#wov-minerva-extra-nav .toggle-list-item__anchor:active {
    background: #eaecf0;
}
/* Keep just the hamburger button pinned while scrolling; everything else
  in the header (site name, search) scrolls away normally. */
#mw-mf-main-menu-button {
    position: fixed !important;
    top: 8px;
    left: 8px;
    margin: 0 !important;
    z-index: 1000;
    width: 40px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1.5px solid #a2a9b1;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
/* Hide it while the drawer is open so it doesn't sit on top of "Home";
  tapping outside the drawer still closes it via Minerva's own overlay. */
#main-menu-input:checked ~ #mw-mf-main-menu-button {
    display: none !important;
}
/* The button leaving normal flow collapses its old slot to 0 width, so the
  site name/search would otherwise slide left underneath it; push them
  right to clear it. */
.minerva-header {
    padding-left: 52px;
    box-sizing: border-box;
}
/* List Category:Skills members in a single vertical column instead of the
  default multi-column layout. */
.page-Category_Skills .mw-category-columns {
    column-count: 1 !important;
    column-width: auto !important;
}
.page-Category_Skills .mw-category-group ul {
    display: block !important;
}
.page-Category_Skills .mw-category-group li {
    display: block !important;
}
/* Drop the Score column from the Top Contributors table. */
.contributionscores-wrapper th:nth-child(2),
.contributionscores-wrapper td:nth-child(2) {
    display: none;
}
/* Hide the whole Tools toolbox from the sidebar (What links here, Related
  changes, Printable version, Permanent link, Page information, Cargo
  data) - none of it is meant for regular readers. */
#p-tb {
    display: none !important;
}
#footer-places-about {
    display: none !important;
}
}