WordPress/wp-content/themes/twentytwentyone/assets/sass/04-elements/media.scss
Peter Wilson 147852757c Twenty Twenty-One: Display inline-images inline.
Remove `display: block` property from inline images and display them center aligned vertically.

Props jeroenrotty, melchoyce, mukesh27, paaljoachim, poena, talldanwp.
Fixes #52287.


Built from https://develop.svn.wordpress.org/trunk@50351


git-svn-id: http://core.svn.wordpress.org/trunk@49962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-16 02:26:08 +00:00

47 lines
792 B
SCSS

img {
height: auto;
max-width: 100%;
vertical-align: middle;
}
/* Classic editor images */
.entry-content img {
max-width: 100%;
}
/* Make sure embeds and iframes fit their containers. */
embed,
iframe,
object,
video {
max-width: 100%;
}
/* Media captions */
figcaption,
.wp-caption,
.wp-caption-text,
.wp-block-embed figcaption {
color: currentColor;
font-size: var(--global--font-size-xs);
line-height: var(--global--line-height-body);
margin-top: calc(0.5 * var(--global--spacing-unit));
margin-bottom: var(--global--spacing-unit);
text-align: center;
.alignleft &,
.alignright & {
margin-bottom: 0;
}
}
/* WP Smiley */
.page-content .wp-smiley,
.entry-content .wp-smiley,
.comment-content .wp-smiley {
border: none;
margin-bottom: 0;
margin-top: 0;
padding: 0;
}