Prevent Twitter embeds from cutting off. Issue #2166
This commit is contained in:
parent
9b6f04b8ac
commit
e1c8479515
|
@ -1,6 +1,8 @@
|
|||
// Here we are making iframes responsive. Particularly useful for inline Youtube videos.
|
||||
function wrapFrames() {
|
||||
document.querySelectorAll("iframe").forEach(element => {
|
||||
if (element.height > 0 || parseInt(element.style.height) > 0)
|
||||
return;
|
||||
var wrapper = document.createElement("div");
|
||||
wrapper.classList.add("iframeWrap");
|
||||
element.parentNode.insertBefore(wrapper, element);
|
||||
|
|
|
@ -192,12 +192,17 @@ code, pre {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
img, figure, iframe, div {
|
||||
img, figure, div {
|
||||
max-width: 100%;
|
||||
height: auto !important;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin-bottom: 1em;
|
||||
margin-top: 1em;
|
||||
|
|
Loading…
Reference in New Issue