constrain gif backgrounds (with modifications) (#176)

* constrain gif backgrounds. fixes #159

* nit: move background-* styles to AutoplayVideo.html
This commit is contained in:
Nolan Lawson 2018-04-19 10:04:44 -07:00 committed by GitHub
parent 8d5690d63d
commit ebcade8035
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
<video
class="{{className || ''}}"
class="autoplay-video {{className || ''}}"
aria-label="{{ariaLabel || ''}}"
style="background: url({{poster}});"
style="background-image: url({{poster}});"
:poster
:width
:height
@ -11,4 +11,11 @@
loop
webkit-playsinline
playsinline
/>
/>
<style>
.autoplay-video {
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}
</style>