Jump to content

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(16 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);
    border: 1px solid var(--border-color-subtle);
  overflow: hidden;
    overflow: hidden;
  text-align: center;
    cursor: pointer;
}
}


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


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


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


.tile-title {
.tile-title {
    padding: 0.75rem;
  font-weight: bold;
    text-align: center;
  font-size: var(--tile-font-size);
    font-weight: bold;
  border-top: 1px solid var(--border-color-muted);
    font-size: 1.2em;
  height: 100%;
}
}


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


/* Responsive adjustments */
/* Responsive - Mobile First */
@media (max-width: 768px) {
@media (max-width: 600px) {
    .category-tiles-container {
  .category-tiles-container {
        grid-template-columns: repeat(2, 1fr);
    --tile-gap: 0.5rem;
    }
  }
 
 
    .tile-image {
  .category-tiles-size-small {
        height: 140px;
     --tile-image-size: 60px;
     }
  }
 
 
    .tile-image img {
  .category-tiles-size-large {
        height: 140px;
    --tile-image-size: 120px;
        width: 140px;
  }
    }
}
 
@media (max-width: 300px) {
    .category-tiles-container {
        grid-template-columns: 1fr;
    }
}
}


/* Responsive banner styling */
/* Responsive banner styling */
.responsive-banner-container {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    overflow: hidden; /* Prevent content from spilling out */
}
/* Target the actual image element */
.responsive-banner-container img.mw-file-element {
.responsive-banner-container img.mw-file-element {
     max-width: 600px !important;
     max-width: 800px !important;
     width: 100% !important;
     width: 100% !important;
     height: auto !important;
     height: auto !important;
Line 124: Line 118:
}
}


/* Target the span wrappers that MediaWiki adds */
 
.responsive-banner-container span {
/* top bar category icons */
    display: block;
#pp-symbols {  
    max-width: 100%;
  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; }
}
}