Last active
August 29, 2015 14:13
-
-
Save githiro/f6f08a0375042d307323 to your computer and use it in GitHub Desktop.
SASS: Flexible video snippet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Flexible video | |
//////////////////////////////////// | |
$flex-video-classname: "flex-video" !default; | |
$flex-video-fallback-max-width: 490px !default; | |
.#{$flex-video-classname} { | |
position: relative; | |
height: 0; | |
max-width: 100%; | |
margin-bottom: 1.6em !important; | |
padding: 0 0 61%; | |
.oldie & { | |
margin: 15px 0; | |
max-width: $flex-video-fallback-max-width; | |
} | |
iframe, object, embed, video { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100% | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment