MediaWiki:Common.css

From Welcome to Elderfield Wiki
Jump to navigation Jump to search
/* CSS placed here will be applied to all skins */

:root{
    /* start font settings */
    --wiki-body-font-family: sans-serif;
    --wiki-heading-font-family: sans-serif;
    --wiki-sidebar-heading-font-family: sans-serif;
    /* end font settings */
    
    /* start design variables */
	--wiki-sidebar-border-radius:0px; /* these two variables must have units specified even if 0, ignore the warning */
	--wiki-sidebar-portal-spacing:0px;
	
	--wiki-content-border-width:1px;
	--wiki-sidebar-border-width:1px;
	/* end design variables */
}

/* the rest of the variables will modify some type of color, either text color, background color, border color, etc. */

:root,


/* Begin dark styles, delete from here to "end dark styles" if you don't want your wiki to support any dark themes (remove it from [[Mediawiki:Theme-definitions]] too, or ask wiki.gg staff for help doing this) */
/* FYI: .view- will affect any theme marked |kind=dark, */
/* individual themes are prefixed with .theme- instead   */
.view-dark {
	/**********************
	* Probably edit these * [ DARK VIEW ]
	***********************/
    --wiki-body-background-color: #171717;
    --wiki-body-background-image: url(/images/6/65/BG.jpg); /* please find the file path by viewing the image directly (not at the File: page) */
    
    --wiki-content-background-color: #171217;
	--wiki-content-background-opacity: 60%;
    --wiki-content-border-color: #9c33c1;
    --wiki-content-link-color: #c357ef; /* if changing this, remember to change --wiki-icon-to-link-filter as well!!! */
    /* [ DARK VIEW ] */
    --wiki-accent-color: #ff4d9d;
    --wiki-accent-label-color: #000;
    --wiki-accent-link-color: #1e1e43;
	
    --wiki-icon-to-link-filter: invert(60%) sepia(70%) saturate(3715%) hue-rotate(206deg) brightness(101%) contrast(97%); /* put your --wiki-content-link-color into https://mrpie5.gitlab.io/css-filter-generator/ */
    /**/

    /*******************
    * Maybe edit these * [ DARK VIEW ]
    ********************/
    --wiki-body-background-position: top center;
    --wiki-body-background-size: repeat;
    --wiki-body-background-repeat: repeat;
    --wiki-body-background-attachment: fixed;
	
    --wiki-content-background-color--secondary: color-mix(in srgb, var(--wiki-content-background-color) 96%, var(--wiki-content-dynamic-color));
	--wiki-content-text-color: #ededed;
    --wiki-content-link-color--visited: var(--wiki-content-link-color);
    --wiki-content-link-color--hover: var(--wiki-content-link-color);
    --wiki-content-redlink-color: #ffc900;
	
	--wiki-content-heading-color:  #ffc900;
	
	--wiki-accent-color--hover: color-mix(in srgb, var(--wiki-accent-color) 90%, var(--wiki-accent-label-color));
    /* [ DARK VIEW ] */
	--wiki-sidebar-background-color: var(--wiki-content-background-color);
    --wiki-sidebar-background-opacity: var(--wiki-content-background-opacity);
    --wiki-sidebar-border-color: var(--wiki-content-border-color);
    --wiki-sidebar-link-color: var(--wiki-content-link-color);
    --wiki-sidebar-link-color--hover: var(--wiki-content-link-color--hover);
    --wiki-sidebar-heading-color: var(--wiki-content-heading-color);
    /* [ DARK VIEW ] */
    --wiki-navigation-background-color: var(--wiki-content-background-color--secondary);
    --wiki-navigation-background-color--secondary: var(--wiki-content-background-color);
    --wiki-navigation-border-color: var(--wiki-content-border-color);
    --wiki-navigation-text-color: var(--wiki-content-link-color);
    --wiki-navigation-text-color--hover: var(--wiki-content-link-color--hover);
    --wiki-navigation-selected-background-color: var(--wiki-content-background-color);
    --wiki-navigation-selected-border-color: var(--wiki-navigation-border-color);
    --wiki-navigation-selected-text-color: var(--wiki-content-text-color);
    /* [ DARK VIEW ] */
    --wiki-neutral-color: var(--wiki-content-text-mix-color);
    --wiki-alert-color: #ff576a;
    --wiki-warning-color:#cf721c;
    --wiki-success-color: #13aa45;
    /**/
    
    /***********************************
    * Likely do not need to edit these * [ DARK VIEW ]
    ************************************/
    --wiki-body-dynamic-color: #ffffff;
    --wiki-body-dynamic-color--inverted: #000000;
    --wiki-body-dynamic-color--secondary: #cccccc;
    --wiki-body-dynamic-color--secondary--inverted: #333333;
	
    --wiki-content-border-color--secondary: color-mix(in srgb, var(--wiki-content-border-color) 50%, transparent);
    --wiki-content-border-color--accent: color-mix(in srgb, var(--wiki-accent-color) 50%, transparent);
    --wiki-content-link-label-color: #000;
    --wiki-content-dynamic-color: #ffffff;
    --wiki-content-dynamic-color--inverted: #000000;
    --wiki-content-dynamic-color--secondary: #cccccc;
    --wiki-content-dynamic-color--secondary--inverted: #333333;
    /* [ DARK VIEW ] */
    --wiki-alert-label-color: #000000;
    --wiki-warning-label-color: #000000;
    --wiki-success-label-color: #000000;
	
    --wiki-icon-general-filter: invert(100%);
}

/* End dark styles */

/**************************************
* Shared styles                       *
* You likely don't need to edit these *
***************************************/
:root{
    --wiki-content-text-mix-color: color-mix(in srgb, var(--wiki-content-background-color), var(--wiki-content-text-color) 62%);
    --wiki-content-text-mix-color-95: color-mix(in srgb, var(--wiki-content-background-color) 95%, var(--wiki-content-text-color));
}
/********************
* End shared styles *
*********************/

/******************************
* Fallback for older browsers *
* DONT EDIT THIS              *
*******************************/
@supports not (color:color-mix(in srgb, #000, transparent)) {
	.view-dark,
	.view-light,
	:root {
		--wiki-content-text-mix-color: var(--wiki-content-text-color);
		--wiki-content-text-mix-color-95: var(--wiki-content-background-color);
		--wiki-content-background-color--secondary: var(--wiki-content-dynamic-color--secondary--inverted);
		--wiki-content-border-color--secondary: var(--wiki-content-border-color);
		--wiki-content-border-color--accent: var(--wiki-accent-color);
		--wiki-accent-color--hover: var(--wiki-accent-color);
	}
}
/*****************************
* End older browser fallback *
******************************/

/*****************************
*     PortableInfoboxes      *
******************************/
:root {
	--pi-background: var(--wiki-content-background-color);
	--pi-secondary-background: var(--wiki-accent-color);
	--pi-secondary-background-label: var(--wiki-accent-label-color);
	--pi-border-color: color-mix(in srgb, var(--pi-secondary-background) 50%, transparent);
}

.portable-infobox .pi-title,
.portable-infobox .pi-header {
	text-align:center;
	font-size:1.5em;
	background:color-mix(in srgb, var(--pi-secondary-background) 75%, transparent);
	color:var(--pi-secondary-background-label);
}

.portable-infobox .pi-data,
.portable-infobox .pi-group {
	background:var(--wiki-content-background-color--secondary);
}

.portable-infobox .pi-image {
	padding: 8px;
}

.pi-image-thumbnail {
	max-width:100%;
}

.pi-caption {
	color: var(--wiki-content-text-mix-color);
}

.pi-section-navigation .pi-section-tab.pi-section-active,
.pi-section-navigation .pi-section-tab.current,
.pi-media-collection .pi-tab-link.current {
	background: var(--pi-secondary-background);
	color: var(--pi-secondary-background-label);
}

.pi-collapse > .pi-item:first-child {
	cursor: pointer;
}

/* overqualify these to overwrite normal content heading styles */
.mw-body .portable-infobox h2,
.mw-body .portable-infobox h3 {
	border-bottom: 0;
	font-family: inherit;
	font-weight: 700;
	margin: 0;
}
/*****************************
*   End PortableInfoboxes    *
******************************/


/*******************
* Main page layout *
********************/

#mp-container {
	display:grid;
	gap:10px;
}

@media screen and (max-width:990px) {
	/* for mobile screens */
	#mp-container{
		grid-template-areas:var(--main-page-layout--mobile);
		grid-template-columns:var(--main-page-layout-columns--mobile,100%);
	}
	
	.mp-box.mp-hide-on-mobile {
		display:none;
	}
}

@media screen and (min-width:990px) and (max-width:1350px) {
	/* for narrow screens, between 990px and 1350px */
	#mp-container {
		grid-template-areas:var(--main-page-layout--tablet);
		grid-template-columns:var(--main-page-layout-columns--tablet,1fr 1fr);
	}
	
	.mp-box.mp-hide-on-tablet {
		display:none;
	}
}

@media screen and (min-width:1350px) {
	/* for all other screens, 1350px and wider */
	#mp-container {
		grid-template-areas:var(--main-page-layout--desktop);
		grid-template-columns:var(--main-page-layout-columns--desktop,2fr 1fr 2fr);
	}
	
	.mp-box.mp-hide-on-desktop {
		display:none;
	}
}

.mp-box {
	position:relative;
	display:flex;
	flex-flow:column nowrap;
	width: calc(100% - 2px);
	box-sizing: border-box;
	background:color-mix(in srgb, var(--wiki-content-background-color--secondary) 25%, transparent);
	border:1px solid var(--wiki-content-border-color);
	padding:0px;
}

.mp-body {
	height: 100%;
	display: flex;
	padding:0.5em;
	flex-flow: column nowrap;
}

.mp-box.centered-content .mp-body {
	height: 100%;
	display: flex;
	flex-flow: column nowrap;
	justify-content: space-evenly;
}

.mp-box.has-floating-image {
	display:block;
}

.mp-box.has-floating-image .mp-body {
	height:unset;
	display:block;
}

/* overqualified to override normal heading styles */
.mw-body .mp-box h2 {
	text-align:center;
	font-weight:bold;
	font-family:var(--wiki-heading-font-family);
    overflow: initial;
	border-bottom: 1px solid var(--wiki-content-border-color);
	font-size: 150%;
	margin: 0;
	padding: 5px 0;
	color:var(--wiki-content-heading-color);
}

#mp-box-welcome {
	text-align:center;
	position:relative;
	overflow:hidden;
}

#mp-box-welcome h2{
    font-size: 200%;
}

#mp-welcome {
	display:flex;
	flex-flow:column nowrap;
	position: relative;
	height: 100%;
	z-index: 2;
	box-sizing: border-box;
}

#mp-welcome .welcome-subtitle {
	height: 100%;
	background:color-mix(in srgb, var(--wiki-content-dynamic-color--inverted) 85%, transparent);
	padding:0.5em;
}

#mp-banner {
    position: absolute;
    width: 100%;
    height: 100%;
    filter: blur(5px);
    z-index: -1;
    background: url(/images/e/e0/MP_banner.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top center;
}

.view-dark #mp-banner {
	filter: blur(5px) brightness(50%);
}

.view-light #mp-banner {
	filter: blur(5px) contrast(50%);
}

/* [[Template:MP_link]] */
.mp-links {
  --gap:10px;
}

.mp-links > ul {
	display: flex;
	flex-flow: row wrap;
	justify-content: space-evenly;
	margin: 2px;
	gap:var(--gap);
}

.mp-links > ul > li {
	display:flex;
	flex-flow:column nowrap;
	align-items:stretch;
	text-align: center;
	box-sizing:border-box;
	flex: max(calc(50% - var(--gap)), 5em) 1 1;
	outline:1px solid var(--wiki-content-link-color);
	transition:0.1s ease-in;
}

.mp-links > ul > li:hover {
	background-color:color-mix(in srgb, var(--wiki-content-link-color) 20%, transparent);
}

.mp-links.columns-1 > ul > li {flex: max(calc(100% - var(--gap)), 5em) 1 1;}
.mp-links.columns-2 > ul > li {flex: max(calc(50% - var(--gap)), 5em) 1 1;}
.mp-links.columns-3 > ul > li {flex: max(calc((100% / 3) - var(--gap)), 5em) 1 1;}
.mp-links.columns-4 > ul > li {flex: max(calc(25% - var(--gap)), 5em) 1 1;}
.mp-links.columns-5 > ul > li {flex: max(calc(20% - var(--gap)), 5em) 1 1;}
.mp-links.columns-6 > ul > li {flex: max(calc((100% / 6) - var(--gap)), 5em) 1 1;}
.mp-links.columns-7 > ul > li {flex: max(calc((100% / 7) - var(--gap)), 5em) 1 1;}
.mp-links.columns-8 > ul > li {flex: max(calc((100% / 8) - var(--gap)), 5em) 1 1;}
.mp-links.columns-max > ul > li {flex: max(calc(0% - var(--gap)), 5em) 1 1;}

.mp-links > ul > li:hover a {
	text-decoration: underline;
}

.mp-links > ul > li > a {
	display: flex;
	align-items: center;
	justify-content: center;
	height:100%;
	flex:1 1 auto;
	box-sizing:border-box;
	padding:5px;
}

.mp-links > ul > li > a:first-child {
  height:100%;
}

.mp-links > ul > li > a:last-child:not(:first-child) {
  height:unset;
}

.mp-links.stretch,
.mp-links.stretch > ul {
	height:100%;
}

.mp-links.side-image li {
	flex-flow:row nowrap;
}

.mp-links.plain > ul > li {
  outline-color:transparent;
}

/***********************
* End main page layout *
************************/


/*********************************************************************************************************************
* Semantically-correct horizontal lists (for Module:Navbox, and they're more machine-readable than {{*}}-formatting) *
**********************************************************************************************************************/
.hlist dl,
.hlist ol,
.hlist ul {
	margin: 0;
	padding: 0;
}

/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
	/*
	 * don't trust the note that says margin doesn't work with inline
	 * removing margin: 0 makes dds have margins again
	 * We also want to reset margin-right in Minerva
	 */
	margin: 0; 
	display: inline;
}

/* Display requested top-level lists inline */
.hlist.inline,
.hlist.inline dl,
.hlist.inline ol,
.hlist.inline ul,
/* Display nested lists inline */
.hlist dl dl,
.hlist dl ol,
.hlist dl ul,
.hlist ol dl,
.hlist ol ol,
.hlist ol ul,
.hlist ul dl,
.hlist ul ol,
.hlist ul ul {
	display: inline;
}

/* Hide empty list items */
.hlist .mw-empty-li {
	display: none;
}

/* TODO: :not() can maybe be used here to remove the later rule. naive test
 * seems to work. more testing needed. like so: */
.hlist dt:not(:last-child)::after {
	content: ":\20";
}
.hlist dd:not(:last-child)::after,
.hlist li:not(:last-child)::after {
	/* "space, Middle Dot, space" 
	We use unicode numbers instead of the raw characters due to a Firefox encoding bug on unicode characters.
	The space is also encoded because raw spaces combined with a unicode number strips the spaces under some conditions such as single-line lists */
	/* content: "\20\00B7\20"; font-weight: bold; */
    /* "space   •   space" 
       There may (and likely) be an extra whitespace between <li>s, 
       therefore we have to use a space character as last character of this sequence. 
       By this way, the last space and the next whitespce will collapse as a single space,
       to make the whitespace on both sides of the middle dot the same width.
    */
	content: "\20\A0\2022\A0\20"; 
	font-weight: inherit;
}

/* Add parentheses around nested lists */
.hlist dd ol::before,
.hlist dd ul::before,
.hlist dd dl::before,
.hlist dt ol::before,
.hlist dt ul::before,
.hlist dt dl::before,
.hlist li ol::before,
.hlist li ul::before,
.hlist li dl::before {
	content: "\20(";
	font-weight: inherit;
}

.hlist dd ol::after,
.hlist dd ul::after,
.hlist dd dl::after,
.hlist dt ol::after,
.hlist dt ul::after,
.hlist dt dl::after,
.hlist li ol::after,
.hlist li ul::after,
.hlist li dl::after {
	content: ")";
	font-weight: inherit;
}

/* Put ordinals in front of ordered list items */
.hlist ol {
	counter-reset: listitem;
}

.hlist ol > li {
	counter-increment: listitem;
}

.hlist ol > li::before {
	content: " " counter(listitem) ".\20";
}

/* Progressive enhancement:
 * try to make the dot always follow the list item in same line
 */
.hlist :is(li,dt,dd):not(:has(:is(li,dt,dd))){
	display: inline-block;
}

/********************************************
* End semantically-correct horizontal lists *
*********************************************/

/*** Miscellaneous ***/
.responsive-image {
	max-width:100%;
	height:auto;
}

.view-dark .invert-on-dark,
.view-light .invert-on-light {
    filter:invert(100%);
}

.pixelated {
  image-rendering:pixelated;
}

@media screen and (min-width:720px) {
	.mobileonly {
		display:none;
	}
}
@media screen and (max-width:720px) {
	.nomobile {
		display:none;
	}
}

/*** Utility classes for standard MW galleries ***/
/* it's important that spaced comes before centered in the sheet */
.gallery.gallery.gallery.spaced { /* this selector looks ridiculous but is actually part of stock Vector and therefore a necessary override */
    display:flex;
    flex-flow:row wrap;
    justify-content:space-evenly;
    margin-left:unset;
}

.gallery.centered {
    text-align:center;
}

/**************************
* Start Modular Templates *
**************************/

/********* [[Template:Ambox]] *********/
.ambox {
    --ambox-color:var(--wiki-accent-color);

	border: 1px solid var(--wiki-content-border-color);
	border-left: 10px solid var(--ambox-color);
	border-radius: 2px;
	display: flex;
	align-items: center;
	gap: .6em;
	margin: 1em 0;
	padding: 3px .6em;
	background-color: var(--wiki-content-background-color--secondary);
	box-shadow: 2px 2px 5px 0px #0002;
}

@media (min-width: 720px) {
	.ambox {
		margin-inline: 10%;
	}
}

.ambox.tiny {
	padding: .04rem .5em;
	margin-inline: 0;
    width: fit-content;
}

.ambox + .ambox {
	margin-top: -.6em;
}

.ambox-content {
	flex: 1;
}

.ambox-content p {
	margin: .15em 0;
}

.ambox-title {
	font-weight: bold;
}

/********* [[Template:Hatnote]] *********/
.hatnote {
    padding: 1px 0 1px 1.6em;
    margin-bottom: 0.5em;
    font-style: italic;
    border-top: 1px solid var(--wiki-content-border-color--secondary);
    border-bottom: 1px solid var(--wiki-content-border-color--secondary);
}

.hatnote.icon {
	padding-left: 0;	
}

/********* [[Template:Spoiler]] *********/
.spoiler-content {
  background-color: color-mix(in srgb, var(--wiki-content-dynamic-color) 50%, transparent);
  transition: all 0.3s;
  cursor: pointer;
  overflow:auto;
}

@supports not (color:color-mix(in srgb, #000, transparent)) {
	.spoiler-content {
		background-color: var(--wiki-content-dynamic-color--secondary);
	}	
}

.spoiler-content > * {
  pointer-events:none;
  opacity: 0;
  transition: all 0.3s;
}

.spoiler-content.show {
  background-color: transparent;
}

.spoiler-content.show > * {
  pointer-events:unset;
  opacity: 1;
}

/********* [[Template:Link icon]] *********/
.link-icon {
	--link-icon-line-height: 1.5em;
	--link-icon-size: 1.5em;	
	display: inline-flex; 
	align-items: center;
    height: var(--link-icon-line-height);
    vertical-align: bottom;
}

.link-icon .regular {
    align-self: center;
}

.link-icon .regular a {
	display: flex;
}

.link-icon .regular img {
	height: var(--link-icon-size);
	max-width: var(--link-icon-size);
}

.link-icon .fallback {
	outline: 1px solid var(--wiki-content-text-color);
	border-radius: 50%;
	text-align: center;
	width: var(--link-icon-size);
	line-height: var(--link-icon-size);
}

.link-icon.notext .fallback {
	display: inline-block;
}

.link-icon.notext {
    display: inline;
}

/********* [[Template:Quote]] *********/
.quote {
    background: var(--wiki-content-background-color--secondary);
    border-radius: 5px;
    border: 2px solid var(--wiki-content-border-color);
    margin: .5em 0;
    padding: .5em;
	overflow-y: hidden;
}

.quote .block {
	display: block;
}

.quote .title {
	font-size: large;
    font-weight: bold;
}

.quote .content {
	font-style: italic;
}

.quote .author {
	font-weight: bold;
	text-align: end;
}

.quote .marks-wrapper {
	display: flex;
	gap: 5px;
}

.quote .marks-wrapper::before,
.quote .marks-wrapper::after {
	font-size: 100px;
    line-height: 0px;
}

.quote .marks-wrapper::before {
	content: "\201C";
	margin-top: 40px;
}

.quote .marks-wrapper::after {
	content: "\201D";
	align-self: end;
	margin-bottom: -10px;
}

.client-js .mw-charinsert-item {
 display:none;
}

/************************
* End Modular Templates *
*************************/

/*****************************
* Used by [[Template:Color]] *
******************************/
.color__splotch {
  display:inline-block;
  height:1em;
  width:1em;
  box-sizing:border-box;
  vertical-align:text-top;
  border-radius:50%;
  border:1px solid var(--wiki-content-text-color); 
}
/*********************
* End Template:Color *
**********************/