Jump to content

Template:Article thumbnail/styles.css: Difference between revisions

From Insurer Brain
Content deleted Content added
Created page with "Unified look for all article thumbnails: .article-thumb { width: 180px; exact width for all cards: padding: 8px; background: #f6f6f6; same background everywhere: border: 0; no border: box-sizing: border-box; display: inline-block; text-align: center; } .article-thumb__imgwrap { width: 100%; height: 260px; exact height so rows align: display: flex; align-items: cente..."
 
No edit summary
Line 12: Line 12:
.article-thumb__imgwrap {
.article-thumb__imgwrap {
width: 100%;
width: 100%;
height: 260px; /* exact height so rows align */
height: 200px; /* exact height so rows align */
display: flex;
display: flex;
align-items: center;
align-items: center;

Revision as of 20:30, 12 October 2025

/* Unified look for all article thumbnails */
.article-thumb {
  width: 180px;                 /* exact width for all cards */
  padding: 8px;
  background: #f6f6f6;          /* same background everywhere */
  border: 0;                    /* no border */
  box-sizing: border-box;
  display: inline-block;
  text-align: center;
}

.article-thumb__imgwrap {
  width: 100%;
  height: 200px;                /* exact height so rows align */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;             /* safety against odd aspect ratios */
}

/* Let the image fit without cropping or stretching */
.article-thumb__imgwrap .mw-file-element,
.article-thumb__imgwrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;                  /* prevent stretch */
  height: auto;                 /* prevent stretch */
}

.article-thumb__caption {
  margin-top: 6px;
  font-size: 0.9em;
  line-height: 1.35;
}

/* Optional: cleaner links under the image */
.article-thumb a {
  text-decoration: none;
}