Template:Article thumbnail/styles.css: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Base card style */ |
|||
/* Unified look for all article thumbnails */ |
|||
.article-thumb { |
.article-thumb { |
||
vertical-align: top; |
vertical-align: top; |
||
width: 150px; |
width: 150px; |
||
padding: 0px 0px 20px 0px; |
padding: 0px 0px 20px 0px; |
||
background: #FFFFFF; |
background: #FFFFFF; |
||
border: 0; |
border: 0; |
||
box-sizing: border-box; |
box-sizing: border-box; |
||
display: inline-block; |
display: inline-block; |
||
| ⚫ | |||
} |
} |
||
/* Alignment Modifier Classes */ |
|||
| ⚫ | |||
.article-thumb--align-left { text-align: left; } |
|||
.article-thumb--align-right { text-align: right; } |
|||
.article-thumb__imgwrap { |
.article-thumb__imgwrap { |
||
width: 100%; |
width: 100%; |
||
height: 160px; |
height: 160px; |
||
padding: 0px 0px 0px 0px; |
|||
display: flex; |
display: flex; |
||
align-items: center; |
align-items: center; |
||
justify-content: center; |
justify-content: center; /* Image stays centered in its 150px box */ |
||
overflow: hidden; |
overflow: hidden; |
||
} |
} |
||
/* 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 29: | ||
max-width: 100%; |
max-width: 100%; |
||
max-height: 100%; |
max-height: 100%; |
||
width: auto; |
width: auto; |
||
height: auto; |
height: auto; |
||
} |
} |
||
| Line 37: | Line 39: | ||
} |
} |
||
/* The caption text under the page link */ |
|||
.article-thumb__text { |
.article-thumb__text { |
||
color: #202122; |
color: #202122; |
||
font-weight: normal; |
font-weight: normal; |
||
} |
} |
||
/* Optional: cleaner links under the image */ |
|||
.article-thumb a { |
.article-thumb a { |
||
text-decoration: none; |
text-decoration: none; |
||
Revision as of 15:24, 4 January 2026
/* Base card style */
.article-thumb {
vertical-align: top;
width: 150px;
padding: 0px 0px 20px 0px;
background: #FFFFFF;
border: 0;
box-sizing: border-box;
display: inline-block;
}
/* 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;
display: flex;
align-items: center;
justify-content: center; /* Image stays centered in its 150px box */
overflow: hidden;
}
.article-thumb__imgwrap .mw-file-element,
.article-thumb__imgwrap img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
.article-thumb__caption {
margin: 0px 5px 0px 5px;
font-size: 0.85em;
line-height: 1.35;
}
.article-thumb__text {
color: #202122;
font-weight: normal;
}
.article-thumb a {
text-decoration: none;
}