Skip to content

Commit

Permalink
fix: tooltip causing page overflow (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes authored Oct 1, 2024
1 parent 3ccc78b commit 135151f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/js/media-chrome-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,18 @@ template.innerHTML = /*html*/ `
}
media-tooltip {
${/** Make sure unpositioned tooltip doesn't cause page overflow (scroll). */ ''}
max-width: 0;
overflow-x: hidden;
opacity: 0;
transition: opacity .3s;
transition: opacity .3s, max-width 0s 9s;
}
:host(:hover) media-tooltip,
:host(:focus-visible) media-tooltip {
max-width: 100vw;
opacity: 1;
transition: opacity .3s;
}
:host([notooltip]) slot[name="tooltip"] {
Expand Down

0 comments on commit 135151f

Please sign in to comment.