Jump to content

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

From Insurer Brain
Content deleted Content added
No edit summary
Tag: Manual revert
No edit summary
Tag: Reverted
Line 1: Line 1:
/* Unified look for all article thumbnails */
/* Container for the whole card */
.article-thumb {
.article-thumb {
vertical-align: top;
vertical-align: top;
width: 150px; /* exact width for all cards */
width: 150px; /* Fixed width for grid consistency */
padding: 0px 0px 20px 0px;
padding: 0px 10px 20px 0px; /* Added right padding for breathing room between cards */
background: #FFFFFF; /* same background everywhere */
background: transparent; /* Clean look */
border: 0; /* no border */
box-sizing: border-box;
display: inline-block;
display: inline-block;
text-align: left; /* Force left alignment of the whole block */
text-align: center;
box-sizing: border-box;
}
}


/* Image wrapper */
.article-thumb__imgwrap {
.article-thumb__imgwrap {
width: 100%;
width: 100%;
height: 160px; /* exact height so rows align */
height: 160px; /* Consistent height for image area */
padding: 0px 0px 0px 0px;
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: flex-start; /* Align the image to the left within its container */
overflow: hidden; /* safety against odd aspect ratios */
overflow: hidden;
margin-bottom: 8px; /* Space between image and text */
}
}


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


/* Text Content Area */
.article-thumb__caption {
.article-thumb__content {
margin: 0px 5px 0px 5px;
font-size: 0.85em;
font-size: 0.85em; /* Global size for all text in the card */
line-height: 1.35;
line-height: 1.3;
}
}


.article-thumb__title a {
/* Optional: cleaner links under the image */
font-weight: bold; /* Title is 0.85em but bold for hierarchy */
.article-thumb a {
color: #000;
text-decoration: none;
text-decoration: none;
}

.article-thumb__subtitle {
color: #333; /* Slightly lighter than black */
}

.article-thumb__description {
color: #666; /* Soft gray for meta-info */
}
}

Revision as of 14:54, 4 January 2026

/* Container for the whole card */
.article-thumb {
  vertical-align: top;
  width: 150px;                 /* Fixed width for grid consistency */
  padding: 0px 10px 20px 0px;   /* Added right padding for breathing room between cards */
  background: transparent;      /* Clean look */
  display: inline-block;
  text-align: left;             /* Force left alignment of the whole block */
  box-sizing: border-box;
}

/* Image wrapper */
.article-thumb__imgwrap {
  width: 100%;
  height: 160px;                /* Consistent height for image area */
  display: flex;
  align-items: center;
  justify-content: flex-start;  /* Align the image to the left within its container */
  overflow: hidden;
  margin-bottom: 8px;           /* Space between image and text */
}

.article-thumb__imgwrap .mw-file-element,
.article-thumb__imgwrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* Text Content Area */
.article-thumb__content {
  font-size: 0.85em;            /* Global size for all text in the card */
  line-height: 1.3;
}

.article-thumb__title a {
  font-weight: bold;            /* Title is 0.85em but bold for hierarchy */
  color: #000;
  text-decoration: none;
}

.article-thumb__subtitle {
  color: #333;                  /* Slightly lighter than black */
}

.article-thumb__description {
  color: #666;                  /* Soft gray for meta-info */
}