MediaWiki:Common.css: Difference between revisions

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
Post style v5: tame Echo notification icons in #p-personal so they line up cleanly (via update-page on MediaWiki MCP Server)
Post style v6: crop logo to hide baked-in wordmark, tighten mobile margins (via update-page on MediaWiki MCP Server)
Line 19: Line 19:
  * Post style — applied via body.pickipedia-post (added by Common.js
  * Post style — applied via body.pickipedia-post (added by Common.js
  * to any User:<name>/<subpage> page). Substack-ish reading layout.
  * to any User:<name>/<subpage> page). Substack-ish reading layout.
  * v5: tame Echo notification icons so they sit inline with the rest
  * v6: crop logo to hide baked-in "PickiPedia" wordmark; tighten
  * of the personal-tools list instead of stacking awkwardly.
* mobile margins.
*
* The logo asset (assets/logo.png, 135x135) bakes the illustration AND
* the "PickiPedia" wordmark into one image. We render it cropped so
* only the illustration shows. Width:height ratio is roughly 5:4 on
  * the cropped portion.
  * ============================================================ */
  * ============================================================ */


Line 38: Line 43:
}
}


/* PickiPedia logo — pin to top-left of the viewport. */
/* PickiPedia logo — pin to top-left. Cropped to hide the wordmark. */
body.pickipedia-post #p-logo {
body.pickipedia-post #p-logo {
position: fixed !important;
position: fixed !important;
top: 0.5em;
top: 0.5em;
left: 1em;
left: 1em;
width: 100px !important;
width: 80px !important;
height: 100px !important;
height: 64px !important;
z-index: 5;
z-index: 5;
overflow: hidden;
}
}


body.pickipedia-post #p-logo a.mw-wiki-logo {
body.pickipedia-post #p-logo a.mw-wiki-logo {
display: block;
display: block;
width: 100px;
width: 80px;
height: 100px;
height: 80px;
background-size: contain !important;
background-size: 80px 80px !important;
background-repeat: no-repeat;
background-repeat: no-repeat;
background-position: center;
background-position: top center;
}
}


Line 64: Line 70:
left: auto !important;
left: auto !important;
width: auto !important;
width: auto !important;
max-width: calc(100vw - 130px); /* leave room for the logo on the left */
max-width: calc(100vw - 110px);
z-index: 5;
z-index: 5;
font-size: 0.85em;
font-size: 0.85em;
Line 97: Line 103:
}
}


/* Echo notification icons (bell, inbox) — render as compact 22px icons
/* Echo notification icons (bell, inbox) — render compact and inline. */
  that sit inline with the username/log-out text. Without this they
  stack vertically because their default styling treats them as
  block-level items with their own padding. */
body.pickipedia-post #pt-notifications-alert,
body.pickipedia-post #pt-notifications-alert,
body.pickipedia-post #pt-notifications-notice {
body.pickipedia-post #pt-notifications-notice {
Line 124: Line 127:
}
}


/* Hide the badge counter's text positioning quirks; let it overlay. */
body.pickipedia-post #pt-notifications-alert .mw-echo-notifications-badge,
body.pickipedia-post #pt-notifications-alert .mw-echo-notifications-badge,
body.pickipedia-post #pt-notifications-notice .mw-echo-notifications-badge {
body.pickipedia-post #pt-notifications-notice .mw-echo-notifications-badge {
Line 138: Line 140:
left: auto !important;
left: auto !important;
width: auto !important;
width: auto !important;
max-width: calc(100vw - 130px);
max-width: calc(100vw - 110px);
z-index: 5;
z-index: 5;
font-size: 0.85em;
font-size: 0.85em;
Line 180: Line 182:
body.pickipedia-post #content {
body.pickipedia-post #content {
max-width: 720px;
max-width: 720px;
margin: 5.5em auto 3em auto !important;
margin: 5em auto 3em auto !important;
padding: 2.5em 2.5em 3em 2.5em;
padding: 2.5em 2.5em 3em 2.5em;
background: #fff;
background: #fff;
Line 291: Line 293:
}
}


/* Categories sit at the bottom in a quiet strip */
body.pickipedia-post .catlinks {
body.pickipedia-post .catlinks {
border: none;
border: none;
Line 302: Line 303:
}
}


/* Embedded videos breathe inside the reading column. */
body.pickipedia-post .hls-video-player {
body.pickipedia-post .hls-video-player {
margin: 1.8em 0;
margin: 1.8em 0;
Line 325: Line 325:
@media screen and (max-width: 600px) {
@media screen and (max-width: 600px) {
body.pickipedia-post #p-logo {
body.pickipedia-post #p-logo {
width: 50px !important;
width: 44px !important;
height: 50px !important;
height: 36px !important;
top: 0.4em;
top: 0.3em;
left: 0.5em;
left: 0.5em;
}
}
body.pickipedia-post #p-logo a.mw-wiki-logo {
body.pickipedia-post #p-logo a.mw-wiki-logo {
width: 50px;
width: 44px;
height: 50px;
height: 44px;
background-size: 44px 44px !important;
}
}


Line 339: Line 340:
font-size: 0.75em;
font-size: 0.75em;
padding: 0.2em 0.4em;
padding: 0.2em 0.4em;
max-width: calc(100vw - 70px);
max-width: calc(100vw - 60px);
}
}
body.pickipedia-post #p-cactions {
body.pickipedia-post #p-cactions {
top: 2.2em;
top: 2em;
}
}


Line 355: Line 356:
body.pickipedia-post #content {
body.pickipedia-post #content {
max-width: none;
max-width: none;
margin: 4em 0.5em 2em 0.5em !important;
margin: 3em 0.5em 2em 0.5em !important;
padding: 1.25em 1.25em 2em 1.25em;
padding: 1.25em 1.25em 2em 1.25em;
}
}

Revision as of 01:26, 29 April 2026

/* CSS placed here will be applied to all skins */

#siteSub {
    display: block;
    font-size: 10px;
}

/* Responsive infobox for Show template - full width on mobile */
@media screen and (max-width: 600px) {
    .show-infobox {
        float: none !important;
        width: 100% !important;
        margin: 0 0 1em 0 !important;
        box-sizing: border-box;
    }
}

/* ============================================================
 * Post style — applied via body.pickipedia-post (added by Common.js
 * to any User:<name>/<subpage> page). Substack-ish reading layout.
 * v6: crop logo to hide baked-in "PickiPedia" wordmark; tighten
 * mobile margins.
 *
 * The logo asset (assets/logo.png, 135x135) bakes the illustration AND
 * the "PickiPedia" wordmark into one image. We render it cropped so
 * only the illustration shows. Width:height ratio is roughly 5:4 on
 * the cropped portion.
 * ============================================================ */

body.pickipedia-post #sidebar {
	display: none;
}

body.pickipedia-post #column-one {
	position: static !important;
	float: none !important;
	width: auto !important;
	min-height: 0 !important;
}

body.pickipedia-post #column-one > h2 {
	display: none;
}

/* PickiPedia logo — pin to top-left. Cropped to hide the wordmark. */
body.pickipedia-post #p-logo {
	position: fixed !important;
	top: 0.5em;
	left: 1em;
	width: 80px !important;
	height: 64px !important;
	z-index: 5;
	overflow: hidden;
}

body.pickipedia-post #p-logo a.mw-wiki-logo {
	display: block;
	width: 80px;
	height: 80px;
	background-size: 80px 80px !important;
	background-repeat: no-repeat;
	background-position: top center;
}

/* Personal tools (login / account / notifications) — top-right. */
body.pickipedia-post #p-personal {
	position: fixed !important;
	top: 0.5em;
	right: 1em;
	left: auto !important;
	width: auto !important;
	max-width: calc(100vw - 110px);
	z-index: 5;
	font-size: 0.85em;
	background: rgba(255, 255, 255, 0.85);
	padding: 0.25em 0.5em;
	border-radius: 3px;
}

body.pickipedia-post #p-personal h2 {
	display: none;
}

body.pickipedia-post #p-personal ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 0.75em;
}

body.pickipedia-post #p-personal li {
	display: flex;
	align-items: center;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	list-style: none;
	min-height: 1.5em;
}

/* Echo notification icons (bell, inbox) — render compact and inline. */
body.pickipedia-post #pt-notifications-alert,
body.pickipedia-post #pt-notifications-notice {
	width: 22px !important;
	height: 22px !important;
	margin: 0 !important;
	padding: 0 !important;
	flex: 0 0 22px;
}

body.pickipedia-post #pt-notifications-alert a,
body.pickipedia-post #pt-notifications-notice a {
	display: block;
	width: 22px;
	height: 22px;
	background-size: 18px 18px !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	padding: 0 !important;
	margin: 0 !important;
	text-indent: -9999px;
	overflow: hidden;
}

body.pickipedia-post #pt-notifications-alert .mw-echo-notifications-badge,
body.pickipedia-post #pt-notifications-notice .mw-echo-notifications-badge {
	width: 22px !important;
	height: 22px !important;
}

/* Page-actions tabs — pin just below the personal tools, top-right. */
body.pickipedia-post #p-cactions {
	position: fixed !important;
	top: 2.5em;
	right: 1em;
	left: auto !important;
	width: auto !important;
	max-width: calc(100vw - 110px);
	z-index: 5;
	font-size: 0.85em;
	background: rgba(255, 255, 255, 0.85);
	padding: 0.25em 0.5em;
	border-radius: 3px;
}

body.pickipedia-post #p-cactions h2 {
	display: none;
}

body.pickipedia-post #p-cactions ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 0.75em;
	align-items: center;
}

body.pickipedia-post #p-cactions li {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.pickipedia-post #p-cactions-mobile {
	display: none;
}

/* --- The card that holds the post --- */
body.pickipedia-post #globalWrapper,
body.pickipedia-post #column-content {
	float: none;
	margin: 0 auto;
}

body.pickipedia-post #content {
	max-width: 720px;
	margin: 5em auto 3em auto !important;
	padding: 2.5em 2.5em 3em 2.5em;
	background: #fff;
	border: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	border-radius: 4px;
	float: none;
}

/* --- Title and byline --- */
body.pickipedia-post .firstHeading,
body.pickipedia-post h1.firstHeading {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2.5em;
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.01em;
	border-bottom: none;
	margin: 0 0 0.25em 0;
	color: #1a1a1a;
}

body.pickipedia-post .mw-page-title-namespace,
body.pickipedia-post .mw-page-title-separator {
	display: none;
}

.pickipedia-post-byline {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
	font-size: 0.95em;
	color: #666;
	margin: 0 0 2em 0;
	letter-spacing: 0.01em;
}

.pickipedia-post-byline a {
	color: #1a1a1a;
	font-weight: 600;
	text-decoration: none;
}

.pickipedia-post-byline a:hover {
	text-decoration: underline;
}

/* --- The wiki cruft we don't want on a post --- */
body.pickipedia-post #siteSub,
body.pickipedia-post .subpages,
body.pickipedia-post #contentSub,
body.pickipedia-post #jump-to-nav,
body.pickipedia-post .printfooter {
	display: none;
}

/* --- Body copy: serif, generous line-height --- */
body.pickipedia-post .mw-parser-output {
	font-family: Charter, "Iowan Old Style", Georgia, serif;
	font-size: 1.1em;
	line-height: 1.7;
	color: #2a2a2a;
}

body.pickipedia-post .mw-parser-output h2,
body.pickipedia-post .mw-parser-output h3,
body.pickipedia-post .mw-parser-output h4 {
	font-family: Georgia, serif;
	font-weight: 700;
	color: #1a1a1a;
	margin-top: 1.6em;
	margin-bottom: 0.5em;
}

body.pickipedia-post .mw-parser-output h2 {
	font-size: 1.55em;
	border-bottom: none;
	padding-bottom: 0;
}

body.pickipedia-post .mw-parser-output h3 {
	font-size: 1.22em;
}

body.pickipedia-post .mw-parser-output p {
	margin: 0 0 1.15em 0;
}

body.pickipedia-post .mw-parser-output a {
	color: #1a4480;
	text-decoration: underline;
	text-decoration-color: rgba(26, 68, 128, 0.3);
	text-underline-offset: 2px;
}

body.pickipedia-post .mw-parser-output a:hover {
	text-decoration-color: #1a4480;
}

body.pickipedia-post .mw-parser-output blockquote {
	border-left: 3px solid #aaa;
	margin: 1.4em 0;
	padding: 0.2em 0 0.2em 1.2em;
	color: #555;
	font-style: italic;
}

body.pickipedia-post .mw-parser-output pre,
body.pickipedia-post .mw-parser-output code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.92em;
}

body.pickipedia-post .catlinks {
	border: none;
	background: transparent;
	font-size: 0.82em;
	color: #888;
	margin-top: 2.5em;
	padding-top: 1em;
	border-top: 1px solid #eee;
}

body.pickipedia-post .hls-video-player {
	margin: 1.8em 0;
	width: 100% !important;
	max-width: 100% !important;
}

body.pickipedia-post .hls-video-player + br,
body.pickipedia-post .mw-parser-output > div[style*="width:400px"] {
	width: 100% !important;
	max-width: 100% !important;
}

body.pickipedia-post .hls-video-player video {
	max-width: 100% !important;
	width: 100% !important;
	border-radius: 4px;
}

/* --- Mobile: shrink the above-the-fold so the title doesn't eat
       half the screen on a phone. --- */
@media screen and (max-width: 600px) {
	body.pickipedia-post #p-logo {
		width: 44px !important;
		height: 36px !important;
		top: 0.3em;
		left: 0.5em;
	}
	body.pickipedia-post #p-logo a.mw-wiki-logo {
		width: 44px;
		height: 44px;
		background-size: 44px 44px !important;
	}

	body.pickipedia-post #p-personal,
	body.pickipedia-post #p-cactions {
		font-size: 0.75em;
		padding: 0.2em 0.4em;
		max-width: calc(100vw - 60px);
	}
	body.pickipedia-post #p-cactions {
		top: 2em;
	}

	body.pickipedia-post #pt-notifications-alert,
	body.pickipedia-post #pt-notifications-notice,
	body.pickipedia-post #pt-notifications-alert a,
	body.pickipedia-post #pt-notifications-notice a {
		width: 20px !important;
		height: 20px !important;
	}

	body.pickipedia-post #content {
		max-width: none;
		margin: 3em 0.5em 2em 0.5em !important;
		padding: 1.25em 1.25em 2em 1.25em;
	}

	body.pickipedia-post .firstHeading,
	body.pickipedia-post h1.firstHeading {
		font-size: 1.7em;
		line-height: 1.22;
	}

	body.pickipedia-post .mw-parser-output {
		font-size: 1.02em;
		line-height: 1.6;
	}

	.pickipedia-post-byline {
		font-size: 0.88em;
		margin-bottom: 1.2em;
	}

	body.pickipedia-post .hls-video-player {
		margin: 1.2em 0;
	}
}