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
1 changed files with 10 additions and 3 deletions

View File

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