MediaWiki:Common.css: Difference between revisions
No edit summary |
No edit summary Tag: Reverted |
||
| Line 1,030: | Line 1,030: | ||
height: 0 !important; | height: 0 !important; | ||
} | } | ||
/* ═══════════════════════════════════════════════════════════════════ | |||
Mobile Design Addon — append to Common.css | |||
Target: screens ≤ 768px | |||
Philosophy: non-destructive — only adds, never removes desktop rules | |||
═══════════════════════════════════════════════════════════════════ */ | |||
@media (max-width: 768px) { | |||
/* ── 1. BASE FONT + BODY ─────────────────────────────────────── */ | |||
body { | |||
font-size: 18px !important; | |||
-webkit-text-size-adjust: 100%; | |||
text-size-adjust: 100%; | |||
} | |||
.mw-parser-output { | |||
font-size: 18px !important; | |||
line-height: 1.75 !important; | |||
padding: 0 4px !important; | |||
} | |||
/* ── 2. CONTENT AREA — full width, proper padding ───────────── */ | |||
#mw-content-text, | |||
.mw-body, | |||
.mw-body-content, | |||
.vector-body, | |||
#content { | |||
margin: 0 !important; | |||
padding: 0 12px !important; | |||
width: 100% !important; | |||
max-width: 100% !important; | |||
box-sizing: border-box !important; | |||
} | |||
/* ── 3. READER TOOLBAR — larger tap targets ──────────────────── */ | |||
#gr-static-bar { | |||
height: 52px !important; | |||
padding: 0 8px !important; | |||
overflow-x: auto !important; | |||
overflow-y: hidden !important; | |||
-webkit-overflow-scrolling: touch !important; | |||
scrollbar-width: none !important; | |||
gap: 2px !important; | |||
} | |||
#gr-static-bar::-webkit-scrollbar { display: none !important; } | |||
.gr-controls .gr-btn { | |||
height: 44px !important; | |||
padding: 0 10px !important; | |||
font-size: 14px !important; | |||
min-width: 44px !important; | |||
flex-shrink: 0 !important; | |||
} | |||
.gr-controls .gr-icon-btn { | |||
width: 44px !important; | |||
min-width: 44px !important; | |||
padding: 0 !important; | |||
justify-content: center !important; | |||
} | |||
.gr-controls .gr-fl { | |||
font-size: 13px !important; | |||
min-width: 40px !important; | |||
} | |||
.gr-script-sel { | |||
height: 40px !important; | |||
font-size: 13px !important; | |||
max-width: 110px !important; | |||
padding-right: 22px !important; | |||
} | |||
.gr-controls .gr-sep { | |||
display: none !important; | |||
} | |||
/* Hide PDF/EPUB labels on mobile — icon only */ | |||
.gr-btn-pdf .gr-lbl, | |||
.gr-btn-epub .gr-lbl, | |||
.gr-btn-search .gr-lbl, | |||
.gr-btn-newdoc .gr-lbl { display: none !important; } | |||
/* ── 4. TOC — hide sidebar TOC, show as overlay ─────────────── */ | |||
/* Hide the Vector sidebar TOC completely on mobile */ | |||
.vector-column-start, | |||
.vector-toc-landmark, | |||
#vector-toc, | |||
.vector-sticky-pinned-container { | |||
display: none !important; | |||
} | |||
/* TOC toggle button — floating pill at top of content */ | |||
.gr-mobile-toc-btn { | |||
display: flex !important; | |||
align-items: center; | |||
gap: 6px; | |||
position: fixed; | |||
bottom: 72px; | |||
left: 16px; | |||
z-index: 9000; | |||
background: #fff; | |||
border: 1px solid #e0d6d0; | |||
border-radius: 24px; | |||
padding: 8px 14px; | |||
font-size: 14px; | |||
font-family: system-ui, sans-serif; | |||
color: #b5451b; | |||
box-shadow: 0 2px 12px rgba(0,0,0,0.15); | |||
cursor: pointer; | |||
font-weight: 500; | |||
} | |||
/* TOC overlay panel */ | |||
.gr-mobile-toc-panel { | |||
display: none; | |||
position: fixed; | |||
top: 0; left: 0; bottom: 0; | |||
width: 80vw; | |||
max-width: 320px; | |||
background: #fff; | |||
z-index: 10300; | |||
box-shadow: 4px 0 24px rgba(0,0,0,0.18); | |||
overflow-y: auto; | |||
padding: 20px 16px 40px; | |||
transform: translateX(-100%); | |||
transition: transform 0.25s cubic-bezier(0.4,0,0.2,1); | |||
} | |||
.gr-mobile-toc-panel.open { | |||
display: block; | |||
transform: translateX(0); | |||
} | |||
.gr-mobile-toc-backdrop { | |||
display: none; | |||
position: fixed; | |||
inset: 0; | |||
background: rgba(0,0,0,0.35); | |||
z-index: 10299; | |||
} | |||
.gr-mobile-toc-backdrop.open { display: block; } | |||
/* TOC panel header */ | |||
.gr-mobile-toc-header { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
margin-bottom: 16px; | |||
padding-bottom: 12px; | |||
border-bottom: 1px solid #f0ebe6; | |||
} | |||
.gr-mobile-toc-title { | |||
font-size: 13px; | |||
font-weight: 700; | |||
text-transform: uppercase; | |||
letter-spacing: 0.08em; | |||
color: #b5451b; | |||
font-family: system-ui, sans-serif; | |||
} | |||
.gr-mobile-toc-close { | |||
background: none; | |||
border: none; | |||
font-size: 20px; | |||
color: #888; | |||
cursor: pointer; | |||
padding: 4px; | |||
line-height: 1; | |||
} | |||
/* Clone Vector TOC links into mobile panel */ | |||
.gr-mobile-toc-panel .vector-toc-list-item { | |||
padding: 6px 0 !important; | |||
border-bottom: 1px solid #f5f0ed !important; | |||
} | |||
.gr-mobile-toc-panel .vector-toc-link { | |||
font-size: 16px !important; | |||
color: #2c1810 !important; | |||
text-decoration: none !important; | |||
display: block !important; | |||
padding: 4px 0 !important; | |||
line-height: 1.5 !important; | |||
} | |||
.gr-mobile-toc-panel .vector-toc-list-item-active .vector-toc-link { | |||
color: #b5451b !important; | |||
font-weight: 600 !important; | |||
} | |||
/* ── 5. ANNOTATIONS BAR (Notes/Bookmark/Feedback) ───────────── */ | |||
#gra-mobile-bar-inner { | |||
padding-bottom: env(safe-area-inset-bottom, 8px) !important; | |||
} | |||
.gra-mob-btn { | |||
min-height: 64px !important; | |||
font-size: 12px !important; | |||
} | |||
.gra-mob-btn .gra-icon { | |||
width: 26px !important; | |||
height: 26px !important; | |||
} | |||
/* Toggle button — move up to avoid overlap with TOC btn */ | |||
#gra-toggle { | |||
bottom: 72px !important; | |||
right: 16px !important; | |||
width: 52px !important; | |||
height: 52px !important; | |||
} | |||
/* ── 6. HEADINGS ─────────────────────────────────────────────── */ | |||
.mw-parser-output h2, | |||
.mw-parser-output .mw-heading2 h2 { | |||
font-size: 1.15em !important; | |||
width: 100% !important; | |||
margin: 20px 0 4px !important; | |||
} | |||
.mw-parser-output h3, | |||
.mw-parser-output .mw-heading3 h3 { | |||
font-size: 1em !important; | |||
width: 100% !important; | |||
margin: 16px 0 4px !important; | |||
} | |||
/* ── 7. VERSE + BHASHYAM INDENT ─────────────────────────────── */ | |||
.bhashyam-block { margin-left: 0 !important; } | |||
.padya-block { margin-left: 16px !important; } | |||
.prasna-answer { margin-left: 16px !important; } | |||
/* ── 8. HOME PAGE GRID ───────────────────────────────────────── */ | |||
.gr-home-grid { | |||
flex-direction: column !important; | |||
gap: 12px !important; | |||
} | |||
.gr-home-card { | |||
min-width: unset !important; | |||
max-width: 100% !important; | |||
flex: 1 1 100% !important; | |||
} | |||
/* ── 9. MAIN PAGE TOGGLE ─────────────────────────────────────── */ | |||
.gr-home-toggle { flex-wrap: wrap !important; gap: 6px !important; } | |||
.gr-toggle-btn { font-size: 0.85em !important; padding: 8px 16px !important; } | |||
/* ── 10. VECTOR COLUMN LAYOUT — single column ───────────────── */ | |||
.mw-page-container, | |||
.vector-page-container { | |||
padding: 0 !important; | |||
} | |||
.vector-column-end, | |||
.vector-body-container { | |||
padding: 0 !important; | |||
} | |||
.vector-page-content { | |||
padding: 0 !important; | |||
} | |||
/* ── 11. SEARCH OVERLAY ──────────────────────────────────────── */ | |||
#gr-search-overlay { padding-top: 0 !important; align-items: stretch !important; } | |||
#gr-search-panel { | |||
border-radius: 0 !important; | |||
width: 100vw !important; | |||
height: 100dvh !important; | |||
max-height: 100dvh !important; | |||
} | |||
/* ── 12. COMPOSERS (feedback/note/bookmark) ──────────────────── */ | |||
.gra-composer, | |||
.gra-bm-composer { | |||
width: calc(100vw - 24px) !important; | |||
max-width: 400px !important; | |||
} | |||
/* ── 13. PANEL (notes/bookmarks) ────────────────────────────── */ | |||
#gra-panel { width: 100vw !important; right: -100vw !important; } | |||
} | |||
/* ── MOBILE TOC JS — injected by inline script below ─────────── */ | |||