MediaWiki:Mobile.css: Difference between revisions

Content deleted Content added
No edit summary
Tag: Reverted
No edit summary
 
(59 intermediate revisions by the same user not shown)
Line 33:
#cps-open-toc {
position: fixed;
left: 16px;
/* POSITION: Right side */
bottom: calc(16px + env(safe-area-inset-bottom, 0px));
right: 16px; /* Changed from left: 16px */
width: 48px; height: 48px;
left: auto; /* Safety: ensures left is unset */
/* POSITION: Lifted (to clear Google Anchor Ads) */
bottom: calc(120px + env(safe-area-inset-bottom, 0px));
/* SHAPE: Smaller Size (40px) */
width: 44px; /* Changed from 48px */
height: 44px; /* Changed from 48px */
border: 0; border-radius: 999px;
display: none; /* shown by JS when headings exist */
align-items: center; justify-content: center;
font-size: 14px; font-weight: 600;
color: #fff; background: rgba(0,0,0,.651);
/* box-shadow: 0 2px 8px rgba(0,0,0,.150);*/
z-index: 1000; cursor: pointer;
-webkit-tap-highlight-color: transparent;
Line 53 ⟶ 62:
#cps-toc-overlay {
position: fixed; inset: 0;
background: rgba(0,0,0,.351);
display: none; z-index: 1001;
}
Line 64 ⟶ 73:
border-radius: 12px 12px 0 0;
background: #fff; color: #202122;
/* box-shadow: 0 -8px 20px rgba(0,0,0,.20);*/
padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px;
}
Line 108 ⟶ 117:
}
 
/* ======================================================= */
/* 1. Hide the "Edit" pencil icon on mobile */
/* FIX: HIDE DUPLICATE "CONTENTS" TITLE IN MOBILE TOC */
#ca-edit,
/* ======================================================= */
.page-actions-menu__list-item--edit,
 
.edit-page {
/* This hides the original MediaWiki header inside your custom panel */
display: none !important;
#cps-toc-panel .toctitle,
#cps-toc-panel #mw-toc-heading,
#cps-toc-panel h2 {
display: none !important;
}
 
/* ======================================================= */
/* 2. Hide the "History" (clock) icon/link on mobile */
/* 1. DESKTOP STICKY HEADER (Vector 2022 Skin) */
#ca-history,
/* ======================================================= */
.page-actions-menu__list-item--history,
/* This part works perfectly, as confirmed. */
.mw-ui-icon-minerva-history {
 
display: none !important;
.vector-header-container {
position: fixed !important;
top: 0;
left: 0;
right: 0;
width: 100%;
z-index: 1000;
background-color: #fff;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
 
/* Pushes article content down so it isn't hidden behind the fixed header */
/* 3. Hide "Recent Changes" & "Random" from the Hamburger Menu */
body.skin-vector-2022 {
/* These often persist even if removed from the Sidebar file */
padding-top: 60px;
li#n-recentchanges,
}
li#n-randompage,
.mw-page-container {
.cw-menu__item--random,
margin-top: 10px;
.cw-menu__item--recentChanges {
display: none !important;
}
 
/* ======================================================= */
/* 4. Hide the "Talk" tab (optional) */
/* 2. TOP FLOATING SQUARES (44px | #F8F9FA Tone) */
.page-actions-menu__list-item--talk {
/* ======================================================= */
display: none !important;
 
/* --- MOBILEA. (MINERVA):HEADER HideRESET Login(Invisible & User IconsContainer) --- */
.header-container.header-chrome {
position: fixed !important;
top: 0 !important; left: 0 !important; right: 0 !important;
height: 60px !important;
z-index: 1000 !important;
background: transparent !important;
border: none !important;
box-shadow: none !important;
pointer-events: none !important;
transform: none !important;
transition: none !important;
overflow: visible !important;
}
 
/* Push content down */
/* 1. Hide the user/login icon in the top header bar */
body.skin-minerva { padding-top: 60px !important; }
.header-action .minerva-icon--login,
.mw-body { margin-top: 10px !important; }
.header-action .minerva-icon--user,
 
.skin-minerva .mw-ui-icon-minerva-login {
/* Hide default elements */
display: none !important;
.header-container .navigation-drawer { display: none !important; }
 
/* --- B. COMMON SQUARE STYLE (0.03 Transparency for #F8F9FA) --- */
.branding-box,
#searchIcon,
#cps-open-toc,
body.mw-mf-search-mode .minerva-header .search-box input {
/* 3% Black = ~#F8F9FA on white */
background-color: rgba(0, 0, 0, 0.03) !important;
/* Force Full Opacity & Strip Defaults */
opacity: 1 !important;
background-image: none !important;
-webkit-appearance: none !important;
border: none !important;
box-shadow: none !important;
backdrop-filter: none !important;
border-radius: 8px !important;
pointer-events: auto !important;
/* STANDARD 44px SIZING */
box-sizing: border-box !important;
width: 44px !important;
height: 44px !important;
padding: 0 !important;
margin: 0 !important;
}
 
/* --- C. BUTTON 1: SEARCH TRIGGER (TOP LEFT) --- */
/* 2. Hide "Log in" and "Settings" text inside the Hamburger Menu */
#searchIcon {
.menu-item-login,
position: fixed !important;
.menu-item-settings,
.menu-item-logout,
/* ALIGNMENT: 8px Top */
.cw-menu__item--login,
top: 8px !important;
.cw-menu__item--settings {
left: 10px !important;
right: auto !important;
/* FORCE SIZE RESET */
min-width: 0 !important;
min-height: 0 !important;
max-width: 44px !important;
max-height: 44px !important;
z-index: 1003 !important;
display: flex !important; align-items: center; justify-content: center;
}
 
/* Search Icon */
#searchIcon .minerva-icon {
font-size: 24px !important;
color: #fff !important;
fill: #fff !important;
opacity: 1 !important;
filter: brightness(0) invert(1);
margin: 0 !important;
}
 
/* --- D. BUTTON 2: TOC (RIGHT - 100px SPACE) --- */
#cps-open-toc {
display: flex !important;
position: fixed !important;
top: 8px !important;
/* Position: 100px from right edge */
right: 100px !important;
left: auto !important; bottom: auto !important;
z-index: 1002 !important;
color: #fff !important;
align-items: center; justify-content: center;
}
 
/* TOC Icon */
#cps-open-toc .icon { font-size: 24px !important; }
 
/* --- E. BUTTON 3: HOME (LEFT OF TOC) --- */
.branding-box {
position: fixed !important;
top: 8px !important;
/* Position: 100px (Space) + 44px (TOC) + 10px (Gap) */
right: 154px !important;
left: auto !important;
z-index: 1002 !important;
display: flex !important;
align-items: center;
justify-content: center;
}
 
/* 1. The Home Icon (Bold & White) */
.branding-box::after {
content: "⌂";
font-size: 30px !important;
color: #fff !important;
-webkit-text-stroke: 1px #fff !important;
margin-top: -6px !important;
display: block !important;
line-height: 1 !important;
}
 
/* 2. The Link Overlay */
.branding-box a {
position: absolute !important;
top: 0 !important; left: 0 !important;
width: 100% !important; height: 100% !important;
opacity: 0 !important;
z-index: 2 !important;
}
.branding-box a * { display: none !important; }
.branding-box a::before { display: none !important; }
 
/* --- F. THE SEARCH INPUT --- */
 
/* 1. Hide initially */
body:not(.mw-mf-search-mode) .minerva-header .search-box {
display: none !important;
}
 
/* 2. Position Wrapper */
/* 3. Remove the random "Join" or "Login" buttons in the footer */
body.mw-mf-search-mode .minerva-footerheader .search-buttonbox {
display: block !important;
position: fixed !important;
top: 8px !important;
height: 44px !important;
z-index: 1001 !important;
left: 10px !important;
right: 10px !important;
width: auto !important;
padding: 0 !important; margin: 0 !important;
background: transparent !important;
border-radius: 0 !important;
}
 
/* 3. Style Input Pill */
body.mw-mf-search-mode .minerva-header .search-box input {
width: 100% !important;
height: 44px !important;
border-radius: 8px !important;
box-sizing: border-box !important;
/* Background matches buttons */
background-color: rgba(0, 0, 0, 0.03) !important;
color: #fff !important;
-webkit-text-fill-color: #fff !important;
font-size: 16px !important;
/* PADDING: 44px (Button) + 11px (Gap) */
padding-left: 55px !important;
padding-right: 55px !important;
margin: 0 !important;
}
 
/* 4. Hide Inner Icon */
.minerva-header .search-box .search-box-icon-overlay {
display: none !important;
}
 
/* 5. Placeholder */
body.mw-mf-search-mode .minerva-header .search-box input::placeholder {
color: rgba(255, 255, 255, 0.7) !important;
-webkit-text-fill-color: rgba(255, 255, 255, 0.7) !important;
}
 
/* 6. Cancel "X" Button */
.search-box .search-box-cancel {
display: block !important;
position: absolute !important;
top: 0 !important;
right: 0 !important;
width: 44px !important;
height: 44px !important;
line-height: 44px !important;
text-align: center !important;
color: #fff !important;
z-index: 1004 !important;
}