MediaWiki:Common.css

From Plants vs. Zombies Wiki
Jump to navigation Jump to search

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

  • Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
  • Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
  • Opera users have to clear their caches through Tools→Preferences
  • Konqueror and Safari users can just click the Reload button.
  • Chrome: press Ctrl+F5 or Shift+F5

If using another browser, look up instructions on how to clear your cache in your preferred browser.

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

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bowlby+One&display=swap'); /* closest free alternative to Burbank I could find */
@import url('https://fonts.googleapis.com/css2?family=Shantell+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap'); /* closest free alternative to Brianna Tod I could find */
@import url('https://fonts.googleapis.com/css2?family=Averia+Serif+Libre:ital,wght@0,400;0,700;1,400;1,700&display=swap'); /* closest free alternative to Dwarven Stonecraft I could find */

/****************************
* Simple dark api.php pages *
*****************************/
@media (prefers-color-scheme: dark) {
  body {
    background-color:#20211f;
    border-color: #7b7261;
    color: #f6ecdb;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: rgb(234, 224, 207);
    border-color: rgb(83, 84, 81);
  }
  
  .mw-highlight .s2 {
    color: rgb(206, 99, 91);
  }
  
  a {
    color: rgb(133, 180, 221);
  }
  
  a:visited {
    color: rgb(141, 127, 218);
  }
  
  pre, code, .mw-code {
    background-color: rgb(34, 35, 33);
    color: rgb(234, 224, 207);
    border-color: rgb(63, 64, 62);
  }
}
/***************
* End dark API *
****************/

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

.theme-dark .invert-on-dark,
.theme-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;
	}
}
/***************************
* End misc utility classes *
****************************/

/******************************
* Main page layout            *
* [[Plants vs. Zombies Wiki]] *
*******************************/
#mp-welcome-box {grid-area:welcome;}
#mp-gallery-box {grid-area:gallery;}
#mp-games-box {grid-area:games;}
#mp-explore-box {grid-area:explore;}
#mp-new-user-box {grid-area:new-user;}
#mp-featured-article-box {grid-area:featured-article;}
#mp-birthdayz-box {grid-area:birthdayz;}
#mp-discord-box {grid-area:discord;}
#mp-news-box {grid-area:news;}
#mp-to-do-box {grid-area:to-do;}
#mp-affiliates-box {grid-area:affiliates;}

#mp-welcome-box,
#mp-gallery-box,
#mp-games-box,
#mp-explore-box,
#mp-discord-box,
#mp-birthdayz-box,
#mp-affiliates-box {
	text-align:center;
}

#mp-container {
	display:grid;
	grid-template-areas:
		"welcome"
		"gallery"
		"featured-article"
		"games"
		"explore"
		"discord"
		"birthdayz"
		"news"
		"to-do"
		"new-user"
		"affiliates";
	grid-template-columns:100%;
	gap:10px;
}

@media screen and (min-width:990px) {
	#mp-container {
		grid-template-areas:
			"welcome welcome"
			"gallery discord"
			"featured-article birthdayz"
			"games games"
			"news news"
			"to-do to-do"
			"explore explore"
			"new-user affiliates";
		grid-template-columns:2fr 1fr;
	}
}

@media screen and (min-width:1350px) {
	#mp-container {
		grid-template-areas:
			"welcome welcome welcome"
			"gallery gallery discord"
			"featured-article featured-article discord"
			"games games birthdayz"
			"games games news"
			"explore explore news"
			"explore explore to-do"
			"new-user new-user affiliates";
		grid-template-columns:3fr 3fr 2fr;
  }
}

.mp-box {
	display:flex;
	flex-flow:column nowrap;
	width: calc(100% - 2px);
	box-sizing: border-box;
	background:rgba(var(--wiki-content-background-color--secondary--rgb), 0.25);
	border:1px solid var(--wiki-content-border-color);
	padding:5px;
}

.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;
}

.mp-heading,
.mp-subheading,
.mp-box .welcome-message {
	text-align:center;
	font-family:var(--wiki-heading-font-family);
	background-color:var(--wiki-accent-color);
	color:var(--wiki-accent-label-color);
}

.mp-heading {
	font-size: 150%;
	margin: 0 0 10px 0;
	padding: 0 0 5px 0;
}

.mp-subheading {
	width:clamp(min(20em, 100%),25%,100%);
	margin:0px auto;
	border-radius:20px;
}

.mp-box#mp-welcome-box {
  text-align:center;
	background-image:linear-gradient(to top, var(--wiki-accent-color--hover) -50%, var(--wiki-accent-color) 70%);
	border-radius:20px;
	border:6px solid rgba(var(--wiki-accent-color--hover--rgb),0.4);
	box-shadow:0 0 35px black inset, 0 0 5px rgba(var(--wiki-accent-color--hover--rgb),0.4);
}

.mp-box#mp-welcome-box a {
	color:rgba(var(--wiki-accent-label-color--rgb), 0.7);
	text-decoration:underline;
}

.mp-box .welcome-message {
  font-size: 300%;
  margin: 0 0 10px;
  padding: 0 0 5px;
	overflow:visible;
	border:none;
	background:none;
	color:var(--wiki-accent-label-color);
}

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

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

.mp-links > ul > li:hover {
	background-color:rgba(var(--wiki-content-link-color--rgb), 0.2);
}

.mp-links.columns-1 > ul > li {flex: max(calc((100% / 1) - 5px), 5em) 1 1;}
.mp-links.columns-2 > ul > li {flex: max(calc((100% / 2) - 5px), 5em) 1 1;}
.mp-links.columns-3 > ul > li {flex: max(calc((100% / 3) - 5px), 5em) 1 1;}
.mp-links.columns-4 > ul > li {flex: max(calc((100% / 4) - 5px), 5em) 1 1;}
.mp-links.columns-5 > ul > li {flex: max(calc((100% / 5) - 5px), 5em) 1 1;}
.mp-links.columns-6 > ul > li {flex: max(calc((100% / 6) - 5px), 5em) 1 1;}
.mp-links.columns-7 > ul > li {flex: max(calc((100% / 7) - 5px), 5em) 1 1;}
.mp-links.columns-8 > ul > li {flex: max(calc((100% / 8) - 5px), 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%;
  width:100%;
	flex:1 1 auto;
	box-sizing:border-box;
	padding:5px;
}

.mp-links.plain > ul {
	gap:0px;
}

.mp-links.plain > ul > li {
	border:none;
	background:none;
	flex-grow:0;
}

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

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

.mp-gallery {
  display:flex;
  flex-flow:row wrap;
  align-items:center;
  justify-content:space-evenly;
  gap:10px;
  margin:10px;
}

.mp-gallery__item {
  flex:clamp(250px, calc(25% - 10px), 500px) 0 1;
  height:200px;
  display:flex;
  align-items:flex-start;
  justify-content: center;
  position:relative;
  overflow:hidden;
  background-color:rgba(var(--wiki-content-background-color--secondary--rgb), 0.9);
  border:1px solid var(--wiki-content-border-color);
  box-sizing:border-box;
}

.mp-gallery__item img {
  width:100%;
  height:auto;
}

.mp-gallery__caption {
  position:absolute;
  bottom:0;
  width:100%;
  background-color:rgba(var(--wiki-content-background-color--rgb), 0.9);
  box-sizing:border-box;
  padding:10px;
}

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

/**************************
* [[Template:Doc]] styles *
***************************/
.documentation {
    margin: 0em auto 1em;
    background-color: rgba(var(--wiki-content-dynamic-color--inverted--rgb), 0.1);
    border: 2px solid var(--wiki-content-border-color);
    border-radius: 1em;
    padding: 1em;
}

.documentation-header {
    padding-bottom: 3px;
    border-bottom: 1px solid var(--wiki-content-border-color);
    margin-bottom: 1ex;
}
/**************************
* End Template:Doc styles *
***************************/

/***********************
* [[Template:License]] *
************************/
.license {
  display:flex;
  flex-flow:row nowrap;
  background-color:var(--wiki-content-background-color--secondary);
  border:1px solid var(--wiki-content-border-color);
  padding:0.1em;
  margin:0.5em 0 0.5em 0;
  align-items:center;
  gap:5px;
}

.copyright-logo {
  filter:var(--wiki-icon-general-filter);
}
/***********************
* End Template:License *
************************/

/************
* Infoboxes *
*************/

/* portable infoboxes */
:root {
	--pi-background: var(--wiki-content-background-color);
	--pi-secondary-background: var(--wiki-accent-color);
	--pi-secondary-background--rgb: var(--wiki-accent-color--rgb);
	--pi-secondary-background-label: var(--wiki-accent-label-color);
	--pi-border-color: rgba(var(--pi-secondary-background--rgb),0.5);
}

.portable-infobox {
	border:4px solid var(--pi-border-color);
}

.portable-infobox .pi-title,
.portable-infobox .pi-header {
	text-align:center;
	font-size:1.5em;
	background:rgba(var(--pi-secondary-background--rgb), 0.75);
	color:var(--pi-secondary-background-label);
}

.portable-infobox .pi-data {
	background:rgba(var(--pi-secondary-background--rgb), 0.18);
}

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

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

.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-theme-baby .pi-image-thumbnail {
	width:100px;
}

/* 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 infoboxes *
*****************/

/*****************************
* Used by [[Template:Ambox]] *
******************************/
.ambox {
    background-color: var(--wiki-content-background-color--secondary);
    border: 1px solid var(--wiki-content-border-color);
    border-collapse: collapse;
    font-size: 95%;
    margin: 0 auto 2px auto;
    width: 80%;
}

.ambox-gray {
    border-left-color: #383838;
}

.ambox + .ambox {
    margin-top: -2px;
}

.ambox-text {
    padding: 0.25em 0.5em;
}

.ambox-image {
    padding: 2px 0px 2px 0.5em;
    text-align: center;
    width: 60px;
}

.ambox-tiny .ambox-image {
    padding: 2px 0.5em;
    text-align: left;
    width: auto;
}

/* Ambox colors */
.ambox-blue {
    border-left: 10px solid #1e90ff;
}

.ambox-red {
    border-left: 10px solid #b22222;
}

.ambox-orange {
    border-left: 10px solid #f28500;
}

.ambox-yellow {
    border-left: 10px solid #f4c430;
}

.ambox-purple {
    border-left: 10px solid #9932cc;
}

.ambox-gray {
    border-left: 10px solid #bba;
}

.ambox-green {
    border-left: 10px solid #228b22;
}
/*********************
* End Template:Ambox *
**********************/

/********************************************
* Utility classes for standard MW galleries *
*********************************************/
/* it's important that spaced comes before centered in the sheet */
.gallery.spaced {
  display:flex;
  flex-flow:row wrap;
  justify-content:space-evenly;
  margin-left:unset;
}

.gallery.centered {
  text-align:center;
  margin-left:auto;
  margin-right:auto;
}

/**********************
* End gallery classes *
***********************/

/* Lime green tables */
.theme-light .limegreentable {
    border: 1px solid black;
}
.theme-light .limegreentable td {
    border: 1px solid transparent; background: rgb(230,255,230); font-size:89%;
}
.theme-light .limegreentable th {
    background:limegreen; color:black;
}
.theme-dark .limegreentable {
    border: 1px solid white;
}
.theme-dark .limegreentable td {
    border: 1px solid transparent; background: rgb(0,25,0); font-size:89%;
}
.theme-dark .limegreentable th {
    background:green; color:white;
}