MediaWiki:Minerva.css

From Linguifex
Revision as of 21:49, 6 November 2025 by Sware (talk | contribs) (Replaced content with "All CSS here will be loaded for users of the MinervaNeue skin. This is the skin used by MobileFrontend.: <nowiki>: .tunk, .tneg, .tpos { vertical-align: 20%; font-size: 80%; } .use-with-mention, .ib-content { font-style: italic; } .senseid:target { background: var(--wikt-palette-lightblue); } hide redundant second interProject links: .interProject { display: none; clear: both; border-top: 2px dotted var(--border-color-base, #AAAAAA); margin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* All CSS here will be loaded for users of the MinervaNeue skin. This is the skin used by MobileFrontend. */
/* <nowiki> */

.tunk, .tneg, .tpos {
	vertical-align: 20%;
	font-size: 80%;
}

.use-with-mention, .ib-content {
	font-style: italic;
}

.senseid:target {
	background: var(--wikt-palette-lightblue);
}

/* hide redundant second interProject links */
.interProject {
	display: none;
	clear: both;
	border-top: 2px dotted var(--border-color-base, #AAAAAA);
	margin-top: 2em;
}

.term-list,
.ul-column-count > ul,
.ul-column-count > ol,
.ul-column-count > dl,
.term-list .CategoryTreeChildren {
	column-count: 1 !important;
}

/* Default background color for multi-column lists. */
.columns-bg {
	background: var(--wikt-palette-lavender);
}

/* make sure bullets appear inside {{col-top}}, {{top2}} etc */
.columns-bg > ul {
	margin-left: 0.5em;
	margin-bottom: 0;
}

/* allow inline hieroglyphs */
.mw-hiero-outer {
	display: inline-table;
	vertical-align: middle;
	font-size: 10px;
}

/* WikiHiero kludge */
.wikt-hierokludge {
	display: inline-block;
}

/* Horizontal rules */
body.ns-0 #mw-content-text .mw-parser-output > :not(.collapsible-block) + h2:not(:first-of-type),
body.ns-0 #mw-content-text .mw-parser-output > .open-block + h2:not(:first-of-type) {
	border-top: 1px solid var(--border-color-base, #a2a9b1);
	padding-top: calc(8px + 0.5em);
	margin-top: 8px;
}

/* Don't float sister project boxes and the like. Note, table.floatright is already dealt with by 
	built-in MediaWiki mobile site style overrides, but only when the width is < 720 px,
	so match that behavior */
@media screen and (max-width: 719px) {
	.content .floatright {
		float: none;
		margin-left: 0;
		margin-right: 0;
	}
}

/* stuff visible when previewing an edit only */
.previewonly {
	display: none;
}

#wikiPreview .previewonly {
	display: inline;
}

/* Shorten margins in nested definitions and discussions on narrow screens */
/* Note: use .mw-parser-output.mw-parser-output instead of .mw-parser-output in order to increase specificity */
@media screen and (max-width: 719px) {
	.mw-parser-output.mw-parser-output ol ol {
		margin: 0.2em 0 0 2em;
		padding-left: 0;
	}
	.mw-parser-output.mw-parser-output ol ul, .mw-parser-output.mw-parser-output ol dd {
		margin: 0.2em 0 0 1em;
		padding-left: 0;
	}
	.mw-parser-output.mw-parser-output ol dl {
		margin: 0;
	}

	.mw-parser-output.mw-parser-output dl:has([data-mw-comment-start]) dd {
		margin-left: 0.8em;
	}
	.mw-parser-output.mw-parser-output dl:has([data-mw-comment-start]) dd dd dd {
		margin-left: 0.6em;
	}
	.mw-parser-output.mw-parser-output dl:has([data-mw-comment-start]) dd dd dd dd dd dd {
		margin-left: 0.4em;
	}
	.mw-parser-output.mw-parser-output dl:has([data-mw-comment-start]) dd dd dd dd dd dd dd dd dd dd {
		margin-left: 0.3em;
	}
	.mw-parser-output.mw-parser-output dl:has([data-mw-comment-start]) {
		margin-left: 0;
	}
}

/* Bold definition numbering */
ol > li::marker {
	font-weight: 500;
}

/* [[phab:T316670]] */
.mw-heading * {
	word-break: normal;
}

/* aesthetic tweak */
#content .mw-heading3 {
	margin-top: 0;
}

/* aesthetic tweak */
.mw-parser-output ul {
	margin-bottom: 0.5em;
}

/* overrides mobile style which sets table width to 100% on narrow screens, resulting in a subtle stripe */
/* also stop floatright elements from touching an element directly above */
.mw-parser-output .floatright {
	max-width: -webkit-fit-content;
	max-width: -moz-fit-content;
	max-width: fit-content;
	margin-top: 0.6em;
}

/* undo https://phabricator.wikimedia.org/T367240, where Wikimedia devs again assumed they know better than everyone else */
.client-js .mw-parser-output > section > .mw-heading:not(.mf-collapsible-heading) {
	padding-left: 0;
	border: none;
}

/* [[Wiktionary:Beer_parlour/2024/September#Heading_level_4_appearance]]:
	* h3 is 120% 1.2em, and h5 is 100%. make h4 110% = 1.1em.
	* increase h3 to 125% to compensate, since otherwise h3 and h4 are too similar.
	* make h5 bold, since it is not by default. */
@media screen {
	.mw-heading3, h3 {
		font-size: 1.25em;
	}
	.mw-heading4, h4 {
		font-size: 1.1em;
	}
	.mw-heading5, h5 {
		font-weight: bold;
	}
}

/* larger collapsed size for list switchers to account for larger margins on <li> elements */
.mw-parser-output .list-switcher {
	/* This is a hack so we can use getComputedStyle to find the
	maximum permissible height value of a list-switcher.
	It must be kept in sync with .list-switcher-collapsed `max-height` */
	bottom: calc(3lh + 20px);
}

.mw-parser-output .list-switcher-collapsed {
	/* If changing this value, change .list-switcher `bottom` above */
	max-height: calc(3lh + 20px);
}

/* </nowiki> */