31 lines
837 B
CSS
31 lines
837 B
CSS
|
|
/*
|
|
* Prevent cases of amp-img converted from img to appear with stretching by using object-fit to scale.
|
|
* See <https://github.com/ampproject/amphtml/issues/21371#issuecomment-475443219>.
|
|
* Also use object-fit:contain in worst case scenario when we can't figure out dimensions for an image.
|
|
*/
|
|
amp-img.amp-wp-enforced-sizes[layout=intrinsic] > img,
|
|
.amp-wp-unknown-size > img {
|
|
object-fit: contain;
|
|
}
|
|
|
|
amp-fit-text blockquote,
|
|
amp-fit-text h1,
|
|
amp-fit-text h2,
|
|
amp-fit-text h3,
|
|
amp-fit-text h4,
|
|
amp-fit-text h5,
|
|
amp-fit-text h6 {
|
|
font-size: inherit;
|
|
}
|
|
|
|
/**
|
|
* Override a style rule in Twenty Sixteen and Twenty Seventeen.
|
|
* It set display:none for audio elements.
|
|
* This selector is the same, though it adds body and uses amp-audio instead of audio.
|
|
*/
|
|
body amp-audio:not([controls]) {
|
|
display: inline-block;
|
|
height: auto;
|
|
}
|