Jump to content

MediaWiki:Common.css: Difference between revisions

From WikiPETia.info
Navbox beautification
No edit summary
 
(49 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */


.pp-block-title {
  border:1px solid var(--border-color-subtle);
  text-align: center;
  background-color: var(--background-color-neutral);
  padding-bottom: 0.5rem !important;
}


/* Adjust color scheme */
/* Old infobox template */
body, body.ns-0, #article { background-color: #fafafa; }
.infobox { border: 1px solid var(--border-color-subtle); border-spacing: 3px; background-color: background-color: var(--background-color-neutral); black; margin: 0.5em 0 0.5em 1em; padding: 0.2em; float: right; clear: right; font-size: 88%; line-height: 1.5em; }
#sitetitle, #toplinks { text-transform: none; background-color: #0470b1; } /* was #6688aa; */
.infobox caption { font-size: 125%; font-weight: bold; padding: 0.2em; background-color: background-color: var(--background-color-neutral); }
.mediawiki #content { min-height: 620px; background-color: #e1ebf1; }
.infobox td, .infobox th { vertical-align: top; text-align: left; }
.infobox.bordered { border-collapse: collapse; }
.infobox.bordered td, .infobox.bordered th { border: 1px solid var(--border-color-subtle); }
.infobox.bordered .borderless td, .infobox.bordered .borderless th { border: 0; }


/* Bring links in line with rest of page */
/* Old navbox template */
a, #quickbar a, #footer a, #linkcollection a { text-decoration: none; }
.navbox { width: 100%; margin-top: 1.5rem; padding: 0.125rem; border: 1px solid var(--border-color-subtle); }
a:hover, #quickbar a:hover, #footer a:hover, #linkcollection a:hover { text-decoration: underline; }
.navbox td { padding: 0; }
.navbox-inner { width: 100%; }
.navbox-title { background-color: var(--background-color-neutral); }
.navbox-title .plainlinks { display: none; }
.navbox-group { background-color: var(--background-color-neutral); white-space: nowrap; text-align: right; padding-left: 5px; padding-right: 5px; }
.navbox-list { border-left-width: 0px !important; }
td.navbox-list ul { list-style-type: none; margin: 4px 0px 0px 10px; }
td.navbox-list li { display: inline; padding-left: 4px; white-space: nowrap; }
td.navbox-list li:before { content: "•"; padding-right: 4px; }


/* Remove unneeded elements, set article box */
/* Make galleries workable */
#article { padding: 15px 25px; margin-left: 120px; }
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper, ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper, ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper {
.tagline, div.mw-createacct-benefits-list div.icon-contributors, #linkcollection, div#p-search h3 { display: none; }
  max-height: 100%;
  top: 0;
  padding:0;
}
div.gallerytext { height: 120px; line-height: 120px; padding: 0; }
div.gallerytextwrapper { width: 120px !important; }
div.gallerytext a { line-height: normal;  display: inline-block; vertical-align: middle; height: 120px;}
 
 
/* Category Tiles Grid */
.category-tiles-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 auto;
  max-width: 1200px;
}


/* Format searchbar */
.category-tile {
form#searchform-sidebar input.mw-searchInput { width: 97px; margin-top: 2px; }
  position: relative;
form#searchform-sidebar input.searchButton1 { width: 37px; margin-left: -1px; }
  background: var(--background-color-neutral-subtle);
form#searchform-sidebar input.searchButton2 { width: 68px; }
  border-radius: 8px;
  border: 1px solid var(--border-color-subtle);
  overflow: hidden;
}


/* Format quickbar */
.category-tile:hover {
#quickbar { left: 7px; width: 105px; top: 55px; }
  background: var(--background-color-neutral);
#quickbar h3 { color: #000000; }
  border: 1px solid var(--border-color-base);
#quickbar a { color: #223366; }
}
#quickbar .portlet ul, #quickbar .portlet li { line-height: 1.5em; }


/* Simplify fonts */
.category-tile a {
#article table.small, #article table.small td, #article table.small th, #article table.small p { font-size: 75%; }
  width: 100%;
body, #sitetitle, #toplinks, #quickbar, #footer, #article, #article td, #article th, #article p { font-family: Arial,Helvetica,sans-serif; }
  height: 100%;
p, pre, .mw-code, td, th, li, dd, dt { line-height: 15pt; }
  display: inline-block;
}


/* Harmonize headings */
.tile-image {
h1#firstHeading { background-color: #e8e8e8; border: 1px solid #d0d0d0; margin-bottom: 10px; margin-top: 0px; text-align: center; font-size: 1.5em; padding: 4px 10px 2px; }
  text-align: center;
h1 { font-size: 1.7em; color: #000000; }
}
h2 { font-size: 1.5em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }
h2, h3, h4, h5, h6 { margin-bottom: 1em; color: #000000;}


/* Adjust content to make it look better */
.tile-title {  
.toc { margin: 30px 0 20px; }
  text-align: center;
ul.float-left { text-align: left; }
  font-weight: bold;
ul.float-right { text-align: right; }
  font-size: 1.2em;
}


/* Make galleries workable */
.tile-title a,
div.center div.floatnone a.image img { max-width: 100%; height: auto; }
.tile-title a:hover {
div.gallerytext { height: 110px; line-height: 110px; }
  padding: 0.75rem 0;
#article div.gallerytext p { vertical-align: middle; display: inline-block; line-height: normal; margin-top: 0px; }
  color: var(--color-base);
#article div.gallerytext a { color: #223366; }
  text-decoration: none;
#article div.gallerytext a:hover { text-decoration: none; color: #e3001b; }
}
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper, ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper, ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper { height: 90%; }
 
/* Responsive adjustments */
@media (max-width: 768px) {
  .category-tiles-container {
    grid-template-columns: repeat(2, 1fr);
  }
 
  .tile-image {
    height: 140px;
  }
 
  .tile-image img {
    height: 140px;
    width: 140px;
  }
}


/* Infobox template */
@media (max-width: 300px) {
.infobox { border: 1px solid #aaa; border-spacing: 3px; background-color: #f9f9f9;
  .category-tiles-container {
    color: black; margin: 0.5em 0 0.5em 1em; padding: 0.2em; float: right; clear: right; font-size: 88%; line-height: 1.5em; }
    grid-template-columns: 1fr;
.infobox caption { font-size: 125%; font-weight: bold; padding: 0.2em; background-color: #e1ebf1; }
  }
.infobox td, .infobox th { vertical-align: top; text-align: left; }
}
.infobox.bordered { border-collapse: collapse; }
.infobox.bordered td, .infobox.bordered th { border: 1px solid #aaa; }
.infobox.bordered .borderless td, .infobox.bordered .borderless th { border: 0; }


/* Navbox template */
/* Responsive banner styling */
.navbox { width: 100%; padding: 3px; border: 1px solid #d0d0d0; }
.responsive-banner-container img.mw-file-element {
.navbox a { color: #223366; }
    max-width: 800px !important;
.navbox td { padding: 0px; }
    width: 100% !important;
.navbox-inner { width: 100%; }
    height: auto !important;
.navbox-title { background-color: #e8e8e8; }
    margin: 0 auto;
.navbox-title .plainlinks { display: none; }
    display: block;
.navbox-group { background-color: #e8e8e8; white-space: nowrap; text-align: right; padding-left: 5px; padding-right: 5px; }
}
.navbox-list { border-left-width: 0px; }

Latest revision as of 20:30, 15 July 2025

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

.pp-block-title {
  border:1px solid var(--border-color-subtle);
  text-align: center;
  background-color: var(--background-color-neutral);
  padding-bottom: 0.5rem !important;
}

/* Old infobox template */
.infobox { border: 1px solid var(--border-color-subtle); border-spacing: 3px; background-color: background-color: var(--background-color-neutral); black; margin: 0.5em 0 0.5em 1em; padding: 0.2em; float: right; clear: right; font-size: 88%; line-height: 1.5em; }
.infobox caption { font-size: 125%; font-weight: bold; padding: 0.2em; background-color: background-color: var(--background-color-neutral); }
.infobox td, .infobox th { vertical-align: top; text-align: left; }
.infobox.bordered { border-collapse: collapse; }
.infobox.bordered td, .infobox.bordered th { border: 1px solid var(--border-color-subtle); }
.infobox.bordered .borderless td, .infobox.bordered .borderless th { border: 0; }

/* Old navbox template */
.navbox { width: 100%; margin-top: 1.5rem; padding: 0.125rem; border: 1px solid var(--border-color-subtle); }
.navbox td { padding: 0; }
.navbox-inner { width: 100%; }
.navbox-title { background-color: var(--background-color-neutral); }
.navbox-title .plainlinks { display: none; }
.navbox-group { background-color: var(--background-color-neutral); white-space: nowrap; text-align: right; padding-left: 5px; padding-right: 5px; }
.navbox-list { border-left-width: 0px !important; }
td.navbox-list ul { list-style-type: none; margin: 4px 0px 0px 10px; }
td.navbox-list li { display: inline; padding-left: 4px; white-space: nowrap; }
td.navbox-list li:before { content: "•"; padding-right: 4px; }

/* Make galleries workable */
ul.mw-gallery-packed-hover li.gallerybox:hover div.gallerytextwrapper, ul.mw-gallery-packed-overlay li.gallerybox div.gallerytextwrapper, ul.mw-gallery-packed-hover li.gallerybox.mw-gallery-focused div.gallerytextwrapper {
  max-height: 100%;
  top: 0;
  padding:0;
}
div.gallerytext { height: 120px; line-height: 120px; padding: 0; }
div.gallerytextwrapper { width: 120px !important; }
div.gallerytext a { line-height: normal;  display: inline-block; vertical-align: middle; height: 120px;}


/* Category Tiles Grid */
.category-tiles-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 auto;
  max-width: 1200px;
}

.category-tile {
  position: relative;
  background: var(--background-color-neutral-subtle);
  border-radius: 8px;
  border: 1px solid var(--border-color-subtle);
  overflow: hidden;
}

.category-tile:hover {
  background: var(--background-color-neutral);
  border: 1px solid var(--border-color-base);
}

.category-tile a {
  width: 100%;
  height: 100%;
  display: inline-block;
}

.tile-image {
  text-align: center;
}

.tile-title {    
  text-align: center;
  font-weight: bold;
  font-size: 1.2em;
}

.tile-title a,
.tile-title a:hover {
  padding: 0.75rem 0;
  color: var(--color-base);
  text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .category-tiles-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile-image {
    height: 140px;
  }

  .tile-image img {
    height: 140px;
    width: 140px;
  }
}

@media (max-width: 300px) {
  .category-tiles-container {
    grid-template-columns: 1fr;
  }
}

/* Responsive banner styling */
.responsive-banner-container img.mw-file-element {
    max-width: 800px !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto;
    display: block;
}