MediaWiki:Mobile.css: Difference between revisions
Appearance
Content deleted Content added
No edit summary Tag: Reverted |
No edit summary Tag: Manual revert |
||
| Line 29: | Line 29: | ||
} |
} |
||
} |
} |
||
.yt-thumb { max-width: 320px; margin:0.5em; } |
|||
.yt-thumb iframe, |
|||
.yt-thumb .ext-YouTube-video, |
|||
.yt-thumb img { width:100% !important; height:auto !important; aspect-ratio:16/9; display:block; } |
|||
Revision as of 23:02, 3 October 2025
/* All CSS here will be loaded for users of the mobile site */
/* Standard <youtube> (no lazy-load) */
.mw-parser-output iframe[data-extension="youtube"] {
width: 100% !important;
height: auto !important;
aspect-ratio: 16 / 9;
display: block;
}
/* Lazy-load wrapper + its thumbnail image */
.mw-parser-output .ext-YouTube-video {
width: 100% !important; /* override inline width="560px" etc. */
height: auto !important; /* override inline height */
}
.mw-parser-output .ext-YouTube-video img {
width: 100% !important; /* scale preview to screen */
height: auto !important;
aspect-ratio: 16 / 9;
display: block;
}
/* Optional: cap on very large screens (adjust 720px to taste) */
@media (min-width: 992px) {
.mw-parser-output iframe[data-extension="youtube"],
.mw-parser-output .ext-YouTube-video {
max-width: 720px;
margin: 0 auto;
}
}