User:Udays108/common.css: Difference between revisions
Appearance
Created page with "→============================================================ MIT BioMicro Center — MediaWiki Custom Styles Skin: Vector-2022 Scope: User:USERNAME/common.css (personal preview only) Promote to MediaWiki:Common.css for site-wide deployment ============================================================: /* ── 1. Design Tokens ─────────────────────────────────────────..." |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ============================================================ | /* ============================================================ | ||
MIT BioMicro Center — MediaWiki Custom Styles | MIT BioMicro Center — MediaWiki Custom Styles | ||
Skin: Vector-2022 | Skin: Vector-2022 | ||
Scope: User:USERNAME/common.css (personal preview | Scope: User:USERNAME/common.css (personal preview) | ||
============================================================ */ | ============================================================ */ | ||
| Line 9: | Line 9: | ||
/* ── 1. Design Tokens ───────────────────────────────────────── */ | /* ── 1. Design Tokens ───────────────────────────────────────── */ | ||
:root { | :root { | ||
--bmc-crimson: | --bmc-crimson: #a31f34; | ||
--bmc-crimson-dark: | --bmc-crimson-dark: #7a1626; | ||
--bmc-crimson-light: | --bmc-crimson-light: #fde8ec; | ||
--bmc-text: | --bmc-text: #1a1a1a; | ||
--bmc-text-muted: | --bmc-text-muted: #666; | ||
--bmc-bg: | --bmc-bg: #fff; | ||
--bmc-bg-card: | --bmc-bg-card: #f9f9f9; | ||
--bmc-border: | --bmc-border: #e8e8e8; | ||
--bmc-border-hover: | --bmc-border-hover: #c8a0a8; | ||
--bmc- | --bmc-font: 'Helvetica Neue', Arial, sans-serif; | ||
--bmc-max-width: 1140px; | |||
--bmc-max-width: | |||
} | } | ||
/* ── 2. | /* ── 2. Hide Vector-2022 Chrome ─────────────────────────────── */ | ||
/* We replace header, left nav sidebar, and footer with our own */ | |||
. | .vector-header, | ||
. | .vector-sticky-header, | ||
.vector-main-menu-container, | |||
.vector-footer, | |||
#footer, | |||
.mw-footer { | |||
display: none !important; | |||
} | } | ||
/* Remove Vector's default page padding that assumes its header height */ | |||
.mw-page-container { | |||
/* | padding-top: 0 !important; | ||
.mw- | margin-top: 0 !important; | ||
max-width: 100% !important; | |||
} | } | ||
.mw- | .mw-page-container-inner { | ||
display: block !important; | |||
padding: 0 !important; | |||
margin: 0 !important; | |||
} | } | ||
/* Content container: remove Vector's column layout so our layout takes over */ | |||
.mw- | .mw-content-container { | ||
max-width: 100% !important; | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
display: block !important; | |||
} | } | ||
/* | /* The actual content area */ | ||
#mw-content { | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
border: none !important; | |||
} | } | ||
/* | /* Hide original h1 — we recreate it in the hero banner */ | ||
h1.firstHeading, | h1.firstHeading, | ||
.mw-first-heading { | .mw-first-heading { | ||
display: none !important; | |||
} | } | ||
/* Hide Vector's page toolbar (edit tabs area) background/border, | |||
/* | but keep the actual edit buttons visible and accessible */ | ||
. | .vector-page-toolbar { | ||
border-bottom: 1px solid var(--bmc-border) !important; | |||
background: #fff !important; | |||
max-width: var(--bmc-max-width) !important; | |||
margin: 0 auto !important; | |||
padding: 0 24px !important; | |||
border-bottom: | |||
margin: | |||
} | } | ||
. | /* Vector-2022 TOC — restyle to match our sidebar card */ | ||
.vector-toc-landmark, | |||
#mw-panel-toc { | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
} | } | ||
.vector-toc { | |||
background: var(--bmc-bg-card) !important; | background: var(--bmc-bg-card) !important; | ||
border: 1px solid var(--bmc-border) !important; | border: 1px solid var(--bmc-border) !important; | ||
| Line 210: | Line 92: | ||
padding: 20px !important; | padding: 20px !important; | ||
box-shadow: none !important; | box-shadow: none !important; | ||
font-family: var(--bmc-font) !important; | |||
} | } | ||
.vector-toc .vector-toc-title-bar { | |||
.vector-toc | |||
.vector-toc-title-bar { | |||
border-bottom: 1px solid var(--bmc-border) !important; | border-bottom: 1px solid var(--bmc-border) !important; | ||
padding-bottom: 10px !important; | padding-bottom: 10px !important; | ||
| Line 228: | Line 109: | ||
} | } | ||
.vector-toc-toggle { display: none !important; } | |||
.vector-toc-toggle { | |||
} | |||
.vector-toc .vector-toc-link { | .vector-toc .vector-toc-link { | ||
font-size: 0.82rem; | font-size: 0.82rem !important; | ||
color: #444; | color: #444 !important; | ||
padding: 4px 8px | padding: 4px 8px !important; | ||
border-radius: 4px !important; | |||
border-radius: 4px; | transition: background 0.12s, color 0.12s !important; | ||
transition: background 0.12s, color 0.12s; | text-decoration: none !important; | ||
text-decoration: none; | display: block !important; | ||
} | } | ||
.vector-toc .vector-toc-link:hover { | .vector-toc .vector-toc-link:hover { | ||
background: #f0e8ea; | background: #f0e8ea !important; | ||
color: var(--bmc-crimson); | color: var(--bmc-crimson) !important; | ||
text-decoration: none; | text-decoration: none !important; | ||
} | } | ||
.vector-toc-list-item-active > .vector-toc-link { | |||
.vector-toc-list-item-active > .vector-toc-link | color: var(--bmc-crimson) !important; | ||
font-weight: 600 !important; | |||
color: var(--bmc-crimson); | background: #fdf5f6 !important; | ||
font-weight: 600; | |||
background: #fdf5f6; | |||
} | } | ||
.vector-toc .vector-toc-list .vector-toc-list > li > .vector-toc-link { | .vector-toc .vector-toc-list .vector-toc-list > li > .vector-toc-link { | ||
padding-left: 20px; | padding-left: 20px !important; | ||
font-size: 0.78rem; | font-size: 0.78rem !important; | ||
color: var(--bmc-text-muted); | color: var(--bmc-text-muted) !important; | ||
} | } | ||
/* ── | /* ── 3. Our Injected Topbar ─────────────────────────────────── */ | ||
. | .bmc-topbar { | ||
background: var(--bmc-crimson); | |||
color: #fff; | |||
font-size: 0. | font-size: 0.75rem; | ||
padding: 6px 0; | |||
text-align: right; | |||
font-family: var(--bmc-font); | font-family: var(--bmc-font); | ||
} | } | ||
.bmc-topbar .bmc-inner { | |||
max-width: var(--bmc-max-width); | |||
margin: 0 auto; | |||
padding: 0 24px; | |||
} | |||
.bmc-topbar a { color: #fff; opacity: 0.85; text-decoration: none; } | |||
.bmc-topbar a:hover { opacity: 1; } | |||
.bmc-topbar .bmc-sep { margin: 0 6px; opacity: 0.5; } | |||
/* | |||
. | /* ── 4. Our Injected Header ─────────────────────────────────── */ | ||
.bmc-header { | |||
background: #fff; | |||
border-bottom: 1px solid #e0e0e0; | |||
margin- | position: sticky; | ||
top: 0; | |||
z-index: 500; | |||
box-shadow: 0 1px 4px rgba(0,0,0,0.07); | |||
font-family: var(--bmc-font); | |||
} | |||
.bmc-header-inner { | |||
max-width: var(--bmc-max-width); | |||
margin: 0 auto; | |||
padding: 0 24px; | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
height: 68px; | |||
} | } | ||
/* | /* Logo */ | ||
. | .bmc-logo { | ||
. | display: flex; | ||
background: | align-items: center; | ||
gap: 12px; | |||
text-decoration: none; | |||
font-weight: | flex-shrink: 0; | ||
} | |||
.bmc-logo-mark { | |||
letter-spacing: 0. | width: 40px; height: 40px; | ||
background: var(--bmc-crimson); | |||
border-radius: 4px; | |||
display: flex; align-items: center; justify-content: center; | |||
color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: -0.5px; | |||
flex-shrink: 0; | |||
} | |||
.bmc-logo-text .bmc-logo-name { | |||
font-size: 1rem; font-weight: 700; color: var(--bmc-text); letter-spacing: -0.2px; | |||
line-height: 1.2; | |||
} | |||
.bmc-logo-text .bmc-logo-sub { | |||
font-size: 0.72rem; color: var(--bmc-text-muted); font-weight: 400; | |||
} | } | ||
/* | /* Right side: search + user tools from Vector (moved into our header) */ | ||
. | .bmc-header-right { | ||
display: flex; | |||
align-items: center; | |||
gap: 12px; | |||
} | } | ||
. | /* The Vector search form we move into our header */ | ||
.bmc-header-right .vector-search-box, | |||
.bmc-header-right #p-search { | |||
margin: 0 !important; | |||
padding: 0 !important; | |||
} | } | ||
.bmc-header-right .vector-search-box-input, | |||
. | .bmc-header-right #searchInput { | ||
border: 1px solid #e0e0e0 !important; | |||
border-radius: 6px !important; | |||
padding: 6px 10px !important; | |||
font-size: 0.83rem !important; | |||
font-family: var(--bmc-font) !important; | |||
width: 180px !important; | |||
transition: border-color 0.15s !important; | |||
} | } | ||
.bmc-header-right .vector-search-box-input:focus, | |||
. | .bmc-header-right #searchInput:focus { | ||
border-color: var(--bmc-crimson) !important; | |||
outline: none !important; | |||
} | } | ||
/* | /* User menu moved into our header */ | ||
. | .bmc-header-right .vector-user-links { | ||
display: flex !important; | |||
align-items: center !important; | |||
} | } | ||
/* ── | /* ── 5. Our Injected Navigation ─────────────────────────────── */ | ||
.bmc-nav { display: flex; align-items: center; } | |||
.bmc- | .bmc-nav > ul { | ||
list-style: none; | |||
display: flex; | |||
gap: 2px; | |||
margin: 0; padding: 0; | |||
font-size: 0. | } | ||
.bmc-nav > ul > li { position: relative; } | |||
.bmc-nav > ul > li > a { | |||
display: block; | |||
padding: 8px 14px; | |||
font-size: 0.85rem; font-weight: 500; color: #333; | |||
border-radius: 4px; white-space: nowrap; | |||
transition: background 0.15s, color 0.15s; | |||
text-decoration: none; | |||
font-family: var(--bmc-font); | font-family: var(--bmc-font); | ||
} | |||
.bmc-nav > ul > li > a:hover, | |||
.bmc-nav > ul > li.bmc-active > a { | |||
background: #f5f5f5; | |||
color: var(--bmc-crimson); | |||
text-decoration: none; | |||
} | } | ||
.bmc- | /* Dropdown arrow */ | ||
.bmc-dropdown > a::after { content: ' ▾'; font-size: 0.65rem; opacity: 0.6; } | |||
.bmc- | /* Dropdown menu */ | ||
background: # | .bmc-dropdown-menu { | ||
border- | display: none; | ||
position: absolute; top: calc(100% + 4px); left: 0; | |||
background: #fff; border: 1px solid #e0e0e0; | |||
border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,0.10); | |||
min-width: 200px; padding: 6px 0; z-index: 600; | |||
font-family: var(--bmc-font); | |||
} | } | ||
.bmc-dropdown:hover .bmc-dropdown-menu { display: block; } | |||
.bmc- | .bmc-dropdown-menu a { | ||
display: block; padding: 8px 18px; | |||
font-size: 0.83rem; color: #333; | |||
transition: background 0.12s; | |||
text-decoration: none; | |||
} | |||
.bmc-dropdown-menu a:hover { | |||
background: #faf0f0; color: var(--bmc-crimson); text-decoration: none; | |||
} | } | ||
.bmc-dropdown-menu .bmc-divider { border-top: 1px solid #eee; margin: 4px 0; } | |||
.bmc-dropdown-menu .bmc-group-label { | |||
. | padding: 6px 18px 2px; font-size: 0.7rem; | ||
font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.05em; | |||
} | } | ||
/* ── | /* ── 6. Our Injected Hero ───────────────────────────────────── */ | ||
.bmc-hero { | |||
.bmc- | background: linear-gradient(135deg, var(--bmc-crimson) 0%, var(--bmc-crimson-dark) 100%); | ||
background: var(--bmc- | color: #fff; | ||
padding: 40px 0 36px; | |||
padding: | |||
font-family: var(--bmc-font); | font-family: var(--bmc-font); | ||
} | } | ||
.bmc-hero .bmc-inner { | |||
.bmc- | max-width: var(--bmc-max-width); | ||
margin: 0 auto; | |||
padding: 0 24px; | |||
} | |||
.bmc-breadcrumb { | |||
font-size: 0.78rem; margin-bottom: 10px; opacity: 0.75; | |||
} | } | ||
.bmc-breadcrumb a { color: #fff; text-decoration: none; } | |||
.bmc- | .bmc-breadcrumb a:hover { text-decoration: underline; } | ||
font-size: | .bmc-breadcrumb .bmc-sep { margin: 0 6px; } | ||
.bmc-hero h1 { | |||
color: | font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; | ||
color: #fff !important; display: block !important; | |||
border: none !important; padding: 0 !important; margin: 0 !important; | |||
} | } | ||
/* | /* ── 7. Page Layout Wrapper ─────────────────────────────────── */ | ||
.bmc- | /* Wraps Vector's content region in our grid */ | ||
.bmc-page-layout { | |||
max-width: var(--bmc-max-width); | |||
margin: 0 auto; | |||
padding: 40px 24px 80px; | |||
display: grid; | display: grid; | ||
grid-template-columns: | grid-template-columns: 220px 1fr; | ||
gap: | gap: 40px; | ||
font-family: var(--bmc-font); | |||
} | } | ||
.bmc- | .bmc-sidebar { | ||
position: sticky; | |||
top: 84px; | |||
align-self: start; | |||
} | } | ||
.bmc- | .bmc-content-col { | ||
min-width: 0; /* prevent grid blowout */ | |||
} | } | ||
/* ── | /* ── 8. Content Typography ──────────────────────────────────── */ | ||
.mw-parser-output { | |||
font-family: var(--bmc-font) !important; | |||
font-size: 0.9rem; | |||
font-size: 0. | color: #333; | ||
line-height: 1.6; | |||
} | } | ||
. | .mw-parser-output a, | ||
.mw-body-content a { | |||
color: var(--bmc-crimson); | color: var(--bmc-crimson); | ||
text-decoration: none; | |||
} | } | ||
.mw-parser-output a:hover { color: var(--bmc-crimson-dark); text-decoration: underline; } | |||
.mw-parser-output a:visited { color: var(--bmc-crimson); } | |||
. | .mw-parser-output h2 { | ||
font-size: 1.35rem !important; | |||
color: | font-weight: 700 !important; | ||
color: var(--bmc-text) !important; | |||
padding-bottom: 10px !important; | |||
border-bottom: 2px solid var(--bmc-crimson) !important; | |||
margin: 48px 0 18px !important; | |||
letter-spacing: -0.2px; | |||
scroll-margin-top: 88px; | |||
} | } | ||
.mw-parser-output h2:first-child { margin-top: 0 !important; } | |||
. | .mw-parser-output h3 { | ||
font-size: 1rem !important; | |||
color: | font-weight: 600 !important; | ||
color: var(--bmc-text) !important; | |||
margin: 28px 0 10px !important; | |||
scroll-margin-top: 88px; | |||
} | } | ||
. | .mw-parser-output h4 { | ||
font-size: 0.88rem !important; | |||
color: # | font-weight: 700 !important; | ||
color: #444 !important; | |||
margin: 20px 0 8px !important; | |||
} | } | ||
.mw-parser-output p { margin-bottom: 14px !important; } | |||
/* ── | /* ── 9. Tables ──────────────────────────────────────────────── */ | ||
.mw-parser-output .wikitable { | |||
. | width: 100%; | ||
border-collapse: collapse !important; | |||
font-size: 0.83rem; | |||
font-family: var(--bmc-font); | |||
background: var(--bmc-bg); | |||
border: 1px solid #e4e4e4 !important; | |||
margin-bottom: 26px; | |||
} | |||
.mw-parser-output .wikitable thead th, | |||
.mw-parser-output .wikitable > tr > th { | |||
background: #1a1a1a !important; | |||
color: #fff !important; | |||
padding: 11px 14px !important; | |||
font-weight: 600; | |||
font-size: 0.78rem; | |||
text-align: left; | |||
border: none !important; | |||
white-space: nowrap; | |||
} | |||
.mw-parser-output .wikitable tbody td, | |||
.mw-parser-output .wikitable > tr > td { | |||
padding: 10px 14px !important; | |||
vertical-align: top; | |||
border-bottom: 1px solid #f0f0f0 !important; | |||
border-left: none !important; | |||
border-right: none !important; | |||
border-top: none !important; | |||
} | } | ||
.mw-parser-output .wikitable tbody tr:hover td { background: #fafafa; } | |||
.mw-parser-output .wikitable tbody tr:last-child td { border-bottom: none !important; } | |||
.bmc- | |||
/* ── 10. Note Boxes ─────────────────────────────────────────── */ | |||
.bmc-note { | |||
padding: 14px 0; | background: #fdf6f0; border-left: 3px solid #e07b39; | ||
padding: 10px 14px; border-radius: 0 6px 6px 0; | |||
font-size: 0.82rem; color: #555; margin: 12px 0 18px; | |||
font-family: var(--bmc-font); | |||
} | } | ||
.bmc-note strong { color: #c0622a; } | |||
.bmc-note-info { background: #f0f6ff; border-left-color: #3b7dd8; } | |||
.bmc-note-warn { background: #fff9e6; border-left-color: #d4a017; } | |||
.bmc- | /* ── 11. Cards & Grids ──────────────────────────────────────── */ | ||
.bmc-card { | |||
background: var(--bmc-bg-card); border: 1px solid var(--bmc-border); | |||
border-radius: 8px; padding: 20px 22px; | |||
background: var(--bmc- | transition: border-color 0.15s, box-shadow 0.15s; | ||
font-family: var(--bmc-font); | |||
border-radius: | } | ||
.bmc-card:hover { | |||
border-color: var(--bmc-border-hover); | |||
box-shadow: 0 2px 10px rgba(163,31,52,0.07); | |||
} | } | ||
.bmc-card h4 { font-size: 0.88rem; font-weight: 700; color: var(--bmc-crimson); margin-bottom: 6px; } | |||
.bmc-card p { font-size: 0.82rem; color: #555; margin: 0; line-height: 1.5; } | |||
.bmc- | .bmc-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin: 20px 0 28px; } | ||
.bmc- | .bmc-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 20px 0 28px; } | ||
.bmc- | .bmc-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 20px 0 28px; } | ||
/* ── | /* ── 12. Badges ─────────────────────────────────────────────── */ | ||
.bmc- | .bmc-badge { | ||
display: inline-block; font-size: 0.68rem; padding: 2px 7px; | |||
border-radius: 10px; font-weight: 600; white-space: nowrap; | |||
border-radius: | |||
font-family: var(--bmc-font); | font-family: var(--bmc-font); | ||
} | } | ||
.bmc-badge-red { background: var(--bmc-crimson-light); color: var(--bmc-crimson); } | |||
.bmc-badge-blue { background: #e8f4fd; color: #1a6fa8; } | |||
.bmc-badge-green { background: #e8f9ef; color: #1a8042; } | |||
.bmc-badge-gray { background: #f0f0f0; color: #555; } | |||
.bmc- | /* ── 13. Our Injected Footer ────────────────────────────────── */ | ||
.bmc-footer { | |||
background: #1a1a1a; color: #aaa; | |||
padding: 40px 0; font-size: 0.82rem; | |||
font-family: var(--bmc-font); | |||
} | } | ||
.bmc-footer-inner { | |||
.bmc- | max-width: var(--bmc-max-width); margin: 0 auto; padding: 0 24px; | ||
display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; | |||
font- | } | ||
.bmc-footer h4 { | |||
font-size: 0.75rem; font-weight: 700; text-transform: uppercase; | |||
letter-spacing: 0.08em; color: #fff; margin-bottom: 12px; | |||
} | |||
.bmc-footer ul { list-style: none; margin: 0; padding: 0; } | |||
.bmc-footer ul li { margin-bottom: 6px; } | |||
.bmc-footer ul li a { color: #aaa; text-decoration: none; } | |||
.bmc-footer ul li a:hover { color: #fff; } | |||
.bmc-footer-bottom { | |||
max-width: var(--bmc-max-width); margin: 24px auto 0; | |||
padding: 20px 24px 0; border-top: 1px solid #333; | |||
display: flex; justify-content: space-between; align-items: center; | |||
flex-wrap: wrap; gap: 8px; font-size: 0.77rem; color: #666; | |||
} | } | ||
.bmc-footer-bottom a { color: #666; } | |||
.bmc-footer-bottom a:hover { color: #aaa; } | |||
/* ── 14. Tab Panel System ───────────────────────────────────── */ | |||
.tab-bar-wrap { | .tab-bar-wrap { | ||
background: linear-gradient(135deg, var(--bmc-crimson) 0%, var(--bmc-crimson-dark) 100%); | background: linear-gradient(135deg, var(--bmc-crimson) 0%, var(--bmc-crimson-dark) 100%); | ||
border-bottom: 3px solid rgba(0, 0, 0, 0.15) | border-bottom: 3px solid rgba(0,0,0,0.15); | ||
} | } | ||
.tab-bar { | .tab-bar { | ||
max-width: var(--bmc-max-width); | max-width: var(--bmc-max-width); margin: 0 auto; padding: 0 24px; | ||
display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; | |||
display: flex; | |||
} | } | ||
.tab-bar::-webkit-scrollbar { display: none; } | .tab-bar::-webkit-scrollbar { display: none; } | ||
.tab-btn { | .tab-btn { | ||
flex-shrink: 0; | flex-shrink: 0; padding: 13px 22px; | ||
font-size: 0.87rem; font-weight: 500; | |||
font-size: 0.87rem; | color: rgba(255,255,255,0.7); | ||
background: transparent; border: none; | |||
color: rgba(255, 255, 255, 0.7); | border-bottom: 3px solid transparent; margin-bottom: -3px; | ||
background: transparent; | cursor: pointer; white-space: nowrap; | ||
border-bottom: 3px solid transparent; | |||
cursor: pointer; | |||
transition: color 0.15s, border-color 0.15s, background 0.15s; | transition: color 0.15s, border-color 0.15s, background 0.15s; | ||
border-radius: 4px 4px 0 0; | border-radius: 4px 4px 0 0; font-family: var(--bmc-font); | ||
} | } | ||
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.08); } | |||
.tab-btn.active { | .tab-btn.active { color: #fff; font-weight: 600; background: rgba(255,255,255,0.12); border-bottom-color: #fff; } | ||
} | |||
.tab-panel { display: none; } | .tab-panel { display: none; } | ||
.tab-panel.active { display: block; } | .tab-panel.active { display: block; } | ||
/* ── | /* ── 15. Responsive ─────────────────────────────────────────── */ | ||
@media screen and (max-width: 860px) { | @media screen and (max-width: 860px) { | ||
.bmc-grid-2, | .bmc-page-layout { grid-template-columns: 1fr; } | ||
.bmc-sidebar { position: static; } | |||
.bmc-grid-2, .bmc-grid-3, .bmc-grid-4 { grid-template-columns: 1fr; } | |||
.bmc-footer-inner { grid-template-columns: 1fr 1fr; } | |||
} | } | ||
@media screen and (max-width: 580px) { | @media screen and (max-width: 580px) { | ||
h1 | .bmc-hero h1 { font-size: 1.5rem !important; } | ||
.bmc-footer-inner { grid-template-columns: 1fr; } | |||
.bmc- | .bmc-nav > ul { display: none; } | ||
. | |||
} | } | ||
Revision as of 19:48, 8 May 2026
/* ============================================================
MIT BioMicro Center — MediaWiki Custom Styles
Skin: Vector-2022
Scope: User:USERNAME/common.css (personal preview)
============================================================ */
/* ── 1. Design Tokens ───────────────────────────────────────── */
:root {
--bmc-crimson: #a31f34;
--bmc-crimson-dark: #7a1626;
--bmc-crimson-light: #fde8ec;
--bmc-text: #1a1a1a;
--bmc-text-muted: #666;
--bmc-bg: #fff;
--bmc-bg-card: #f9f9f9;
--bmc-border: #e8e8e8;
--bmc-border-hover: #c8a0a8;
--bmc-font: 'Helvetica Neue', Arial, sans-serif;
--bmc-max-width: 1140px;
}
/* ── 2. Hide Vector-2022 Chrome ─────────────────────────────── */
/* We replace header, left nav sidebar, and footer with our own */
.vector-header,
.vector-sticky-header,
.vector-main-menu-container,
.vector-footer,
#footer,
.mw-footer {
display: none !important;
}
/* Remove Vector's default page padding that assumes its header height */
.mw-page-container {
padding-top: 0 !important;
margin-top: 0 !important;
max-width: 100% !important;
}
.mw-page-container-inner {
display: block !important;
padding: 0 !important;
margin: 0 !important;
}
/* Content container: remove Vector's column layout so our layout takes over */
.mw-content-container {
max-width: 100% !important;
margin: 0 !important;
padding: 0 !important;
display: block !important;
}
/* The actual content area */
#mw-content {
margin: 0 !important;
padding: 0 !important;
border: none !important;
}
/* Hide original h1 — we recreate it in the hero banner */
h1.firstHeading,
.mw-first-heading {
display: none !important;
}
/* Hide Vector's page toolbar (edit tabs area) background/border,
but keep the actual edit buttons visible and accessible */
.vector-page-toolbar {
border-bottom: 1px solid var(--bmc-border) !important;
background: #fff !important;
max-width: var(--bmc-max-width) !important;
margin: 0 auto !important;
padding: 0 24px !important;
}
/* Vector-2022 TOC — restyle to match our sidebar card */
.vector-toc-landmark,
#mw-panel-toc {
margin: 0 !important;
padding: 0 !important;
}
.vector-toc {
background: var(--bmc-bg-card) !important;
border: 1px solid var(--bmc-border) !important;
border-radius: 8px !important;
padding: 20px !important;
box-shadow: none !important;
font-family: var(--bmc-font) !important;
}
.vector-toc .vector-toc-title-bar {
border-bottom: 1px solid var(--bmc-border) !important;
padding-bottom: 10px !important;
margin-bottom: 10px !important;
}
.vector-toc .vector-toc-title-text {
font-size: 0.78rem !important;
font-weight: 700 !important;
text-transform: uppercase !important;
letter-spacing: 0.08em !important;
color: #999 !important;
}
.vector-toc-toggle { display: none !important; }
.vector-toc .vector-toc-link {
font-size: 0.82rem !important;
color: #444 !important;
padding: 4px 8px !important;
border-radius: 4px !important;
transition: background 0.12s, color 0.12s !important;
text-decoration: none !important;
display: block !important;
}
.vector-toc .vector-toc-link:hover {
background: #f0e8ea !important;
color: var(--bmc-crimson) !important;
text-decoration: none !important;
}
.vector-toc-list-item-active > .vector-toc-link {
color: var(--bmc-crimson) !important;
font-weight: 600 !important;
background: #fdf5f6 !important;
}
.vector-toc .vector-toc-list .vector-toc-list > li > .vector-toc-link {
padding-left: 20px !important;
font-size: 0.78rem !important;
color: var(--bmc-text-muted) !important;
}
/* ── 3. Our Injected Topbar ─────────────────────────────────── */
.bmc-topbar {
background: var(--bmc-crimson);
color: #fff;
font-size: 0.75rem;
padding: 6px 0;
text-align: right;
font-family: var(--bmc-font);
}
.bmc-topbar .bmc-inner {
max-width: var(--bmc-max-width);
margin: 0 auto;
padding: 0 24px;
}
.bmc-topbar a { color: #fff; opacity: 0.85; text-decoration: none; }
.bmc-topbar a:hover { opacity: 1; }
.bmc-topbar .bmc-sep { margin: 0 6px; opacity: 0.5; }
/* ── 4. Our Injected Header ─────────────────────────────────── */
.bmc-header {
background: #fff;
border-bottom: 1px solid #e0e0e0;
position: sticky;
top: 0;
z-index: 500;
box-shadow: 0 1px 4px rgba(0,0,0,0.07);
font-family: var(--bmc-font);
}
.bmc-header-inner {
max-width: var(--bmc-max-width);
margin: 0 auto;
padding: 0 24px;
display: flex;
align-items: center;
justify-content: space-between;
height: 68px;
}
/* Logo */
.bmc-logo {
display: flex;
align-items: center;
gap: 12px;
text-decoration: none;
flex-shrink: 0;
}
.bmc-logo-mark {
width: 40px; height: 40px;
background: var(--bmc-crimson);
border-radius: 4px;
display: flex; align-items: center; justify-content: center;
color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: -0.5px;
flex-shrink: 0;
}
.bmc-logo-text .bmc-logo-name {
font-size: 1rem; font-weight: 700; color: var(--bmc-text); letter-spacing: -0.2px;
line-height: 1.2;
}
.bmc-logo-text .bmc-logo-sub {
font-size: 0.72rem; color: var(--bmc-text-muted); font-weight: 400;
}
/* Right side: search + user tools from Vector (moved into our header) */
.bmc-header-right {
display: flex;
align-items: center;
gap: 12px;
}
/* The Vector search form we move into our header */
.bmc-header-right .vector-search-box,
.bmc-header-right #p-search {
margin: 0 !important;
padding: 0 !important;
}
.bmc-header-right .vector-search-box-input,
.bmc-header-right #searchInput {
border: 1px solid #e0e0e0 !important;
border-radius: 6px !important;
padding: 6px 10px !important;
font-size: 0.83rem !important;
font-family: var(--bmc-font) !important;
width: 180px !important;
transition: border-color 0.15s !important;
}
.bmc-header-right .vector-search-box-input:focus,
.bmc-header-right #searchInput:focus {
border-color: var(--bmc-crimson) !important;
outline: none !important;
}
/* User menu moved into our header */
.bmc-header-right .vector-user-links {
display: flex !important;
align-items: center !important;
}
/* ── 5. Our Injected Navigation ─────────────────────────────── */
.bmc-nav { display: flex; align-items: center; }
.bmc-nav > ul {
list-style: none;
display: flex;
gap: 2px;
margin: 0; padding: 0;
}
.bmc-nav > ul > li { position: relative; }
.bmc-nav > ul > li > a {
display: block;
padding: 8px 14px;
font-size: 0.85rem; font-weight: 500; color: #333;
border-radius: 4px; white-space: nowrap;
transition: background 0.15s, color 0.15s;
text-decoration: none;
font-family: var(--bmc-font);
}
.bmc-nav > ul > li > a:hover,
.bmc-nav > ul > li.bmc-active > a {
background: #f5f5f5;
color: var(--bmc-crimson);
text-decoration: none;
}
/* Dropdown arrow */
.bmc-dropdown > a::after { content: ' ▾'; font-size: 0.65rem; opacity: 0.6; }
/* Dropdown menu */
.bmc-dropdown-menu {
display: none;
position: absolute; top: calc(100% + 4px); left: 0;
background: #fff; border: 1px solid #e0e0e0;
border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,0.10);
min-width: 200px; padding: 6px 0; z-index: 600;
font-family: var(--bmc-font);
}
.bmc-dropdown:hover .bmc-dropdown-menu { display: block; }
.bmc-dropdown-menu a {
display: block; padding: 8px 18px;
font-size: 0.83rem; color: #333;
transition: background 0.12s;
text-decoration: none;
}
.bmc-dropdown-menu a:hover {
background: #faf0f0; color: var(--bmc-crimson); text-decoration: none;
}
.bmc-dropdown-menu .bmc-divider { border-top: 1px solid #eee; margin: 4px 0; }
.bmc-dropdown-menu .bmc-group-label {
padding: 6px 18px 2px; font-size: 0.7rem;
font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: 0.05em;
}
/* ── 6. Our Injected Hero ───────────────────────────────────── */
.bmc-hero {
background: linear-gradient(135deg, var(--bmc-crimson) 0%, var(--bmc-crimson-dark) 100%);
color: #fff;
padding: 40px 0 36px;
font-family: var(--bmc-font);
}
.bmc-hero .bmc-inner {
max-width: var(--bmc-max-width);
margin: 0 auto;
padding: 0 24px;
}
.bmc-breadcrumb {
font-size: 0.78rem; margin-bottom: 10px; opacity: 0.75;
}
.bmc-breadcrumb a { color: #fff; text-decoration: none; }
.bmc-breadcrumb a:hover { text-decoration: underline; }
.bmc-breadcrumb .bmc-sep { margin: 0 6px; }
.bmc-hero h1 {
font-size: 2rem; font-weight: 700; letter-spacing: -0.5px;
color: #fff !important; display: block !important;
border: none !important; padding: 0 !important; margin: 0 !important;
}
/* ── 7. Page Layout Wrapper ─────────────────────────────────── */
/* Wraps Vector's content region in our grid */
.bmc-page-layout {
max-width: var(--bmc-max-width);
margin: 0 auto;
padding: 40px 24px 80px;
display: grid;
grid-template-columns: 220px 1fr;
gap: 40px;
font-family: var(--bmc-font);
}
.bmc-sidebar {
position: sticky;
top: 84px;
align-self: start;
}
.bmc-content-col {
min-width: 0; /* prevent grid blowout */
}
/* ── 8. Content Typography ──────────────────────────────────── */
.mw-parser-output {
font-family: var(--bmc-font) !important;
font-size: 0.9rem;
color: #333;
line-height: 1.6;
}
.mw-parser-output a,
.mw-body-content a {
color: var(--bmc-crimson);
text-decoration: none;
}
.mw-parser-output a:hover { color: var(--bmc-crimson-dark); text-decoration: underline; }
.mw-parser-output a:visited { color: var(--bmc-crimson); }
.mw-parser-output h2 {
font-size: 1.35rem !important;
font-weight: 700 !important;
color: var(--bmc-text) !important;
padding-bottom: 10px !important;
border-bottom: 2px solid var(--bmc-crimson) !important;
margin: 48px 0 18px !important;
letter-spacing: -0.2px;
scroll-margin-top: 88px;
}
.mw-parser-output h2:first-child { margin-top: 0 !important; }
.mw-parser-output h3 {
font-size: 1rem !important;
font-weight: 600 !important;
color: var(--bmc-text) !important;
margin: 28px 0 10px !important;
scroll-margin-top: 88px;
}
.mw-parser-output h4 {
font-size: 0.88rem !important;
font-weight: 700 !important;
color: #444 !important;
margin: 20px 0 8px !important;
}
.mw-parser-output p { margin-bottom: 14px !important; }
/* ── 9. Tables ──────────────────────────────────────────────── */
.mw-parser-output .wikitable {
width: 100%;
border-collapse: collapse !important;
font-size: 0.83rem;
font-family: var(--bmc-font);
background: var(--bmc-bg);
border: 1px solid #e4e4e4 !important;
margin-bottom: 26px;
}
.mw-parser-output .wikitable thead th,
.mw-parser-output .wikitable > tr > th {
background: #1a1a1a !important;
color: #fff !important;
padding: 11px 14px !important;
font-weight: 600;
font-size: 0.78rem;
text-align: left;
border: none !important;
white-space: nowrap;
}
.mw-parser-output .wikitable tbody td,
.mw-parser-output .wikitable > tr > td {
padding: 10px 14px !important;
vertical-align: top;
border-bottom: 1px solid #f0f0f0 !important;
border-left: none !important;
border-right: none !important;
border-top: none !important;
}
.mw-parser-output .wikitable tbody tr:hover td { background: #fafafa; }
.mw-parser-output .wikitable tbody tr:last-child td { border-bottom: none !important; }
/* ── 10. Note Boxes ─────────────────────────────────────────── */
.bmc-note {
background: #fdf6f0; border-left: 3px solid #e07b39;
padding: 10px 14px; border-radius: 0 6px 6px 0;
font-size: 0.82rem; color: #555; margin: 12px 0 18px;
font-family: var(--bmc-font);
}
.bmc-note strong { color: #c0622a; }
.bmc-note-info { background: #f0f6ff; border-left-color: #3b7dd8; }
.bmc-note-warn { background: #fff9e6; border-left-color: #d4a017; }
/* ── 11. Cards & Grids ──────────────────────────────────────── */
.bmc-card {
background: var(--bmc-bg-card); border: 1px solid var(--bmc-border);
border-radius: 8px; padding: 20px 22px;
transition: border-color 0.15s, box-shadow 0.15s;
font-family: var(--bmc-font);
}
.bmc-card:hover {
border-color: var(--bmc-border-hover);
box-shadow: 0 2px 10px rgba(163,31,52,0.07);
}
.bmc-card h4 { font-size: 0.88rem; font-weight: 700; color: var(--bmc-crimson); margin-bottom: 6px; }
.bmc-card p { font-size: 0.82rem; color: #555; margin: 0; line-height: 1.5; }
.bmc-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin: 20px 0 28px; }
.bmc-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 20px 0 28px; }
.bmc-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 20px 0 28px; }
/* ── 12. Badges ─────────────────────────────────────────────── */
.bmc-badge {
display: inline-block; font-size: 0.68rem; padding: 2px 7px;
border-radius: 10px; font-weight: 600; white-space: nowrap;
font-family: var(--bmc-font);
}
.bmc-badge-red { background: var(--bmc-crimson-light); color: var(--bmc-crimson); }
.bmc-badge-blue { background: #e8f4fd; color: #1a6fa8; }
.bmc-badge-green { background: #e8f9ef; color: #1a8042; }
.bmc-badge-gray { background: #f0f0f0; color: #555; }
/* ── 13. Our Injected Footer ────────────────────────────────── */
.bmc-footer {
background: #1a1a1a; color: #aaa;
padding: 40px 0; font-size: 0.82rem;
font-family: var(--bmc-font);
}
.bmc-footer-inner {
max-width: var(--bmc-max-width); margin: 0 auto; padding: 0 24px;
display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.bmc-footer h4 {
font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
letter-spacing: 0.08em; color: #fff; margin-bottom: 12px;
}
.bmc-footer ul { list-style: none; margin: 0; padding: 0; }
.bmc-footer ul li { margin-bottom: 6px; }
.bmc-footer ul li a { color: #aaa; text-decoration: none; }
.bmc-footer ul li a:hover { color: #fff; }
.bmc-footer-bottom {
max-width: var(--bmc-max-width); margin: 24px auto 0;
padding: 20px 24px 0; border-top: 1px solid #333;
display: flex; justify-content: space-between; align-items: center;
flex-wrap: wrap; gap: 8px; font-size: 0.77rem; color: #666;
}
.bmc-footer-bottom a { color: #666; }
.bmc-footer-bottom a:hover { color: #aaa; }
/* ── 14. Tab Panel System ───────────────────────────────────── */
.tab-bar-wrap {
background: linear-gradient(135deg, var(--bmc-crimson) 0%, var(--bmc-crimson-dark) 100%);
border-bottom: 3px solid rgba(0,0,0,0.15);
}
.tab-bar {
max-width: var(--bmc-max-width); margin: 0 auto; padding: 0 24px;
display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
flex-shrink: 0; padding: 13px 22px;
font-size: 0.87rem; font-weight: 500;
color: rgba(255,255,255,0.7);
background: transparent; border: none;
border-bottom: 3px solid transparent; margin-bottom: -3px;
cursor: pointer; white-space: nowrap;
transition: color 0.15s, border-color 0.15s, background 0.15s;
border-radius: 4px 4px 0 0; font-family: var(--bmc-font);
}
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.tab-btn.active { color: #fff; font-weight: 600; background: rgba(255,255,255,0.12); border-bottom-color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* ── 15. Responsive ─────────────────────────────────────────── */
@media screen and (max-width: 860px) {
.bmc-page-layout { grid-template-columns: 1fr; }
.bmc-sidebar { position: static; }
.bmc-grid-2, .bmc-grid-3, .bmc-grid-4 { grid-template-columns: 1fr; }
.bmc-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 580px) {
.bmc-hero h1 { font-size: 1.5rem !important; }
.bmc-footer-inner { grid-template-columns: 1fr; }
.bmc-nav > ul { display: none; }
}