From Swarthmore Knowledge Base
.screenshot-wrapper {
margin: 1.5em 0;
text-align: center;
}
.screenshot {
display: inline-block;
width: auto;
max-width: 100%;
box-sizing: border-box;
padding: 12px;
background: #fff;
border: 1px solid #d8dde8;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
color: #202122;
text-align: center;
vertical-align: top;
}
.screenshot__image {
display: inline-block;
max-width: 100%;
box-sizing: border-box;
overflow: hidden;
border: 1px solid #c8ccd1;
border-radius: 4px;
line-height: 0;
vertical-align: top;
}
.screenshot__image p,
.screenshot__caption p {
margin: 0;
}
.screenshot__image .mw-file-description {
display: inline-block;
max-width: 100%;
}
.screenshot__image .mw-file-element,
.screenshot__image img {
display: block;
max-width: 100%;
height: auto;
}
.screenshot__caption {
margin-top: 0.75em;
color: #54595d;
font-size: 0.9em;
line-height: 1.4;
text-align: center;
overflow-wrap: anywhere;
}
html.skin-theme-clientpref-night .screenshot {
background: #202122;
border-color: #54595d;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
color: #eaecf0;
}
html.skin-theme-clientpref-night .screenshot__image {
border-color: #72777d;
}
html.skin-theme-clientpref-night .screenshot__caption {
color: #c8ccd1;
}
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .screenshot {
background: #202122;
border-color: #54595d;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
color: #eaecf0;
}
html.skin-theme-clientpref-os .screenshot__image {
border-color: #72777d;
}
html.skin-theme-clientpref-os .screenshot__caption {
color: #c8ccd1;
}
}