Jump to content

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

From Insurer Brain
Content deleted Content added
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:
/* Unified look for all article thumbnails */
/* Container */
.article-thumb {
.article-thumb {
vertical-align: top;
vertical-align: top;
width: 150px;
width: 150px; /* exact width for all cards */
padding: 0px 15px 20px 0px; /* Added 15px right padding for a gap between cards */
padding: 0px 0px 20px 0px;
background: #FFFFFF; /* same background everywhere */
background: transparent !important;
border: 0; /* no border */
border: none !important;
display: inline-block;
text-align: left;
box-sizing: border-box;
box-sizing: border-box;
display: inline-block;
text-align: center;
}
}


/* Image wrapper */
.article-thumb__imgwrap {
.article-thumb__imgwrap {
width: 100%;
width: 100%;
height: 150px; /* Fixed height to keep the grid aligned */
height: 160px; /* exact height so rows align */
padding: 0px 0px 0px 0px;
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: flex-start; /* Aligns "as is" image to the left */
justify-content: center;
overflow: hidden;
overflow: hidden; /* safety against odd aspect ratios */
margin-bottom: 5px;
background: transparent !important;
}
}


/* Let the image fit without cropping or stretching */
/* Strip MediaWiki default styling from image links and files */
.article-thumb__imgwrap img,
.article-thumb__imgwrap .mw-file-element,
.article-thumb__imgwrap .mw-file-element,
.article-thumb__imgwrap a,
.article-thumb__imgwrap img {
.article-thumb__imgwrap .mw-file-description {
display: block;
display: block;
max-width: 100%;
height: 150px !important; /* Force the height you want */
max-height: 100%;
width: auto !important; /* Let width be "as is" based on aspect ratio */
width: auto; /* prevent stretch */
max-width: 150px;
height: auto; /* prevent stretch */
border: none !important;
background: none !important;
background-color: transparent !important;
box-shadow: none !important;
}
}


.article-thumb__caption {
/* Content Area */
margin: 0px 5px 0px 5px;
.article-thumb__content {
font-size: 0.85em;
font-size: 0.85em;
line-height: 1.4;
line-height: 1.35;
color: #202122;
}
}


/* Optional: cleaner links under the image */
.article-thumb__title a {
.article-thumb a {
font-weight: bold;
color: #202122;
text-decoration: none;
text-decoration: none;
}

.article-thumb__subtitle,
.article-thumb__description {
color: #202122;
display: block;
}
}

Revision as of 15:12, 4 January 2026

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

.article-thumb__imgwrap {
  width: 100%;
  height: 160px;                /* exact height so rows align */
  padding: 0px 0px 0px 0px;
  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: 0px 5px 0px 5px;
  font-size: 0.85em;
  line-height: 1.35;
}

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