MediaWiki:Common.css

From Secrets of Grindea Wiki
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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* Reset CSS (kinda?) */

table {
	display: table;
	max-width: 100%;
	white-space: normal;
}

/* SoG Theme Variables */
:root {
	--sog-page-color: #8ce5e8;
	--sog-blog-color: #e3deb6;
	--sog-content-color: #b8a582;
	/* --sog-accent-color: #8a6a4c; */
	--sog-accent-color: #cda67c;
	--sog-clouds-background: url(https://secretsofgrindea.wiki.gg/images/5/5f/WikiBackground-Clouds.png);
	
	--theme-page-background-color: var(--sog-content-color,);
	--theme-accent-color: var(--sog-accent-color,);
}

/* Nearest Neighbour CSS class for sprites */
.game-sprite {
  image-rendering: pixelated;
  image-rendering: optimizeSpeed;
}

/* Site Theme */
.vector-menu-tabs-legacy .selected {
  background-image: linear-gradient(to bottom, var(--sog-accent-color,) 0, var(--sog-blog-color,) 50%);
}

.vector-menu-tabs-legacy li {
  background-image: linear-gradient(to bottom, var(--sog-page-color,) 0, var(--sog-blog-color,) 50%);
}

.mw-body {
  background-color: var(--sog-blog-color,);
}

body {
  background-image: var(--sog-clouds-background,);
}

#mw-panel {
  padding: 8px;
}
#p-navigation {
  border: 1px solid var(--sog-accent-color);
  background-color: var(--sog-blog-color);
}
#mw-panel .portal {
  margin-top: 20px;
  border: 1px solid var(--sog-accent-color);
  background-color: var(--sog-blog-color);
}

.toc {
  background-color: var(--sog-article-color,)
}

div.thumbinner {
  background: none;
}

/********************/
/* Wiki grid layout */
/********************/

/* Adapted from Cuphead wiki | CC-BY-SA 3.0 | https://cuphead.wiki.gg/wiki/MediaWiki:Common.css */

:root {
    --wiki-logo-width: 420px;
    --wiki-logo-height: 102px;
    --wiki-topbar-height: 35px;
    --vector-tab-height: 40px;  /* Height of a navigation tab */
    --vector-tab-margin: 0px;
    
    --layout-sidespace: 25px;
    --layout-sidebar-width: 180px;
    --layout-content-width: auto;
    --layout-height-offset: calc(var(--wiki-topbar-height) + 25px);
    --layout-column-gap: 20px;
    --layout-sidespace-responsive: minmax(0px, var(--layout-sidespace));
}

body {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: [body-left] var(--layout-sidespace-responsive) [sidebar-left] var(--layout-sidebar-width) [sidebar-right content-left] var(--layout-content-width) [content-right] var(--layout-sidespace-responsive) [body-right];
    grid-template-rows: [body-start] var(--layout-height-offset) [logo-start] var(--wiki-logo-height) [logo-end nav-start] calc(var(--vector-tab-height) * 2) [nav-end content-start] auto [content-end footer-start] auto [footer-end] auto [page-end] var(--layout-height-offset) [body-end];
    column-gap: var(--layout-column-gap);
}

/* Set the logo in the middle of the page */
/* Also resize logo if viewed on really small devices */
#p-logo {
  position:absolute;
  left:calc(50vw - min(100vw, var(--wiki-logo-width))/2);
  top:var(--layout-height-offset);
  width:var(--wiki-logo-width);
  height:var(--wiki-logo-height)
}
#p-logo a {
  width: min(100vw, var(--wiki-logo-width));
  height:var(--wiki-logo-height);
  background-size: contain;
}

body > .content-wrapper,
#mw-navigation {
    display: contents;
}

#mw-page-base {
    grid-column: content-left/content-right;
    grid-row: nav-start/footer-end;
    height: 100%;
    background: unset;
}

#mw-head-base {
    grid-column: content-left/content-right;
    grid-row: nav-start/nav-end;
}

#mw-head {
    grid-column: content-left/content-right;
    grid-row: nav-start/nav-end;
    position: relative;
    top: 0;
    left: 0;
    width: unset;
    margin: 0 var(--vector-tab-margin);
    max-width: unset;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    padding: 0;
    z-index: 10;
}

#mw-head #left-navigation,
#mw-head #right-navigation {
    box-sizing: border-box;
    display: flex;
    flex: auto;
    align-items: normal;
    margin-left: 0px; /* Make it be aligned with left edge of content */
}

#mw-head #left-navigation {
    justify-content: flex-start;
}

#mw-head #right-navigation {
    justify-content: flex-end;
}

#mw-panel {
    grid-column: sidebar-left/sidebar-right;
    grid-row: nav-start/page-end;
    float: none;
    width: unset;
    position: unset;
    padding-left: 0;
}

#mw-panel .portal {
    top: 0;
}

div#content {
    grid-column: content-left/content-right;
    grid-row: nav-end/content-end;
    margin: 0;
    top: 0;
}

.content-body > main {
    display: grid;
    grid-template-columns: [content-left heading-left] minmax(0,1fr) [heading-right indicator-left] minmax(0,auto) [indicator-right interwikis-left] minmax(0,auto) [interwikis-right content-right];
    grid-template-rows: [sitenotice] auto [before-heading] auto [heading-start] auto [heading-end content-start] auto [content-end];
    row-gap: 0pxe
    margin-bottom: 10px; /* Add a bit of space between content body and bottom ad */
}

#siteNotice {
    grid-row: sitenotice;
    grid-column: content-left/content-right;
}

.mw-body .mw-indicators {
    grid-column: indicator-left/indicator-right;
    grid-row: heading-start/heading-end;
    display: flex;
    align-items: center;
    gap: 4px;
}

#firstHeading {
    grid-column: heading-left/heading-right;
    grid-row: heading-start/heading-end;
}

#bodyContent {
    grid-column: content-left/content-right;
    grid-row: content-start/content-end;
    display: flex;
    flex-direction: column;
}

#contentSub,
#contentSub2 {
    margin: 0;
}

#footer {
    grid-column: content-left/content-right;
    grid-row: footer-start/footer-end;
    width: calc(100% - 40px);
    max-width: unset;
    top: 0;
    left: 0;
    padding: 10px 20px;
    margin-left: 0;
    margin-top: 1.5em;
}

#footer {
  margin: 1.5em 0;
  border:1px solid var(--sog-accent-color);
  background-color:var(--sog-blog-color)
}

#wikigg-footer {
    grid-column: body-left/body-right;
    grid-row: page-end/body-end;
    top: 0;
}

#mw-panel {
    grid-column: sidebar-left/sidebar-right;
    grid-row: content-start/content-end;
}

/***************************/
/* End of Wiki grid layout */
/***************************/

/*****************/
/* Mobile tweaks */
/*****************/

/* Adjust search bar to be on top of the page on small devices */
@media only screen and (max-width: 600px) {
  #p-search {
    box-sizing: border-box;
    position: absolute;
    top: 0px;
    left: 0px;
    width: calc(100% - 20px);
    margin: auto 10px;
  }

  #simpleSearch {
    box-sizing: border-box;
    width: 100%;
    min-width: 100%;
  }
}

#mainpage-sog-logo img {
  max-width: 100%;
  height: auto;
}

@media only screen and (max-width: 1200px) {
  /* TODO Display panel in a different form instead of hiding it */
  #mw-panel {
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
  }
  
  #p-logo {
    visibility: visible;
  }
  
  body {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: [body-left sidebar-left] var(--layout-sidespace-responsive) [sidebar-right content-left] minmax(90%, var(--layout-content-width)) [content-right] var(--layout-sidespace-responsive) [body-right];
    grid-template-rows: [body-start] var(--layout-height-offset) [logo-start] var(--wiki-logo-height) [logo-end nav-start] calc(var(--vector-tab-height) * 2) [nav-end content-start] auto [content-end footer-start] auto [footer-end] auto [page-end] var(--layout-height-offset) [body-end];
    column-gap: calc(var(--layout-column-gap) * 0.2);
  }
} 


@media only screen and (max-width: 768px) {
  table {
    display: block;
    overflow: scroll;
  }
}

/************************/
/* End of mobile tweaks */
/************************/


/* Portable Infobox CSS */

.portable-infobox {
  background-color: var(--sog-blog-color,);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.pi-title {
  background-color: var(--sog-accent-color,);
  text-align: center;
  font-weight: bold;
}

.pi-header {
  background-color: var(--sog-accent-color,) !important;
  text-align: center;
}

.pi-section-navigation {
 justify-content: center;
 font-weight: bold;
}

.pi-section-navigation .pi-section-tab {
  border: 0;
}

.pi-section-navigation .pi-section-active {
  background-color: inherit !important;
  border-bottom: 2px solid var(--sog-accent-color,);
}

.portable-infobox.pi-type-itembox .pi-image-thumbnail {
    image-rendering: pixelated; /* Nearest Neighbour */
    image-rendering: optimizeSpeed;

    min-width: 60px;
    min-height: 60px;
    height: auto;
    width: auto;
    margin: 1.7em 0 1.2em 0;
}

/* reduce the size (allows them to be used in Template:Featured Item, for example) */
.portable-infobox.pi-theme-smallstuff {
   margin: 5px auto;
   width: 90%;
   max-width: 270px;
   float: none;
}

.portable-infobox.pi-theme-smallstuff-inline {
   margin: 5px auto;

   width: 90%;
   max-width: 270px;
   float: none;

   display: inline-block;
}


/* Old CSS */
/* CSS Class used for presenting in-game information for skills and spells */

.skillcard {
    display: grid;
    grid-template-columns: 19% 29% 7% 20% 20% 0;
    grid-template-rows: 62px 82px auto auto auto;
    grid-template-areas:
      "icon title . detail-one detail-two ."
      "icon data . detail-three detail-four ."
      "base base-text base-text base-text base-text base-text"
      "bronze bronze-text bronze-text bronze-text bronze-text bronze-text"
      "silver silver-text silver-text silver-text silver-text silver-text"
      "gold gold-text gold-text gold-text gold-text gold-text";
    border: 1px solid black;
    border-radius: 12px;
    grid-gap: 0 1%;
    justify-items: center;
    align-items: center;
}

.skill-autoresimg img {
    max-width: 100%;
    height: auto;
}

/* overview-map-image is the image displayed in Template:Map */

.overview-map-image {
    border: none;
}

/* Pixelart class for containers */

.pixelart img {
    image-rendering: pixelated;
    image-rendering: optimizeSpeed;
}

/* Navbox CSS */

.SoG-navbox-container {
    background-color: var(--theme-page-background-color,);
    border: 1px solid var(--theme-border-color,);
    color: var(--theme-body-text-color,);
	line-height: 16px; 
	border-radius: 15px; 
	padding: 0.25em 0.25em 1em 0.25em; 
	width: 90%; 
	margin: 1em auto 0 auto;
}

.SoG-navbox-title {
	text-align: center;
	vertical-align: middle;
	padding: 0.5em 0 0.5em 0;
	font-weight: bold;
	font-size: 1.5em;
}

table.SoG-navbox {
    width: calc(100% - 2px);
    margin: 0 auto 0 auto;
    padding: 2px;
    white-space: normal; /* Workaround for overflow issue */
}

table.SoG-navbox th {
    white-space: nowrap;
    text-align: center;
    padding: 8px;
}

table.SoG-navbox td {
    line-height: 2.3;
    text-align: center;
}

/* SoG Table CSS */

table.SoG-table {
    border: 1px solid var(--theme-border-color,);
    border-collapse: collapse;
    /* background-color: var(--theme-page-background-color,); */
    color: var(--theme-body-text-color,);
    min-width: 400px;
}

table.SoG-table th, td {
    padding: 8px;
}

table.SoG-table tr:nth-child(1) {
    text-align: left;
    font-size: 1.2em;
}

table.SoG-table tr:nth-child(2) {
    text-align: center;
}

table.SoG-table ul {
    margin-left: 1.0em;
}

/* Recipe Table CSS */

table.recipe-table th,td {
    padding: 10px;
    padding-left: 20px;
}

table.recipe-table tbody tr:nth-child(1) {
	background-color: var(--theme-accent-color,);
    text-align: left;
    font-size: 16px;
}

table.recipe-table tbody tr:nth-child(2) {
	background-color: var(--theme-accent-color,);
    text-align: center;
    font-size: 14px;
}

/* Stats Table */

table.stats-table tbody tr:nth-child(1) {
	background-color: var(--theme-accent-color,);
}

table.stats-table tbody tr:nth-child(2) {
	background-color: var(--theme-accent-color,);
}

table.stats-table td:nth-child(1) {
    text-align: center;
}

table.stats-table td:nth-child(2) {
    text-align: center;
}

table.stats-table td:nth-child(3) {
    text-align: left;
    font-size: 0.9em;
}

table.stats-table td:nth-child(4) {
    text-align: left;
    font-size: 0.9em;
    min-width: 100px;
    padding-left: 20px;
}

table.stats-table td:nth-child(5) {
    text-align: left;
    font-size: 0.9em;
    padding-left: 12px;
}

/* Talents Table */

table.talents-table tbody tr:nth-child(1) {
	background-color: var(--theme-accent-color,);
}

table.talents-table tbody tr:nth-child(2) {
	background-color: var(--theme-accent-color,);
}

table.talents-table td:nth-child(1) {
    text-align: center;
    padding: 8px;
}

table.talents-table td:nth-child(2) {
    text-align: center;
}

table.talents-table td:nth-child(3) {
    text-align: center;
}

table.talents-table td:nth-child(4) {
    text-align: left;
    font-size: 0.9em;
    min-width: 100px;
    padding-left: 20px;
}

/* Style Table */

table.style-table tbody tr:nth-child(1) {
	background-color: var(--theme-accent-color,);
}

table.style-table tbody tr:nth-child(2) {
	background-color: var(--theme-accent-color,);
}

table.style-table td:nth-child(1) {
    text-align: center;
}

table.style-table td:nth-child(2) {
    text-align: center;
}

table.style-table td:nth-child(3) {
    text-align: left;
    font-size: 0.9em;
}

table.style-table td:nth-child(4) {
    text-align: left;
    font-size: 0.9em;
    padding-left: 12px;
}

/* Pin Table */

table.pin-table thead tr:nth-child(1) {
	background-color: var(--theme-accent-color,);
}

table.pin-table thead tr:nth-child(2) {
	background-color: var(--theme-accent-color,);
}

table.pin-table td:nth-child(1) {
    text-align: center;
}

table.pin-table td:nth-child(2) {
    text-align: center;
}

table.pin-table td:nth-child(3) {
    text-align: left;
    font-size: 0.9em;
}

table.pin-table td:nth-child(4) {
    text-align: left;
    font-size: 0.9em;
    padding-left: 12px;
}

/* Main Page Table */

table.mp-table {
	width: 100%;
}

table.mp-table tbody tr:nth-child(1) {
	background-color: var(--theme-accent-color,);
}

/* Main Page CSS */

.mp-title {
	text-align: center;
}

.mp-sidebox {
	width: 90%;
	padding: 5px;
	background-color: var(--theme-accent-color,);
	border: var(--theme-border-color,);
	display: flex;
	flex-direction: column;
	align-items: center;
}