Jump to content

MediaWiki:Common.css: Difference between revisions

From IITD Wiki
Add external image size constraints
 
Fix hero image sizing, keep external image constraints
Line 1: Line 1:
/* Constrain external images to a reasonable size */
/* Constrain external images in article content to a reasonable size */
.mw-parser-output img:not(.mw-file-element) {
.mw-parser-output img:not(.mw-file-element):not(.cs-hero-img) {
     max-width: 200px;
     max-width: 200px;
     max-height: 250px;
     max-height: 250px;
     width: auto;
     width: auto;
     height: auto;
     height: auto;
}
/* Hero banner image on Main Page */
.cs-hero-banner {
    text-align: center;
    margin-bottom: 1em;
    border-radius: 6px;
    overflow: hidden;
}
.cs-hero-banner img {
    max-width: 100%;
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 6px;
}
}

Revision as of 07:42, 14 April 2026

/* Constrain external images in article content to a reasonable size */
.mw-parser-output img:not(.mw-file-element):not(.cs-hero-img) {
    max-width: 200px;
    max-height: 250px;
    width: auto;
    height: auto;
}

/* Hero banner image on Main Page */
.cs-hero-banner {
    text-align: center;
    margin-bottom: 1em;
    border-radius: 6px;
    overflow: hidden;
}

.cs-hero-banner img {
    max-width: 100%;
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 6px;
}