Skip to content

Commit

Permalink
correct aspect ratio syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
areynold committed Jul 25, 2024
1 parent e7db214 commit 5d5252f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ilw-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ class Video extends LitElement {
}

render() {
const aspectOverride = this.aspectRatio ? `--ilw-video--aspect-ratio: ${this.aspectRatio}` : '';

return html`
<div class="video">
<div class="aspectRatio" ${this.aspectRatio ? 'style="--ilw-video--aspect-ratio(' + this.aspectRatio + ')"' : ''}>
<div class="aspectRatio" style="${aspectOverride}">
<slot></slot>
</div>
</div>
Expand Down

0 comments on commit 5d5252f

Please sign in to comment.