Skip to content

Commit

Permalink
fix: use display grid to stack video and audio els
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Jul 30, 2022
1 parent 28a913a commit f38b73e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Expand Up @@ -10,14 +10,16 @@

const styles = `
:host {
display: inline-block;
display: inline-grid;
line-height: 0;
width: auto;
height: auto;
}
video,
audio {
grid-column: 1;
grid-row: 1;
max-width: 100%;
max-height: 100%;
min-width: 100%;
Expand Down Expand Up @@ -334,7 +336,7 @@ export const SuperMediaMixin = (superclass, { tag, is }) => {
} else {
// Ignore a few that don't need to be passed through just in case
// it creates unexpected behavior.
if (['id', 'class'].indexOf(attrName) === -1) {
if (!['id', 'class'].includes(attrName)) {
this.nativeEl.setAttribute?.(attrName, newValue);
}
}
Expand Down

0 comments on commit f38b73e

Please sign in to comment.