washingtonstateuniversity / WSUWP-Plugin-Embeds

A WordPress plugin to manage various embeds allowed on the WSUWP Platform
1 stars 2 forks source link

[PR] Responsive wrapper for YouTube embeds #33

Closed philcable closed 8 years ago

philcable commented 8 years ago

Fixes #30

Using the same classes (to hopefully preserve any custom styles people might have in place) but changing the span to a div (to prevent wrapping by paragraph tags), the following rules would give us responsive videos:

.embed-youtube {
    height: 0;
    margin-bottom: 1em;
    padding-bottom: 56.25%;
    position: relative;
}

.embed-youtube .youtube-player {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

Would the Spine parent theme be the most appropriate place to add these?

@jeremyfelt Let me know what you think! If it looks like a good way to go, #reviewmerge?

jeremyfelt commented 8 years ago

Looks good to me! I think the Spine parent theme would be appropriate for those styles.