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

Content deleted Content added
No edit summary
No edit summary
Line 1:
/* Base card style */
/* 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;
}
 
/* Alignment Modifier Classes */
.article-thumb--align-center { text-align: center; }
.article-thumb--align-left { text-align: left; }
.article-thumb--align-right { text-align: right; }
 
.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; /* Image stays centered in its 150px box */
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 {
Line 27 ⟶ 29:
max-width: 100%;
max-height: 100%;
width: auto; /* prevent stretch */
height: auto; /* prevent stretch */
}
 
Line 37 ⟶ 39:
}
 
/* The caption text under the page link */
.article-thumb__text {
color: #202122; /* Specific grey-black color */
font-weight: normal;
}
 
/* Optional: cleaner links under the image */
.article-thumb a {
text-decoration: none;