Jump to content

MediaWiki:Common.css: Difference between revisions

From BadWolfMC Wiki
No edit summary
No edit summary
 
(11 intermediate revisions by the same user not shown)
Line 3: Line 3:
  * Styling inside .mw-parser-output should generally use TemplateStyles.
  * Styling inside .mw-parser-output should generally use TemplateStyles.
  */
  */
/* Reset italic styling set by user agent */
/* Reset italic styling set by user agent */
cite,
cite,
dfn {
dfn {
    font-style: inherit;
font-style: inherit;
}
}


/* Straight quote marks for <q> */
/* Straight quote marks for <q> */
q {
q {
    quotes: '"' '"' "'" "'";
quotes: '"' '"' "'" "'";
}
}


/* Avoid collision of blockquote with floating elements by swapping margin and padding */
/* Avoid collision of blockquote with floating elements by swapping margin and padding */
blockquote {
blockquote {
    overflow: hidden;
overflow: hidden;
    margin: 1em 0;
margin: 1em 0;
    padding: 0 40px;
padding: 0 40px;
}
}


/* Consistent size for <small>, <sub> and <sup> */
/* Consistent size for <small>, <sub> and <sup> */
small {
small {
    font-size: 85%;
font-size: 85%;
}
}


.mw-body-content sub,
.mw-body-content sub,
.mw-body-content sup {
.mw-body-content sup {
    font-size: 80%;
font-size: 80%;
}
}


/* Same spacing for indented and unindented paragraphs on talk pages */
/* Same spacing for indented and unindented paragraphs on talk pages */
.ns-talk .mw-body-content dd {
.ns-talk .mw-body-content dd {
    margin-top: 0.4em;
margin-top: 0.4em;
    margin-bottom: 0.4em;
margin-bottom: 0.4em;
}
}


/* [Collapse/outercollapse rules abbreviated for brevity – keep your originals here] */
/* Reduce page jumps by hiding collapsed/dismissed content */
 
.client-js .collapsible:not(.mw-made-collapsible).collapsed > tbody > tr:not(:first-child),
/* Hide charinsert base for those not using the gadget */
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) > p,
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) > table,
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) > thead + tbody,
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) tr:not(:first-child),
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) .mw-collapsible-content,
#editpage-specialchars {
#editpage-specialchars {
    display: none;
display: none;
}
}


/* Different margin on references */
/* Different margin on references */
.references {
.references {
    margin-bottom: 0.5em;
margin-bottom: 0.5em;
}
}


/* Cite customizations */
/* Cite customizations */
span[ rel="mw:referencedBy" ] {
span[rel="mw:referencedBy"] {
    counter-reset: mw-ref-linkback 0;
counter-reset: mw-ref-linkback 0;
}
}
span[ rel="mw:referencedBy" ] > a::before {
span[rel='mw:referencedBy'] > a::before {
    content: counter( mw-ref-linkback, lower-alpha );
content: counter(mw-ref-linkback, lower-alpha);
    font-size: 80%;
font-size: 80%;
    font-weight: bold;
font-weight: bold;
    font-style: italic;
font-style: italic;
}
}
a[ rel="mw:referencedBy" ]::before {
a[rel="mw:referencedBy"]::before {
    font-weight: bold;
font-weight: bold;
    content: "^";
content: "^";
}
}
span[ rel="mw:referencedBy" ]::before {
span[rel="mw:referencedBy"]::before {
    content: "^ ";
content: "^ ";
}
}


/* jQuery makeCollapsible styling */
/* jQuery makeCollapsible toggle */
.mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) {
.mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) {
    font-weight: normal;
font-weight: normal;
    padding: 0 0.2em;
padding: 0 0.2em;
}
}
.mw-collapsible-leftside-toggle .mw-collapsible-toggle {
.mw-collapsible-leftside-toggle .mw-collapsible-toggle {
    float: left;
float: left;
}
}


/* Lists in wikitable data cells are always left-aligned */
/* Lists in wikitable cells are left-aligned */
.wikitable td ul,
.wikitable td ul,
.wikitable td ol,
.wikitable td ol,
.wikitable td dl {
.wikitable td dl {
    text-align: left;
text-align: left;
}
}


/* Change external link icon to PDF icon for PDF files */
/* PDF icon override */
.mw-parser-output a[href$=".pdf"].external,
.mw-parser-output a[href$=".pdf"].external,
.mw-parser-output a[href*=".pdf?"].external,
.mw-parser-output a[href*=".pdf?"].external,
Line 91: Line 94:
.mw-parser-output a[href*=".PDF?"].external,
.mw-parser-output a[href*=".PDF?"].external,
.mw-parser-output a[href*=".PDF#"].external {
.mw-parser-output a[href*=".PDF#"].external {
    background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right;
background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right;
    padding: 8px 18px 8px 0;
padding: 8px 18px 8px 0;
}
}


/* System messages styled like fmbox */
/* System messages / warnings */
.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt,
.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt,
div.mw-lag-warn-high,
div.mw-lag-warn-high,
div.mw-cascadeprotectedwarning,
div.mw-cascadeprotectedwarning,
div#mw-protect-cascadeon {
div#mw-protect-cascadeon {
    clear: both;
clear: both;
    margin: 0.2em 0;
margin: 0.2em 0;
    border: 1px solid #bb7070;
border: 1px solid #bb7070;
    background-color: var(--background-color-error-subtle, #ffdbdb);
background-color: var(--background-color-error-subtle, #ffdbdb);
    padding: 0.25em 0.9em;
padding: 0.25em 0.9em;
    box-sizing: border-box;
box-sizing: border-box;
}
}
 
.mw-contributions-blocked-notice-partial
/* Partial block message colors */
  .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt {
.mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt {
border-color: #fc3;
    border-color: #fc3;
background-color: var(--background-color-warning-subtle, #fef6e7);
    background-color: var(--background-color-warning-subtle, #fef6e7);
}
}


/* Minimum thumb width for thumbnails and frames */
/* Minimum thumb width */
@media (min-width: 640px) {
@media (min-width: 640px) {
    figure[typeof~='mw:File/Thumb'],
figure[typeof~="mw:File/Thumb"],
    figure[typeof~='mw:File/Frame'],
figure[typeof~="mw:File/Frame"],
    .thumbinner {
.thumbinner {
        min-width: 100px;
min-width: 100px;
    }
}
}
}


/* Prevent float overlap on category lists etc. */
/* Prevent float overlaps */
#mw-subcategories,
#mw-subcategories,
#mw-pages,
#mw-pages,
Line 130: Line 132:
#wikiPreview,
#wikiPreview,
#wikiDiff {
#wikiDiff {
    clear: both;
clear: both;
}
}


/* Permission-based visibility toggles */
/* Hide special-group content by default */
.checkuser-show,
.checkuser-show,
.sysop-show,
.sysop-show,
Line 144: Line 146:
.autoconfirmed-show,
.autoconfirmed-show,
.user-show {
.user-show {
    display: none;
display: none;
}
}


/* Hide editnotice redlinks and images */
/* Hide editnotice elements */
.ve-ui-mwNoticesPopupTool-item .editnotice-redlink,
.ve-ui-mwNoticesPopupTool-item .editnotice-redlink,
.ve-ui-mwNoticesPopupTool-item .mbox-image,
.ve-ui-mwNoticesPopupTool-item .mbox-image,
.ve-ui-mwNoticesPopupTool-item .mbox-imageright {
.ve-ui-mwNoticesPopupTool-item .mbox-imageright {
    display: none !important;
display: none !important;
}
}


/* Remove bullets on multiple warnings */
/* Permissions-errors list */
ul.permissions-errors {
ul.permissions-errors {
    margin: 0;
margin: 0;
}
}
ul.permissions-errors > li {
ul.permissions-errors > li {
    list-style: none;
list-style: none;
}
}


/* Inline math font size adjustments */
/* Inline math */
span.mwe-math-mathml-inline {
span.mwe-math-mathml-inline {
    font-size: 118%;
font-size: 118%;
}
}
/* Block math alignment */
.mwe-math-fallback-image-display,
.mwe-math-fallback-image-display,
.mwe-math-mathml-display {
.mwe-math-mathml-display {
    margin-left: 1.6em !important;
margin: 0.6em 0 0.6em 1.6em !important;
    margin-top: 0.6em;
    margin-bottom: 0.6em;
}
}
.mwe-math-mathml-display math {
.mwe-math-mathml-display math {
    display: inline;
display: inline;
}
}


/* Checkerboard for transparent PNGs */
@media screen {
@media screen {
    /* Checker background for transparent gallery thumbs */
body:not(.ns-0):not(.ns-2):not(.ns-100)
    body:not(.ns-0):not(.ns-2):not(.ns-100) .gallerybox .thumb img {
.gallerybox .thumb img {
        background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat;
background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png)
    }
repeat;
    #siteSub {
}
        display: block;
#siteSub {
    }
display: block;
    .references {
}
        font-size: 90%;
.references {
    }
font-size: 90%;
}
}
}


/*
/* Hide some portlets / special cases */
* ========================================================================
.flaggedrevs_draft_synced,
* Consolidated Infobox styling (light mode)
.flaggedrevs_stable_synced,
* ========================================================================
#t-upload,
*/
.mw-special-Book #coll-downloadbox {
display: none;
}


table.infobox {
/* =========================================================================
    background-color: #f8f9fa;
  TEMPLATESTYLES + INFOBOX
    border: 1px solid #a2a9b1;
  ————————————————————————————————————————————————————————————————
    font-size: 88%;
  Your infobox rules, light mode first, then dark overrides.
    line-height: 1.5em;
  ======================================================================= */
    margin: 0.5em 0 0.5em 1em;
 
    float: right;
/* ——— Infobox (light mode) ——— */
    clear: right;
.infobox {
    width: 22em;
border: 1px solid #a2a9b1;
    border-spacing: 3px;
color: #202122;
    padding: 0.2em;
background-color: #f8f9fa;
padding: 0.2em;
font-size: 88%;
line-height: 1.5em;
border-spacing: 3px;
}
@media (min-width: 640px) {
.infobox {
margin: 0.5em 0 0.5em 1em;
float: right;
clear: right;
width: 22em;
}
}
}
/* Responsive full-width on narrow screens */
@media (max-width: 640px) {
@media (max-width: 640px) {
    table.infobox {
.infobox {
        width: 100%;
width: 100%;
        float: none;
}
        clear: none;
.infobox .nowrap {
        margin: 0.5em 0;
white-space: normal;
    }
}
    table.infobox .nowrap {
        white-space: normal;
    }
}
}


.infobox-title {
/* Common infobox parts */
    font-weight: bold;
.infobox .infobox-header,
    text-align: center;
.infobox .infobox-subheader,
    padding: 0.4em;
.infobox .infobox-image,
    background-color: #e2e3e5;
.infobox .infobox-full-data,
    color: #212529;
.infobox .infobox-below {
    border-bottom: 1px solid #a2a9b1;
text-align: center;
}
.infobox .infobox-label,
.infobox .infobox-data,
.infobox th,
.infobox td {
vertical-align: top;
text-align: left;
}
}


.infobox-image {
/* —— Deep-blue headers on every infobox —— */
    text-align: center;
.infobox .infobox-header {
    padding: 0.5em;
background: #003B6F;
    background: none;
color: #ffffff;
}
}


.infobox-caption {
/* make the infobox title bolder and a bit bigger */
    font-size: 85%;
table.infobox > .infobox-title {
    color: #555;
  font-size: 1.25em !important;
    padding: 0.2em 0;
  font-weight: 700  !important;
}
}


.infobox-header {
/* Serverbuild-specific (optional) */
    background-color: #003b6f !important;
table.infobox.serverbuild .infobox-header {
    color:            #ffffff !important;
/* adjust here if you like */
    padding:          0.4em 0.6em;
    border-top:      1px solid #a2a9b1;
}
}


.infobox-label {
/* ——— Dark-mode overrides ——— */
    background-color: #f1f1f1;
@media screen {
    padding:          0.3em 0.6em;
/* box background + all text light */
    font-weight:     normal;
html.skin-theme-clientpref-night .infobox,
    width:           35%;
html.skin-theme-clientpref-os    .infobox {
    vertical-align:  top;
background-color: var(--surface-secondary) !important;
    border-top:      1px solid #ddd;
color: var(--text-primary)      !important;
    text-align:      left;
}
}


.infobox-data {
/* but keep your headers deep blue with white text */
    padding:        0.3em 0.6em;
html.skin-theme-clientpref-night .infobox .infobox-header,
    border-top:     1px solid #ddd;
html.skin-theme-clientpref-os    .infobox .infobox-header {
    vertical-align: top;
background: #003B6F !important;
    text-align:    left;
color:     #ffffff  !important;
}
}
}


.infobox-full-data {
/* Button styling for RP infobox (works in light/dark) */
    padding:   0.3em 0.6em;
.bwmc-btn a {
    border-top: 1px solid #ddd;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
  background: #4a90e2;
  color: #fff !important;
  border: 1px solid #407fca;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
}
 
/* Remove any external-link icon and keep hover clean */
.infobox-below {
.bwmc-btn a.external {
    padding:          0.4em 0.6em;
  background-image: none !important;
    background-color: #e9ecef;
  padding-right: 14px; /* so removing the icon doesn't shrink the pill */
    border-top:       1px solid #a2a9b1;
}
}
 
.bwmc-btn a:hover {
.infobox-navbar {
  filter: brightness(1.05);
    padding:   0.2em 0.6em;
  text-decoration: none !important;
    background: none;
    text-align: center;
}
}

Latest revision as of 08:52, 1 November 2025

/*
 * This is the CSS common to all desktop skins on en.Wikipedia.
 * Styling inside .mw-parser-output should generally use TemplateStyles.
 */
/* Reset italic styling set by user agent */
cite,
dfn {
	font-style: inherit;
}

/* Straight quote marks for <q> */
q {
	quotes: '"' '"' "'" "'";
}

/* Avoid collision of blockquote with floating elements by swapping margin and padding */
blockquote {
	overflow: hidden;
	margin: 1em 0;
	padding: 0 40px;
}

/* Consistent size for <small>, <sub> and <sup> */
small {
	font-size: 85%;
}

.mw-body-content sub,
.mw-body-content sup {
	font-size: 80%;
}

/* Same spacing for indented and unindented paragraphs on talk pages */
.ns-talk .mw-body-content dd {
	margin-top: 0.4em;
	margin-bottom: 0.4em;
}

/* Reduce page jumps by hiding collapsed/dismissed content */
.client-js .collapsible:not(.mw-made-collapsible).collapsed > tbody > tr:not(:first-child),
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) > p,
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) > table,
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) > thead + tbody,
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) tr:not(:first-child),
.client-js .outercollapse .innercollapse.mw-collapsible:not(.mw-made-collapsible) .mw-collapsible-content,
#editpage-specialchars {
	display: none;
}

/* Different margin on references */
.references {
	margin-bottom: 0.5em;
}

/* Cite customizations */
span[rel="mw:referencedBy"] {
	counter-reset: mw-ref-linkback 0;
}
span[rel='mw:referencedBy'] > a::before {
	content: counter(mw-ref-linkback, lower-alpha);
	font-size: 80%;
	font-weight: bold;
	font-style: italic;
}
a[rel="mw:referencedBy"]::before {
	font-weight: bold;
	content: "^";
}
span[rel="mw:referencedBy"]::before {
	content: "^ ";
}

/* jQuery makeCollapsible toggle */
.mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) {
	font-weight: normal;
	padding: 0 0.2em;
}
.mw-collapsible-leftside-toggle .mw-collapsible-toggle {
	float: left;
}

/* Lists in wikitable cells are left-aligned */
.wikitable td ul,
.wikitable td ol,
.wikitable td dl {
	text-align: left;
}

/* PDF icon override */
.mw-parser-output a[href$=".pdf"].external,
.mw-parser-output a[href*=".pdf?"].external,
.mw-parser-output a[href*=".pdf#"].external,
.mw-parser-output a[href$=".PDF"].external,
.mw-parser-output a[href*=".PDF?"].external,
.mw-parser-output a[href*=".PDF#"].external {
	background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right;
	padding: 8px 18px 8px 0;
}

/* System messages / warnings */
.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt,
div.mw-lag-warn-high,
div.mw-cascadeprotectedwarning,
div#mw-protect-cascadeon {
	clear: both;
	margin: 0.2em 0;
	border: 1px solid #bb7070;
	background-color: var(--background-color-error-subtle, #ffdbdb);
	padding: 0.25em 0.9em;
	box-sizing: border-box;
}
.mw-contributions-blocked-notice-partial
  .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt {
	border-color: #fc3;
	background-color: var(--background-color-warning-subtle, #fef6e7);
}

/* Minimum thumb width */
@media (min-width: 640px) {
	figure[typeof~="mw:File/Thumb"],
	figure[typeof~="mw:File/Frame"],
	.thumbinner {
		min-width: 100px;
	}
}

/* Prevent float overlaps */
#mw-subcategories,
#mw-pages,
#mw-category-media,
#filehistory,
#wikiPreview,
#wikiDiff {
	clear: both;
}

/* Hide special-group content by default */
.checkuser-show,
.sysop-show,
.abusefilter-show,
.abusefilter-helper-show,
.patroller-show,
.templateeditor-show,
.extendedmover-show,
.extendedconfirmed-show,
.autoconfirmed-show,
.user-show {
	display: none;
}

/* Hide editnotice elements */
.ve-ui-mwNoticesPopupTool-item .editnotice-redlink,
.ve-ui-mwNoticesPopupTool-item .mbox-image,
.ve-ui-mwNoticesPopupTool-item .mbox-imageright {
	display: none !important;
}

/* Permissions-errors list */
ul.permissions-errors {
	margin: 0;
}
ul.permissions-errors > li {
	list-style: none;
}

/* Inline math */
span.mwe-math-mathml-inline {
	font-size: 118%;
}
.mwe-math-fallback-image-display,
.mwe-math-mathml-display {
	margin: 0.6em 0 0.6em 1.6em !important;
}
.mwe-math-mathml-display math {
	display: inline;
}

/* Checkerboard for transparent PNGs */
@media screen {
	body:not(.ns-0):not(.ns-2):not(.ns-100)
		.gallerybox .thumb img {
		background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png)
			repeat;
	}
	#siteSub {
		display: block;
	}
	.references {
		font-size: 90%;
	}
}

/* Hide some portlets / special cases */
.flaggedrevs_draft_synced,
.flaggedrevs_stable_synced,
#t-upload,
.mw-special-Book #coll-downloadbox {
	display: none;
}

/* =========================================================================
   TEMPLATESTYLES + INFOBOX
   ————————————————————————————————————————————————————————————————
   Your infobox rules, light mode first, then dark overrides.
   ======================================================================= */

/* ——— Infobox (light mode) ——— */
.infobox {
	border: 1px solid #a2a9b1;
	color: #202122;
	background-color: #f8f9fa;
	padding: 0.2em;
	font-size: 88%;
	line-height: 1.5em;
	border-spacing: 3px;
}
@media (min-width: 640px) {
	.infobox {
		margin: 0.5em 0 0.5em 1em;
		float: right;
		clear: right;
		width: 22em;
	}
}
@media (max-width: 640px) {
	.infobox {
		width: 100%;
	}
	.infobox .nowrap {
		white-space: normal;
	}
}

/* Common infobox parts */
.infobox .infobox-header,
.infobox .infobox-subheader,
.infobox .infobox-image,
.infobox .infobox-full-data,
.infobox .infobox-below {
	text-align: center;
}
.infobox .infobox-label,
.infobox .infobox-data,
.infobox th,
.infobox td {
	vertical-align: top;
	text-align: left;
}

/* —— Deep-blue headers on every infobox —— */
.infobox .infobox-header {
	background: #003B6F;
	color: #ffffff;
}

/* make the infobox title bolder and a bit bigger */
table.infobox > .infobox-title {
  font-size: 1.25em !important;
  font-weight: 700   !important;
}

/* Serverbuild-specific (optional) */
table.infobox.serverbuild .infobox-header {
	/* adjust here if you like */
}

/* ——— Dark-mode overrides ——— */
@media screen {
	/* box background + all text light */
	html.skin-theme-clientpref-night .infobox,
	html.skin-theme-clientpref-os    .infobox {
		background-color: var(--surface-secondary) !important;
		color: var(--text-primary)      !important;
	}

	/* but keep your headers deep blue with white text */
	html.skin-theme-clientpref-night .infobox .infobox-header,
	html.skin-theme-clientpref-os    .infobox .infobox-header {
		background: #003B6F !important;
		color:      #ffffff  !important;
	}
}

/* Button styling for RP infobox (works in light/dark) */
.bwmc-btn a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
  background: #4a90e2;
  color: #fff !important;
  border: 1px solid #407fca;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
/* Remove any external-link icon and keep hover clean */
.bwmc-btn a.external {
  background-image: none !important;
  padding-right: 14px; /* so removing the icon doesn't shrink the pill */
}
.bwmc-btn a:hover {
  filter: brightness(1.05);
  text-decoration: none !important;
}