Template:Article thumbnail/styles.css: Difference between revisions
Appearance
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 |
padding: 0px 0px 20px 0px; |
||
background: #FFFFFF; /* same background everywhere */ |
|||
background: transparent !important; |
|||
border: 0; /* no border */ |
|||
border: none !important; |
|||
| ⚫ | |||
| ⚫ | |||
box-sizing: border-box; |
box-sizing: border-box; |
||
| ⚫ | |||
| ⚫ | |||
} |
} |
||
/* Image wrapper */ |
|||
.article-thumb__imgwrap { |
.article-thumb__imgwrap { |
||
width: 100%; |
width: 100%; |
||
height: |
height: 160px; /* exact height so rows align */ |
||
padding: 0px 0px 0px 0px; |
|||
display: flex; |
display: flex; |
||
align-items: center; |
align-items: center; |
||
justify-content: |
justify-content: center; |
||
overflow: hidden; |
overflow: hidden; /* safety against odd aspect ratios */ |
||
| ⚫ | |||
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 |
.article-thumb__imgwrap img { |
||
.article-thumb__imgwrap .mw-file-description { |
|||
display: block; |
display: block; |
||
| ⚫ | |||
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 */ |
|||
| ⚫ | |||
height: auto; /* prevent stretch */ |
|||
border: none !important; |
|||
background: none !important; |
|||
background-color: transparent !important; |
|||
box-shadow: none !important; |
|||
} |
} |
||
| ⚫ | |||
/* Content Area */ |
|||
| ⚫ | |||
| ⚫ | |||
font-size: 0.85em; |
font-size: 0.85em; |
||
line-height: 1. |
line-height: 1.35; |
||
color: #202122; |
|||
} |
} |
||
/* Optional: cleaner links under the image */ |
|||
.article- |
.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;
}