Jump to content

MediaWiki:Common.css: Difference between revisions

From WikiPETia.info
No edit summary
No edit summary
 
(33 intermediate revisions by the same user not shown)
Line 28: Line 28:
td.navbox-list li:before { content: "•"; padding-right: 4px; }
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 {
/* Category Tiles Grid */
   max-height: 100%;
.category-tiles-container {
   top: 0;
  --tile-image-size: 120px;
  padding:0;
  --tile-font-size: 1.1em;
  --tile-gap: 0.75rem;
 
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(var(--tile-image-size) + 2px), 1fr));
  gap: var(--tile-gap);
  margin: 0 auto;
   max-width: 100%;
   width: fit-content;
}
}
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;}


/* Size Variants - Override CSS Variables */
.category-tiles-size-small {
  --tile-image-size: 80px;
  --tile-font-size: 0.9em;
}


/* Category Tiles Grid */
.category-tiles-size-large {
.category-tiles-container {
  --tile-image-size: 180px;
    display: grid;
  --tile-font-size: 1.3em;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
}
}


/* Tile Styling */
.category-tile {
.category-tile {
    position: relative;
  background: var(--background-color-neutral-subtle);
    background: var(--background-color-neutral-subtle);
  border-radius: 8px;
    border-radius: 8px;
  border: 1px solid var(--border-color-subtle);
    box-shadow: 0 2px 5px var(--box-shadow-color-base);
  overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
    overflow: hidden;
}
}


.category-tile:hover {
.category-tile:hover {
    transform: translateY(-5px);
  background: var(--background-color-neutral);
    box-shadow: 0 5px 15px var(--box-shadow-color-base);
  border-color: var(--border-color-base);
}
}


/* Style the link inside the tile */
.category-tile a {
.category-tile a {
    color: var(--color-base);
  display: block;
    text-decoration: none;
  width: 100%;
    display: block;
  height: 100%;
    height: 100%;
  color: var(--color-base);
  text-decoration: none;
}
 
 
.tile-image img {
  width: var(--tile-image-size) !important;
  height: var(--tile-image-size) !important;
  object-fit: cover;
}
}


/* Hide the underline that MediaWiki adds to links */
.tile-title {
.category-tile a:hover {
  font-weight: bold;
    text-decoration: none;
  font-size: var(--tile-font-size);
  border-top: 1px solid var(--border-color-muted);
  height: 100%;
}
}


.tile-content {
.tile-title span {
    display: block; /* Ensures the content fills the link */
  padding: 0.25rem 0.5rem;
}
}


.tile-image {
/* Responsive - Mobile First */
     height: 180px;
@media (max-width: 600px) {
     overflow: hidden;
  .category-tiles-container {
     text-align: center;
     --tile-gap: 0.5rem;
  }
 
  .category-tiles-size-small {
     --tile-image-size: 60px;
  }
 
  .category-tiles-size-large {
     --tile-image-size: 120px;
  }
}
}


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


.tile-title {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    background: var(--background-color-base);
    color: var(--color-base);
}


/* Responsive adjustments */
/* top bar category icons */
@media (max-width: 768px) {
#pp-symbols {
    .category-tiles-container {
  display: flex;
        grid-template-columns: repeat(2, 1fr);
  justify-content: center;
    }
  gap: 0.25rem;
  flex-grow: 1;
}
}


@media (max-width: 480px) {
/* hide top bar category icons on small screens */
    .category-tiles-container {
@media (max-width: 970px)
        grid-template-columns: 1fr;
{
    }
  #pp-symbols { display: none; }
   
    .tile-image {
        height: 140px;
    }
}
}

Latest revision as of 23:09, 19 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; }


/* Category Tiles Grid */
.category-tiles-container {
  --tile-image-size: 120px;
  --tile-font-size: 1.1em;
  --tile-gap: 0.75rem;
  
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(var(--tile-image-size) + 2px), 1fr));
  gap: var(--tile-gap);
  margin: 0 auto;
  max-width: 100%;
  width: fit-content;
}

/* Size Variants - Override CSS Variables */
.category-tiles-size-small {
  --tile-image-size: 80px;
  --tile-font-size: 0.9em;
}

.category-tiles-size-large {
  --tile-image-size: 180px;
  --tile-font-size: 1.3em;
}

/* Tile Styling */
.category-tile {
  background: var(--background-color-neutral-subtle);
  border-radius: 8px;
  border: 1px solid var(--border-color-subtle);
  overflow: hidden;
  text-align: center;
}

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

.category-tile a {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--color-base);
  text-decoration: none;
}


.tile-image img {
  width: var(--tile-image-size) !important;
  height: var(--tile-image-size) !important;
  object-fit: cover;
}

.tile-title {
  font-weight: bold;
  font-size: var(--tile-font-size);
  border-top: 1px solid var(--border-color-muted);
  height: 100%;
}

.tile-title span {
  padding: 0.25rem 0.5rem;
}

/* Responsive - Mobile First */
@media (max-width: 600px) {
  .category-tiles-container {
    --tile-gap: 0.5rem;
  }
  
  .category-tiles-size-small {
    --tile-image-size: 60px;
  }
  
  .category-tiles-size-large {
    --tile-image-size: 120px;
  }
}

/* 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;
}


/* top bar category icons */
#pp-symbols { 
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-grow: 1;
}

/* hide top bar category icons on small screens */
@media (max-width: 970px)
{
  #pp-symbols { display: none; }
}