MediaWiki:Common.css: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m copilot cleanup |
||
| Line 1: | Line 1: | ||
/** CSS placed here will be applied to all skins */ | /** CSS placed here will be applied to all skins */ | ||
/* ------------------------- | |||
Fonts | |||
------------------------- */ | |||
@font-face { | @font-face { | ||
font-family:"Gotham-Black"; | font-family: "Gotham-Black"; | ||
src:url("/styles/Gotham-Black.otf") | src: url("/styles/Gotham-Black.otf") format("opentype"); | ||
} | } | ||
@font-face { | @font-face { | ||
font-family:"Gotham-BlackItalic"; | font-family: "Gotham-BlackItalic"; | ||
src:url("/styles/Gotham-BlackItalic.otf") | src: url("/styles/Gotham-BlackItalic.otf") format("opentype"); | ||
} | } | ||
@font-face { | @font-face { | ||
font-family:"Gotham-Bold"; | font-family: "Gotham-Bold"; | ||
src:url("/styles/Gotham-Bold.otf") | src: url("/styles/Gotham-Bold.otf") format("opentype"); | ||
} | } | ||
@font-face { | @font-face { | ||
font-family:"Gotham-BoldItalic"; | font-family: "Gotham-BoldItalic"; | ||
src:url("/styles/Gotham-BoldItalic.otf") | src: url("/styles/Gotham-BoldItalic.otf") format("opentype"); | ||
} | } | ||
@font-face { | @font-face { | ||
font-family:"Gotham-Book"; | font-family: "Gotham-Book"; | ||
src:url("/styles/Gotham-Book.otf") | src: url("/styles/Gotham-Book.otf") format("opentype"); | ||
} | } | ||
@font-face { | @font-face { | ||
font-family:"Gotham-BookItalic"; | font-family: "Gotham-BookItalic"; | ||
src:url("/styles/Gotham-BookItalic.otf") | src: url("/styles/Gotham-BookItalic.otf") format("opentype"); | ||
} | } | ||
/* Base typography */ | |||
body { | |||
font-family: "Gotham-Book", Montserrat, sans-serif; | |||
max-width: 1366px; | |||
} | } | ||
h1, h2, h3, h4, h5, h6 { | |||
font-family: "Gotham-Book", Montserrat, sans-serif; | |||
/* text-transform: uppercase; */ | |||
} | |||
.mw-body h1, | |||
.mw-body h2, | |||
.mw-body h3, | |||
.mw-body h4, | |||
.mw-body h5 { | |||
font-family: "Gotham-Book", Montserrat, sans-serif; | |||
} | |||
/* Headline box */ | |||
.mw-headline { | |||
font-family: "Gotham-Bold", "Gotham-Book", Montserrat, sans-serif; | |||
background: #ffffff; | |||
/* previous alternatives: | |||
background: #cef2e0; | |||
background-color: #CCFFCC; | |||
border-radius: 5px; | |||
border: 1px outset #008080; | |||
*/ | |||
padding: 2px; | |||
width: 300px; | |||
} | |||
/* Hide structured data block if present */ | |||
.structuredData { | |||
display: none; | |||
} | } | ||
td {vertical-align:top | /* Table cell vertical alignment */ | ||
td { | |||
vertical-align: top; | |||
} | } | ||
/* ****************** NO TITLE ON MAINPAGE *************** */ | /* ****************** NO TITLE ON MAINPAGE *************** */ | ||
/* Adjust page name(s) to match your actual main page slug(s) */ | |||
.page-Bose_Portable_PA_Knowledge.action-view h1.firstHeading, | |||
.page-Bose_Portable_PA_Knowledge.action-submit h1.firstHeading { | |||
display: none; | |||
} | |||
/* | /* Responsive images */ | ||
img { | img { | ||
max-width: 100%; | |||
height: auto; | |||
-webkit-touch-callout: none; | |||
-webkit-user-select: none; | |||
-khtml-user-select: none; | |||
-moz-user-select: none; | |||
-ms-user-select: none; | |||
user-select: none; | |||
} | } | ||
/* DivToc: responsive table of contents with introduction */ | /* DivToc: responsive table of contents with introduction */ | ||
.tocdiv { | .tocdiv { | ||
max-width: 1366px; | max-width: 1366px; | ||
display: grid; | display: grid; | ||
grid-gap: 15px; | grid-gap: 15px; | ||
column-gap: 30px; | column-gap: 30px; | ||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | ||
grid-template-rows: auto; | grid-template-rows: auto; | ||
} | } | ||
/* Mobile fix for DivToc layout */ | /* Mobile fix for DivToc layout */ | ||
| Line 108: | Line 125: | ||
} | } | ||
} | } | ||
/* Power Characters */ | /* Power Characters */ | ||
@font-face { | @font-face { | ||
font-family: 'power_symbols'; | font-family: 'power_symbols'; | ||
src: url('/fonts/unicode/Unicode_IEC_symbol. | src: url('/fonts/unicode/Unicode_IEC_symbol.woff2') format('woff2'), | ||
url('/fonts/unicode/Unicode_IEC_symbol. | url('/fonts/unicode/Unicode_IEC_symbol.woff') format('woff'), | ||
url('/fonts/unicode/Unicode_IEC_symbol. | url('/fonts/unicode/Unicode_IEC_symbol.ttf') format('truetype'); | ||
font-weight: normal; | font-weight: normal; | ||
font-style: normal; | font-style: normal; | ||
} | } | ||
.power{ | .power { | ||
font-family: 'power_symbols'; | |||
font-style: normal; | |||
} | } | ||
/* ---------- Link colors (LVHA order) ---------- */ | /* ---------- Link colors (LVHA order) ---------- */ | ||
| Line 138: | Line 152: | ||
.mw-body-content a.extiw { color: #3366BB; } | .mw-body-content a.extiw { color: #3366BB; } | ||
.mw-body-content a.stub { color: #772233; } | .mw-body-content a.stub { color: #772233; } | ||
/* === L1 comparison table scroll container === */ | /* === L1 comparison table scroll container === */ | ||
.mw-parser-output .l1-compare-wrap { | .mw-parser-output .l1-compare-wrap { | ||
display: block; | |||
overflow-x: auto; | |||
overflow-y: visible; | |||
width: 100%; | |||
max-width: 100%; | |||
-webkit-overflow-scrolling: touch; | |||
background: #ffffff; | |||
} | } | ||
/* === CRITICAL OVERRIDE: defeat Vector/Minerva table width clamp === */ | /* === CRITICAL OVERRIDE: defeat Vector/Minerva table width clamp === */ | ||
.mw-parser-output .l1-compare-wrap table.l1-compare { | .mw-parser-output .l1-compare-wrap table.l1-compare { | ||
white-space: nowrap; | |||
width: max-content; | |||
min-width: 1400px; | |||
max-width: none !important; /* ensure table can overflow horizontally */ | |||
border-collapse: separate; | |||
border-spacing: 0; | |||
} | } | ||
/* === Sticky header row === */ | /* === Sticky header row === */ | ||
.mw-parser-output .l1-compare-wrap table.l1-compare th { | .mw-parser-output .l1-compare-wrap table.l1-compare th { | ||
position: sticky; | |||
top: 0; | |||
background: #f8f9fa; | |||
color: #202122; | |||
z-index: 10; | |||
} | } | ||
| Line 184: | Line 186: | ||
.mw-parser-output .l1-compare-wrap table.l1-compare th:first-child, | .mw-parser-output .l1-compare-wrap table.l1-compare th:first-child, | ||
.mw-parser-output .l1-compare-wrap table.l1-compare td:first-child { | .mw-parser-output .l1-compare-wrap table.l1-compare td:first-child { | ||
position: sticky; | |||
left: 0; | |||
background: #ffffff; | |||
z-index: 9; | |||
border-right: 1px solid #a2a9b1; | |||
} | } | ||
/* === Image display on hover over text === */ | /* === Image display on hover over text === */ | ||
.hover-image-wrapper { | .hover-image-wrapper { | ||
position: relative; | |||
display: inline-block; | |||
cursor: help; | |||
} | } | ||
.hover-image-popup { | .hover-image-popup { | ||
position: absolute; | |||
top: 1.2em; | |||
left: 0; | |||
z-index: 9999; | |||
background: #fff; | |||
padding: 4px; | |||
border: 1px solid #ccc; | |||
visibility: hidden !important; | |||
opacity: 0 !important; | |||
pointer-events: none !important; | |||
transition: opacity 0.15s ease-in-out; | |||
} | } | ||
.hover-image-wrapper:hover .hover-image-popup { | .hover-image-wrapper:hover .hover-image-popup { | ||
visibility: visible !important; | |||
opacity: 1 !important; | |||
pointer-events: auto !important; | |||
} | } | ||
/* ============================================================ | /* ============================================================ | ||
Hide | Hide page action tabs ONLY for anonymous users | ||
Uses MediaWiki body classes: mw-anonuser (anonymous), mw-user (logged-in) | |||
Works for: Vector, Vector-2022, MinervaNeue | Works for: Vector, Vector-2022, MinervaNeue | ||
============================================================ */ | ============================================================ */ | ||
/* | /* Canonical, single block — replace any previous hide blocks with this */ | ||
body | body.mw-anonuser #p-views, | ||
body | body.mw-anonuser #p-views > ul, | ||
body | body.mw-anonuser #p-views > ul > li, | ||
body | body.mw-anonuser #left-navigation, | ||
body | body.mw-anonuser #right-navigation, | ||
body | body.mw-anonuser .vector-actions, | ||
body.mw-anonuser .vector-actions > li, | |||
body.mw-anonuser .vector-page-tools, | |||
body.mw-anonuser .vector-page-tools .vector-menu-content, | |||
body.mw-anonuser .vector-page-tools .vector-menu-content > li, | |||
body.mw-anonuser .vector-menu-tabs, | |||
body.mw-anonuser .vector-menu-tabs ul, | |||
body.mw-anonuser .vector-menu-tabs li, | |||
body.mw-anonuser .minerva-page-actions, | |||
body.mw-anonuser .minerva-page-actions li, | |||
body.mw-anonuser .page-actions-menu, | |||
body.mw-anonuser .page-actions-menu li { | |||
display: none !important; | display: none !important; | ||
} | } | ||
/* Vector | /* Optional stronger specificity for stubborn Vector selectors (uncomment if needed) | ||
body.mw-anonuser #p-views, | |||
body | body.mw-anonuser #left-navigation, | ||
body | body.mw-anonuser #right-navigation, | ||
body | body.mw-anonuser .vector-actions, | ||
body | body.mw-anonuser .vector-page-tools { | ||
body | |||
display: none !important; | display: none !important; | ||
} | } | ||
*/ | |||
/* ============================================================ | /* ============================================================ | ||
Notes and troubleshooting | |||
- Ensure there is NO JavaScript in this CSS page. | |||
- If you previously moved JS into this file, move it to MediaWiki:Common.js. | |||
- If action menus remain visible for anonymous users, verify the <body> | |||
classes in the DOM (mw-anonuser vs mw-user) and clear caches. | |||
- If __TOC__ is not rendering, confirm: | |||
1) the page contains the __TOC__ magic word or enough headings for automatic TOC, | |||
2) there are no other CSS rules hiding #toc or .toc in MediaWiki:Vector.css, MediaWiki:Minerva.css, or gadget CSS. | |||
- After saving, purge page and ResourceLoader caches and perform a hard refresh (Ctrl/Cmd+Shift+R). | |||
============================================================ */ | ============================================================ */ | ||
Revision as of 15:42, 2 April 2026
/** CSS placed here will be applied to all skins */
/* -------------------------
Fonts
------------------------- */
@font-face {
font-family: "Gotham-Black";
src: url("/styles/Gotham-Black.otf") format("opentype");
}
@font-face {
font-family: "Gotham-BlackItalic";
src: url("/styles/Gotham-BlackItalic.otf") format("opentype");
}
@font-face {
font-family: "Gotham-Bold";
src: url("/styles/Gotham-Bold.otf") format("opentype");
}
@font-face {
font-family: "Gotham-BoldItalic";
src: url("/styles/Gotham-BoldItalic.otf") format("opentype");
}
@font-face {
font-family: "Gotham-Book";
src: url("/styles/Gotham-Book.otf") format("opentype");
}
@font-face {
font-family: "Gotham-BookItalic";
src: url("/styles/Gotham-BookItalic.otf") format("opentype");
}
/* Base typography */
body {
font-family: "Gotham-Book", Montserrat, sans-serif;
max-width: 1366px;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Gotham-Book", Montserrat, sans-serif;
/* text-transform: uppercase; */
}
.mw-body h1,
.mw-body h2,
.mw-body h3,
.mw-body h4,
.mw-body h5 {
font-family: "Gotham-Book", Montserrat, sans-serif;
}
/* Headline box */
.mw-headline {
font-family: "Gotham-Bold", "Gotham-Book", Montserrat, sans-serif;
background: #ffffff;
/* previous alternatives:
background: #cef2e0;
background-color: #CCFFCC;
border-radius: 5px;
border: 1px outset #008080;
*/
padding: 2px;
width: 300px;
}
/* Hide structured data block if present */
.structuredData {
display: none;
}
/* Table cell vertical alignment */
td {
vertical-align: top;
}
/* ****************** NO TITLE ON MAINPAGE *************** */
/* Adjust page name(s) to match your actual main page slug(s) */
.page-Bose_Portable_PA_Knowledge.action-view h1.firstHeading,
.page-Bose_Portable_PA_Knowledge.action-submit h1.firstHeading {
display: none;
}
/* Responsive images */
img {
max-width: 100%;
height: auto;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* DivToc: responsive table of contents with introduction */
.tocdiv {
max-width: 1366px;
display: grid;
grid-gap: 15px;
column-gap: 30px;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-template-rows: auto;
}
/* Mobile fix for DivToc layout */
@media screen and (max-width: 700px) {
.tocdiv {
display: block !important;
}
.tocdiv > div {
width: 100% !important;
margin: 0 !important;
}
}
/* Responsive iframe for YouTube videos */
@media screen and (max-width: 750px) {
iframe {
max-width: 100% !important;
width: auto !important;
height: auto !important;
}
}
/* Power Characters */
@font-face {
font-family: 'power_symbols';
src: url('/fonts/unicode/Unicode_IEC_symbol.woff2') format('woff2'),
url('/fonts/unicode/Unicode_IEC_symbol.woff') format('woff'),
url('/fonts/unicode/Unicode_IEC_symbol.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.power {
font-family: 'power_symbols';
font-style: normal;
}
/* ---------- Link colors (LVHA order) ---------- */
.mw-body-content a:link { color: #0645AD; }
.mw-body-content a:visited { color: #551A8B; }
.mw-body-content a:hover { color: #0B0080; text-decoration: underline; }
.mw-body-content a:active { color: #C00000; }
/* Special link types */
.mw-body-content a.new { color: #CC0000; }
.mw-body-content a.external,
.mw-body-content a.extiw { color: #3366BB; }
.mw-body-content a.stub { color: #772233; }
/* === L1 comparison table scroll container === */
.mw-parser-output .l1-compare-wrap {
display: block;
overflow-x: auto;
overflow-y: visible;
width: 100%;
max-width: 100%;
-webkit-overflow-scrolling: touch;
background: #ffffff;
}
/* === CRITICAL OVERRIDE: defeat Vector/Minerva table width clamp === */
.mw-parser-output .l1-compare-wrap table.l1-compare {
white-space: nowrap;
width: max-content;
min-width: 1400px;
max-width: none !important; /* ensure table can overflow horizontally */
border-collapse: separate;
border-spacing: 0;
}
/* === Sticky header row === */
.mw-parser-output .l1-compare-wrap table.l1-compare th {
position: sticky;
top: 0;
background: #f8f9fa;
color: #202122;
z-index: 10;
}
/* === Sticky first column === */
.mw-parser-output .l1-compare-wrap table.l1-compare th:first-child,
.mw-parser-output .l1-compare-wrap table.l1-compare td:first-child {
position: sticky;
left: 0;
background: #ffffff;
z-index: 9;
border-right: 1px solid #a2a9b1;
}
/* === Image display on hover over text === */
.hover-image-wrapper {
position: relative;
display: inline-block;
cursor: help;
}
.hover-image-popup {
position: absolute;
top: 1.2em;
left: 0;
z-index: 9999;
background: #fff;
padding: 4px;
border: 1px solid #ccc;
visibility: hidden !important;
opacity: 0 !important;
pointer-events: none !important;
transition: opacity 0.15s ease-in-out;
}
.hover-image-wrapper:hover .hover-image-popup {
visibility: visible !important;
opacity: 1 !important;
pointer-events: auto !important;
}
/* ============================================================
Hide page action tabs ONLY for anonymous users
Uses MediaWiki body classes: mw-anonuser (anonymous), mw-user (logged-in)
Works for: Vector, Vector-2022, MinervaNeue
============================================================ */
/* Canonical, single block — replace any previous hide blocks with this */
body.mw-anonuser #p-views,
body.mw-anonuser #p-views > ul,
body.mw-anonuser #p-views > ul > li,
body.mw-anonuser #left-navigation,
body.mw-anonuser #right-navigation,
body.mw-anonuser .vector-actions,
body.mw-anonuser .vector-actions > li,
body.mw-anonuser .vector-page-tools,
body.mw-anonuser .vector-page-tools .vector-menu-content,
body.mw-anonuser .vector-page-tools .vector-menu-content > li,
body.mw-anonuser .vector-menu-tabs,
body.mw-anonuser .vector-menu-tabs ul,
body.mw-anonuser .vector-menu-tabs li,
body.mw-anonuser .minerva-page-actions,
body.mw-anonuser .minerva-page-actions li,
body.mw-anonuser .page-actions-menu,
body.mw-anonuser .page-actions-menu li {
display: none !important;
}
/* Optional stronger specificity for stubborn Vector selectors (uncomment if needed)
body.mw-anonuser #p-views,
body.mw-anonuser #left-navigation,
body.mw-anonuser #right-navigation,
body.mw-anonuser .vector-actions,
body.mw-anonuser .vector-page-tools {
display: none !important;
}
*/
/* ============================================================
Notes and troubleshooting
- Ensure there is NO JavaScript in this CSS page.
- If you previously moved JS into this file, move it to MediaWiki:Common.js.
- If action menus remain visible for anonymous users, verify the <body>
classes in the DOM (mw-anonuser vs mw-user) and clear caches.
- If __TOC__ is not rendering, confirm:
1) the page contains the __TOC__ magic word or enough headings for automatic TOC,
2) there are no other CSS rules hiding #toc or .toc in MediaWiki:Vector.css, MediaWiki:Minerva.css, or gadget CSS.
- After saving, purge page and ResourceLoader caches and perform a hard refresh (Ctrl/Cmd+Shift+R).
============================================================ */