First commit.
This commit is contained in:
commit
b7977e1c28
2 changed files with 28081 additions and 0 deletions
45
sass/components/responsive-video/_responsive-video.scss
Normal file
45
sass/components/responsive-video/_responsive-video.scss
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
// Responsive video
|
||||
//
|
||||
// Using a wrapper div, embedded videos can be made responsive so that their
|
||||
// intrinsic aspect ratio is preserved at any screen width. The
|
||||
// `responsive-video__embed` class is optional if the embed is an `iframe`.
|
||||
//
|
||||
// .responsive-video--4-3 - A video with a 4:3 aspect ratio instead of the
|
||||
// default 16:9 one.
|
||||
//
|
||||
// Markup: responsive-video.twig
|
||||
//
|
||||
// Style guide: components.responsive-video
|
||||
|
||||
.responsive-video,
|
||||
%responsive-video {
|
||||
position: relative;
|
||||
padding-bottom: (9/16)*100%; // 16:9 aspect ratio
|
||||
padding-top: 25px; // Height of video controls
|
||||
height: 0;
|
||||
|
||||
iframe {
|
||||
@extend %responsive-video__embed;
|
||||
}
|
||||
|
||||
&__embed {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&--4-3 {
|
||||
padding-bottom: (3/4)*100%; // 4:3 aspect ratio
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Drupal selectors.
|
||||
//
|
||||
|
||||
.media-youtube-video,
|
||||
.media-vimeo-preview-wrapper {
|
||||
@extend %responsive-video;
|
||||
}
|
||||
3
sass/components/responsive-video/responsive-video.twig
Normal file
3
sass/components/responsive-video/responsive-video.twig
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="responsive-video {{modifier_class}}">
|
||||
<iframe class="responsive-video__embed" width="560" height="315" src="https://www.youtube.com/embed/8N_tupPBtWQ" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
Loading…
Reference in a new issue