Template:Vertical thumbnail/styles.css: Difference between revisions
Appearance
Content deleted Content added
Created page with "→Base card style: .vertical-thumb { vertical-align: top; width: 150px; padding: 0 20px 20px 0; background: transparent !important; border: 0; box-sizing: border-box; display: inline-block; } →Alignment Modifier Classes: .vertical-thumb--align-center { text-align: center; } .vertical-thumb--align-left { text-align: left; } .vertical-thumb--align-right { text-align: right; } .vertical-thumb__imgwrap { width: 100%; height: 130px; display:..." |
No edit summary |
||
| Line 1: | Line 1: | ||
/* |
/* Container for the entire card */ |
||
.vertical-thumb { |
.vertical-thumb { |
||
vertical-align: top; |
vertical-align: top; |
||
width: 150px; |
width: 150px; |
||
padding: 0 |
padding: 0 15px 20px 0; |
||
background: transparent !important; |
background: transparent !important; |
||
border: 0; |
border: 0; |
||
| Line 15: | Line 15: | ||
.vertical-thumb--align-right { text-align: right; } |
.vertical-thumb--align-right { text-align: right; } |
||
/* The Square Image Container (Padding Hack) */ |
|||
.vertical-thumb__imgwrap { |
.vertical-thumb__imgwrap { |
||
width: 100%; |
width: 100%; |
||
height: |
height: 0; |
||
padding-bottom: 100%; /* This forces the height to match the width (1:1) */ |
|||
display: flex; |
|||
position: relative; /* Necessary for the absolute image inside */ |
|||
align-items: center; |
|||
justify-content: center; /* Centered image within the wrapper */ |
|||
overflow: hidden; |
overflow: hidden; |
||
margin-bottom: 8px; |
margin-bottom: 8px; |
||
background-color: #f8f9fa; |
|||
border-radius: 4px; |
|||
} |
} |
||
/* Ensure the image fills the square correctly */ |
|||
.vertical-thumb__imgwrap img |
.vertical-thumb__imgwrap img, |
||
.vertical-thumb__imgwrap .mw-file-element { |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
| ⚫ | |||
| ⚫ | |||
display: block; |
display: block; |
||
object-fit: cover; /* Keeps the aspect ratio of the photo itself */ |
|||
| ⚫ | |||
| ⚫ | |||
width: auto; |
|||
height: auto; |
|||
} |
} |
||
/* Unified |
/* Unified Content Area */ |
||
.vertical-thumb__content { |
.vertical-thumb__content { |
||
font-size: 0.85em; |
font-size: 0.85em; |
||
line-height: 1. |
line-height: 1.3; |
||
color: #202122; |
color: #202122; |
||
word-wrap: break-word; |
|||
} |
} |
||
/* Styling the wikitext links within the content */ |
|||
.vertical-thumb__content a { |
.vertical-thumb__content a { |
||
font-weight: bold; |
font-weight: bold; |
||
text-decoration: none; |
text-decoration: none; |
||
color: #0645ad; |
color: #0645ad; |
||
} |
} |
||
Revision as of 20:58, 4 January 2026
/* Container for the entire card */
.vertical-thumb {
vertical-align: top;
width: 150px;
padding: 0 15px 20px 0;
background: transparent !important;
border: 0;
box-sizing: border-box;
display: inline-block;
}
/* Alignment Modifier Classes */
.vertical-thumb--align-center { text-align: center; }
.vertical-thumb--align-left { text-align: left; }
.vertical-thumb--align-right { text-align: right; }
/* The Square Image Container (Padding Hack) */
.vertical-thumb__imgwrap {
width: 100%;
height: 0;
padding-bottom: 100%; /* This forces the height to match the width (1:1) */
position: relative; /* Necessary for the absolute image inside */
overflow: hidden;
margin-bottom: 8px;
background-color: #f8f9fa;
border-radius: 4px;
}
/* Ensure the image fills the square correctly */
.vertical-thumb__imgwrap img,
.vertical-thumb__imgwrap .mw-file-element {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
object-fit: cover; /* Keeps the aspect ratio of the photo itself */
}
/* Unified Content Area */
.vertical-thumb__content {
font-size: 0.85em;
line-height: 1.3;
color: #202122;
word-wrap: break-word;
}
.vertical-thumb__content a {
font-weight: bold;
text-decoration: none;
color: #0645ad;
}
.vertical-thumb__content a:hover {
text-decoration: underline;
}