MediaWiki:Common.css: Difference between revisions
Perfect OSRS Layout Override |
Definitive clean layout - OSRS style |
||
| Line 656: | Line 656: | ||
} | } | ||
/* --- DESKTOP | |||
/* ========================================================================== | |||
DEFINITIVE LAYOUT OVERRIDE - DO NOT ADD MORE BLOCKS BELOW THIS | |||
Goal: Match OSRS Wiki layout - art banner at top, tabs latched to content box | |||
========================================================================== */ | |||
/* --- BODY: Solid beige canvas, banner only on desktop via body background --- */ | |||
body { | |||
background-image: none !important; | |||
background-color: #e1d5be !important; | |||
} | |||
/* --- HIDE native MediaWiki gradient containers completely --- */ | |||
#mw-page-base, | |||
#mw-head-base { | |||
display: none !important; | |||
height: 0 !important; | |||
} | |||
/* ========================================================================== | |||
DESKTOP LAYOUT (min-width: 1000px) | |||
Structure: | |||
- body has the mystical banner as a 160px tall background-image | |||
- #mw-panel (sidebar) sits at top: 160px | |||
- #mw-head (tab bar) is absolute, top: ~120px (160px - 40px tab height) | |||
- #content gets margin-top: 160px to start right below the banner/tabs | |||
========================================================================== */ | |||
@media screen and (min-width: 1000px) { | @media screen and (min-width: 1000px) { | ||
/* --- | /* 1. Banner on body */ | ||
#mw- | body { | ||
background: url('/resources/assets/mystical_header.png') center top no-repeat !important; | |||
background-color: #e1d5be !important; | |||
/* | background-size: 100% 160px !important; | ||
# | } | ||
/* 2. Tab bar: absolute, sitting flush on top of content box */ | |||
/* | /* Tab bar is ~40px tall. Content starts at 160px. So tabs sit at top: 120px */ | ||
# | #mw-head { | ||
position: absolute !important; | |||
# | top: 120px !important; | ||
left: 0 !important; | |||
#mw-head::before { left: 175px !important; | right: 0 !important; | ||
width: 100% !important; | |||
height: 40px !important; | |||
margin: 0 !important; | |||
z-index: 50 !important; | |||
} | |||
/* 3. Personal tools (login, create account) - top-right corner of page */ | |||
#p-personal { | |||
position: fixed !important; | |||
top: 4px !important; | |||
right: 10px !important; | |||
z-index: 200 !important; | |||
margin: 0 !important; | |||
} | |||
/* 4. Left nav (tab row) and right nav (read/edit buttons) - inside mw-head */ | |||
#left-navigation { | |||
position: absolute !important; | |||
bottom: 0 !important; | |||
left: 175px !important; | |||
margin: 0 !important; | |||
float: none !important; | |||
z-index: 2 !important; | |||
} | |||
#right-navigation { | |||
position: absolute !important; | |||
bottom: 0 !important; | |||
right: 10px !important; | |||
margin: 0 !important; | |||
float: none !important; | |||
z-index: 2 !important; | |||
} | |||
/* 5. Beige bar behind tabs */ | |||
#mw-head::before { | |||
content: "" !important; | |||
position: absolute !important; | |||
bottom: 0 !important; | |||
left: 175px !important; | |||
right: 0 !important; | |||
height: 40px !important; | |||
background-color: #d8ccb4 !important; | |||
border-top: 1px solid #94866d !important; | |||
z-index: 0 !important; | |||
} | |||
/* 6. Content box: pushed down by banner height, left margin for sidebar */ | |||
#content { | |||
margin-top: 160px !important; | |||
margin-left: 175px !important; | |||
position: relative !important; | |||
z-index: 1 !important; | |||
padding-top: 0 !important; | |||
} | } | ||
/* --- | |||
/* 7. Active tab latch over content border */ | |||
.vector-menu-tabs .vector-menu-content-list > li.selected { | |||
margin-bottom: -3px !important; | |||
z-index: 3 !important; | |||
} | |||
/* 8. Logo sits in top-left spanning banner height */ | |||
#p-logo { | |||
position: absolute !important; | |||
top: 0 !important; | |||
left: 0 !important; | |||
width: 175px !important; | |||
height: 160px !important; | |||
z-index: 60 !important; | |||
} | |||
#p-logo a { | |||
height: 160px !important; | |||
} | |||
/* 9. Sidebar below banner */ | |||
#mw-panel { | |||
position: absolute !important; | |||
top: 160px !important; | |||
left: 0 !important; | |||
width: 165px !important; | |||
} | |||
} | |||
/* ========================================================================== | |||
MOBILE LAYOUT (max-width: 999px) | |||
========================================================================== */ | |||
@media screen and (max-width: 999px) { | @media screen and (max-width: 999px) { | ||
body { | |||
#content { margin-top: 20px !important; margin-left: 10px !important; margin-right: 10px !important; } | background-image: none !important; | ||
#mw-head::before { display: none !important; } | background-color: #e1d5be !important; | ||
.vector-menu-tabs .vector-menu-content-list > li { margin-bottom: 2px !important; } | } | ||
#content { | |||
margin-top: 20px !important; | |||
margin-left: 10px !important; | |||
margin-right: 10px !important; | |||
} | |||
#mw-head::before { | |||
display: none !important; | |||
} | |||
#mw-panel { | |||
position: static !important; | |||
} | |||
.vector-menu-tabs .vector-menu-content-list > li { | |||
margin-bottom: 2px !important; | |||
} | |||
} | } | ||
/* | /* ========================================================================== | ||
div.vector-menu-portal, | SIDEBAR PORTAL BACKGROUNDS | ||
========================================================================== */ | |||
div.vector-menu-portal, | |||
#mw-panel div.portal, | #mw-panel div.portal, | ||
.portal, | .portal, | ||
| Line 696: | Line 817: | ||
} | } | ||
/* | /* ========================================================================== | ||
DISCORD WIDGET | |||
========================================================================== */ | |||
.discord-btn a { | .discord-btn a { | ||
background-color: #5865F2 !important; | background-color: #5865F2 !important; | ||
| Line 711: | Line 834: | ||
transform: translateY(-2px) !important; | transform: translateY(-2px) !important; | ||
} | } | ||
.discord-widget-modern { | .discord-widget-modern { | ||
position: relative; | position: relative; | ||
| Line 747: | Line 869: | ||
margin-right: 15px; | margin-right: 15px; | ||
} | } | ||
.discord-text { | .discord-text { flex-grow: 1; } | ||
.discord-server-name { font-weight: 800; font-size: 17px; margin-bottom: 2px; } | |||
} | .discord-join-text { font-size: 14px; } | ||
.discord-server-name { | .discord-arrow { font-size: 28px; font-weight: bold; margin-left: 10px; line-height: 1; } | ||
} | |||
.discord-join-text { | |||
} | |||
.discord-arrow { | |||
} | |||
.discord-bottom { | .discord-bottom { | ||
background-color: #4752C4; | background-color: #4752C4; | ||
| Line 773: | Line 882: | ||
transition: background-color 0.2s ease; | transition: background-color 0.2s ease; | ||
} | } | ||
.discord-widget-modern:hover { | .discord-widget-modern:hover { background-color: #4752C4; cursor: pointer; } | ||
.discord-widget-modern:hover .discord-bottom { background-color: #3b45a5; } | |||
} | |||
.discord-widget-modern:hover .discord-bottom { | |||
} | |||