You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ScriptYouTubePlayer component accepts width and height (or defaults to 640 and 480). From that it calculates aspect-ratio and then sets these styles on it
This could potentially cause some responsive troubles when it is inside a container that has min-width:auto like a grid column.
I am providing a reproduction showing it.
The issue on the reproduction can be solved by adding min-w-0 to the grid cols, as the grid cols by default want to follow the width of their content, their default is min-width: auto.
🐛 The bug
Hi team!
The
ScriptYouTubePlayer
component acceptswidth
andheight
(or defaults to640
and480
). From that it calculatesaspect-ratio
and then sets these styles on itThis could potentially cause some responsive troubles when it is inside a container that has
min-width:auto
like a grid column.I am providing a reproduction showing it.
The issue on the reproduction can be solved by adding
min-w-0
to the grid cols, as the grid cols by default want to follow the width of their content, their default ismin-width: auto
.🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-s1pw6n?file=app.vue
🌈 Expected behavior
As a possible solution, I am wondering if the following could be a friendlier?
Also we could let the user handle the width and height and just get the aspect ratio in the props?
ℹ️ Additional context
No response
The text was updated successfully, but these errors were encountered: