Jump to content

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(35 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: #f8f8f8;
  border-radius: 8px;
    border-radius: 8px;
  border: 1px solid var(--border-color-subtle);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  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 rgba(0,0,0,0.2);
  border-color: var(--border-color-base);
}
}


.category-tile a {
.category-tile a {
    color: inherit;
  display: block;
    text-decoration: none;
  width: 100%;
    display: block;
  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-image {
.tile-title {
    height: 180px;
  font-weight: bold;
    overflow: hidden;
  font-size: var(--tile-font-size);
    text-align: center;
  border-top: 1px solid var(--border-color-muted);
  height: 100%;
}
}


.tile-image img.tile-img {
.tile-title span {
    width: 100%;
  padding: 0.25rem 0.5rem;
    height: 100%;
    object-fit: cover;
    display: block;
}
}


.tile-title {
/* Responsive - Mobile First */
     padding: 15px;
@media (max-width: 600px) {
    text-align: center;
  .category-tiles-container {
     font-weight: bold;
     --tile-gap: 0.5rem;
    font-size: 1.1em;
  }
     color: #333;
 
    background: white;
  .category-tiles-size-small {
     --tile-image-size: 60px;
  }
 
  .category-tiles-size-large {
     --tile-image-size: 120px;
  }
}
}


/* Alternative: Overlay title instead of showing below */
/* Responsive banner styling */
/*
.responsive-banner-container img.mw-file-element {
.tile-title {
     max-width: 800px !important;
     position: absolute;
     width: 100% !important;
    bottom: 0;
     height: auto !important;
     width: 100%;
     margin: 0 auto;
     padding: 10px;
     display: block;
     background: rgba(0,0,0,0.7);
    color: white;
     text-align: center;
}
}
*/


/* Responsive adjustments */
 
@media (max-width: 768px) {
/* top bar category icons */
    .category-tiles-container {
#pp-symbols {
        grid-template-columns: repeat(2, 1fr);
  display: flex;
    }
  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;
    }
}
}