MediaWiki:Common.css: Difference between revisions
Definitive clean layout - OSRS style |
Fresh layout rebuild - OSRS style from scratch |
||
| Line 619: | Line 619: | ||
margin-top: 48px !important; /* Push it down below the beige header bar */ | margin-top: 48px !important; /* Push it down below the beige header bar */ | ||
} | } | ||
/* | /* ========================================================================== | ||
CLEAN LAYOUT SYSTEM - Rebuilt from scratch to match OSRS Wiki | |||
Vector Legacy DOM order: | |||
#mw-page-base (empty div, used for background) | |||
#mw-head-base (empty div, hide it) | |||
#content (article body) | |||
#mw-navigation | |||
#mw-head (tab bar, search, personal tools) | |||
#mw-panel (sidebar + logo) | |||
Goal: banner spans top 160px, sidebar/logo overlaps banner from left, | |||
tabs sit at bottom of banner and latch onto content box border, | |||
content starts at 160px. | |||
========================================================================== */ | |||
/* --- Body: solid beige canvas, no image --- */ | |||
body { | body { | ||
background: #e1d5be !important; | |||
background-image: none !important; | background-image: none !important; | ||
} | } | ||
/* | /* --- mw-page-base: this is the banner. Vector Legacy already positions it absolute. --- */ | ||
#mw-page-base { | #mw-page-base { | ||
position: | position: absolute !important; | ||
top: 0 !important; | |||
left: 0 !important; | |||
right: 0 !important; | |||
width: 100% !important; | |||
height: 160px !important; | |||
background: url('/resources/assets/mystical_header.png') center top no-repeat !important; | |||
background-size: 100% 160px !important; | |||
background-color: transparent !important; | |||
z-index: 0 !important; | |||
display: block !important; | |||
/ | |||
/ | |||
} | } | ||
/* --- | /* --- mw-head-base: hide the legacy gradient overlay --- */ | ||
#mw-head-base { | #mw-head-base { | ||
display: none !important; | display: none !important; | ||
} | } | ||
/* ========================================================================== | /* ========================================================================== | ||
DESKTOP LAYOUT ( | DESKTOP LAYOUT (>= 1000px wide) | ||
========================================================================== */ | ========================================================================== */ | ||
@media screen and (min-width: 1000px) { | @media screen and (min-width: 1000px) { | ||
/* | /* --- mw-head: the tab bar row --- | ||
Banner = 160px. Tab bar is ~40px tall. | |||
Position it at top: 120px so tabs sit at the bottom of the banner. */ | |||
#mw-head { | #mw-head { | ||
position: absolute !important; | position: absolute !important; | ||
| Line 699: | Line 675: | ||
left: 0 !important; | left: 0 !important; | ||
right: 0 !important; | right: 0 !important; | ||
height: 40px !important; | |||
width: 100% !important; | width: 100% !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 !important; | |||
z-index: 50 !important; | z-index: 50 !important; | ||
} | } | ||
/* | /* --- Beige bar that runs behind the tabs --- */ | ||
# | #mw-head::before { | ||
position: | content: "" !important; | ||
display: block !important; | |||
right: | position: absolute !important; | ||
bottom: 0 !important; | |||
left: 165px !important; | |||
right: 0 !important; | |||
height: 40px !important; | |||
background-color: #d8ccb4 !important; | |||
border-top: 2px solid #3d2b1f !important; | |||
z-index: 0 !important; | |||
} | } | ||
/* | /* --- Tab navigation: left side (Main Page, Discussion) --- */ | ||
#left-navigation { | #left-navigation { | ||
position: absolute !important; | position: absolute !important; | ||
bottom: 0 !important; | bottom: 0 !important; | ||
left: | left: 165px !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
float: none !important; | float: none !important; | ||
z-index: 2 !important; | z-index: 2 !important; | ||
} | } | ||
/* --- Tab navigation: right side (Read, Edit, Search) --- */ | |||
#right-navigation { | #right-navigation { | ||
position: absolute !important; | position: absolute !important; | ||
bottom: 0 !important; | bottom: 0 !important; | ||
right: | right: 0 !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
float: none !important; | float: none !important; | ||
| Line 732: | Line 716: | ||
} | } | ||
/* | /* --- Personal tools (Create account / Log in) - top right corner --- */ | ||
# | #p-personal { | ||
position: absolute !important; | position: absolute !important; | ||
top: -90px !important; | |||
right: 10px !important; | |||
margin: 0 !important; | |||
z-index: 200 !important; | |||
background-color: | } | ||
border | #p-personal ul { | ||
background-color: transparent !important; | |||
border: none !important; | |||
padding: 0 !important; | |||
} | } | ||
/* | /* --- Content box: starts exactly at bottom of banner --- */ | ||
#content { | #content { | ||
position: relative !important; | position: relative !important; | ||
z-index: 1 !important; | z-index: 1 !important; | ||
margin-top: 160px !important; | |||
margin-left: 165px !important; | |||
padding-top: 0 !important; | padding-top: 0 !important; | ||
} | } | ||
/* | /* --- Active tab: pulls down 3px to merge with content box top border --- */ | ||
.vector-menu-tabs .vector-menu-content-list > li.selected { | .vector-menu-tabs .vector-menu-content-list > li.selected { | ||
margin-bottom: -3px !important; | margin-bottom: -3px !important; | ||
z-index: 3 !important; | z-index: 3 !important; | ||
position: relative !important; | |||
} | } | ||
/* | /* --- Sidebar panel: sits at top:0 so logo naturally overlaps the banner --- */ | ||
# | #mw-panel { | ||
position: absolute !important; | position: absolute !important; | ||
top: 0 !important; | top: 0 !important; | ||
left: 0 !important; | left: 0 !important; | ||
width: | width: 165px !important; | ||
padding-top: 0 !important; | |||
z-index: 10 !important; | |||
} | |||
/* --- Logo: spans the full banner height (160px) --- */ | |||
#p-logo { | |||
height: 160px !important; | height: 160px !important; | ||
display: flex !important; | |||
align-items: center !important; | |||
justify-content: center !important; | |||
padding: 0 !important; | |||
margin: 0 !important; | |||
} | } | ||
#p-logo a { | #p-logo a { | ||
display: block !important; | |||
width: 100% !important; | |||
height: 160px !important; | height: 160px !important; | ||
background-position: center center !important; | |||
background-size: contain !important; | |||
} | } | ||
} | } | ||
/* ========================================================================== | /* ========================================================================== | ||
MOBILE LAYOUT ( | MOBILE LAYOUT (< 1000px wide) | ||
========================================================================== */ | ========================================================================== */ | ||
@media screen and (max-width: 999px) { | @media screen and (max-width: 999px) { | ||
body { | body { | ||
background | background: #e1d5be !important; | ||
} | |||
#mw-page-base { | |||
display: none !important; | |||
} | } | ||
#content { | #content { | ||
| Line 794: | Line 788: | ||
margin-left: 10px !important; | margin-left: 10px !important; | ||
margin-right: 10px !important; | margin-right: 10px !important; | ||
padding-top: 10px !important; | |||
} | |||
#mw-head { | |||
position: static !important; | |||
top: auto !important; | |||
} | } | ||
#mw-head::before { | #mw-head::before { | ||
| Line 800: | Line 799: | ||
#mw-panel { | #mw-panel { | ||
position: static !important; | position: static !important; | ||
} | |||
#p-logo { | |||
height: auto !important; | |||
} | } | ||
.vector-menu-tabs .vector-menu-content-list > li { | .vector-menu-tabs .vector-menu-content-list > li { | ||
| Line 820: | Line 822: | ||
DISCORD WIDGET | DISCORD WIDGET | ||
========================================================================== */ | ========================================================================== */ | ||
.discord-widget-modern { | .discord-widget-modern { | ||
position: relative; | position: relative; | ||
| Line 850: | Line 838: | ||
text-decoration: none !important; | text-decoration: none !important; | ||
} | } | ||
.discord-click-target { | .discord-click-target { display: block; width: 100%; height: 100%; } | ||
.discord-top { padding: 16px 20px; display: flex; align-items: center; } | |||
} | |||
.discord-top { | |||
} | |||
.discord-icon { | .discord-icon { | ||
width: 45px; | width: 45px; height: 35px; | ||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36" fill="%23ffffff"><path d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1,105.25,105.25,0,0,0,32.19-16.14c0,0,.04-.06.05-.09,2.7-27.14-2.88-51.52-19-72.06ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.31,60,73.31,53s5-12.74,11.43-12.74S96.2,46,96.09,53,91.04,65.69,84.69,65.69Z"/></svg>'); | background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36" fill="%23ffffff"><path d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1,105.25,105.25,0,0,0,32.19-16.14c0,0,.04-.06.05-.09,2.7-27.14-2.88-51.52-19-72.06ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.31,60,73.31,53s5-12.74,11.43-12.74S96.2,46,96.09,53,91.04,65.69,84.69,65.69Z"/></svg>'); | ||
background-size: contain; | background-size: contain; background-repeat: no-repeat; background-position: center; | ||
margin-right: 15px; | margin-right: 15px; | ||
} | } | ||
| Line 874: | Line 851: | ||
.discord-arrow { font-size: 28px; font-weight: bold; margin-left: 10px; line-height: 1; } | .discord-arrow { font-size: 28px; font-weight: bold; margin-left: 10px; line-height: 1; } | ||
.discord-bottom { | .discord-bottom { | ||
background-color: #4752C4; | background-color: #4752C4; padding: 10px; text-align: center; | ||
font-size: 12px; font-weight: 800; letter-spacing: 0.5px; | |||
font-size: 12px; | |||
transition: background-color 0.2s ease; | transition: background-color 0.2s ease; | ||
} | } | ||
.discord-widget-modern:hover { background-color: #4752C4; cursor: pointer; } | .discord-widget-modern:hover { background-color: #4752C4; cursor: pointer; } | ||
.discord-widget-modern:hover .discord-bottom { background-color: #3b45a5; } | .discord-widget-modern:hover .discord-bottom { background-color: #3b45a5; } | ||