MediaWiki:Mobile.css: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(36 intermediate revisions by the same user not shown)
Line 129:
 
/* ======================================================= */
/* 1. MOBILEDESKTOP FIXSTICKY HEADER (MinervaVector 2022 Skin) */
/* ======================================================= */
/* This part works perfectly, as confirmed. */
 
.vector-header-container {
/* A. Sticky Header (Only when NOT searching) */
position: fixed !important;
body:not(.mw-mf-search-mode) .header-container.header-chrome {
position: -webkit-sticky;
position: sticky;
top: 0;
z-indexleft: 9990;
background-colorright: #fff0;
border-bottom: 1px solid #eaecf0;
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 */
/* B. Search Input Text Fix (Force Visible Text) */
body.skin-vector-2022 {
/* This forces the text to be black and background white so you can see it. */
padding-top: 60px;
.minerva-header .search-box .search {
}
color: #202122 !important; /* Dark grey/black text */
.mw-page-container {
background-color: #fff !important; /* White background */
margin-top: 10px;
opacity: 1 !important; /* Ensure it's not transparent */
text-shadow: none !important; /* Remove any text shadows */
-webkit-text-fill-color: #202122 !important; /* iOS fix */
}
 
/* ======================================================= */
/* C. Search Icon Displacement Fix */
/* 2. TOP FLOATING SQUARES (44px | #F8F9FA Tone) */
/* This prevents the search box from stretching too wide and pushing the icon */
/* ======================================================= */
.minerva-header .search-box {
 
/* --- A. HEADER RESET (Invisible Container) --- */
.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 */
body.skin-minerva { padding-top: 60px !important; }
.mw-body { margin-top: 10px !important; }
 
/* Hide default elements */
.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;
positionwidth: relative44px !important;
height: 44px !important;
/* Ensure there is room for the icon on the right */
padding-right: 0 !important;
margin: 0 !important;
}
 
/* Force--- theC. iconBUTTON overlay1: toSEARCH stayTRIGGER in(TOP theLEFT) correct spot--- */
#searchIcon {
.minerva-header .search-box .search-box-icon-overlay {
rightposition: 0fixed !important;
left: auto !important;
/* ALIGNMENT: 8px Top */
top: 0 !important;
bottomtop: 08px !important;
widthleft: 44px10px !important; /* Standard touch target size */
heightright: 100%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;
align-itemsposition: centerfixed !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;
position: absolute !important;
z-index: 2 !important; /* Sit on top of the input */
pointer-events: none; /* Allow clicking "through" to the input if needed */
}
 
/* 1. The Home Icon (Bold & White) */
/* Adjust input padding so text doesn't go under the icon */
.branding-box::after {
.minerva-header .search-box input.search {
content: "⌂";
padding-right: 40px !important;
boxfont-sizingsize: border-box30px !important;
widthcolor: 100%#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 --- */
/* ======================================================= */
/* 2. DESKTOP FIX (Vector 2022 Skin) */
/* ======================================================= */
 
/* 1. Hide initially */
/* Use FIXED instead of STICKY.
body:not(.mw-mf-search-mode) .minerva-header .search-box {
Sticky stops working if its parent container ends.
display: none !important;
Fixed forces it to stay on screen forever. */
}
.vector-header-container {
 
/* 2. Position Wrapper */
body.mw-mf-search-mode .minerva-header .search-box {
display: block !important;
position: fixed !important;
top: 08px !important;
leftheight: 044px !important;
rightz-index: 01001 !important;
width: 100%;
z-indexleft: 100010px !important;
right: 10px !important;
background-color: #fff;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
width: auto !important;
padding: 0 !important; margin: 0 !important;
background: transparent !important;
border-radius: 0 !important;
}
 
/* 3. Style Input Pill */
/* PADDING COMPENSATION (Important!)
body.mw-mf-search-mode .minerva-header .search-box input {
Since the header is now "fixed" (floating above everything),
width: 100% !important;
it no longer takes up space in the page flow.
height: 44px !important;
We must push the page content down so it isn't hidden behind the header. */
border-radius: 8px !important;
body.skin-vector-2022 {
box-sizing: border-box !important;
padding-top: 60px; /* Adjust this number if the header covers your title */
/* 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 */
/* Ensure the scrollable content container behaves correctly */
.minerva-header .search-box .search-box-icon-overlay {
.mw-page-container {
margin-topdisplay: 10pxnone !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;
}