Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

lightbox: Update iframe styles to use aspect-ratio.

Sourabh Patelbff652a56572
diff --git a/web/styles/lightbox.css b/web/styles/lightbox.css
index 254327b47ce..53161dd8d48 100644
--- a/web/styles/lightbox.css
+++ b/web/styles/lightbox.css
@@ -156,10 +156,17 @@
align-items: center;
& iframe {
- /* maintain 16:9 ratio. */
- width: calc((100vh - 65px - 95px) * 16 / 9);
- height: 100%;
- margin: auto;
+ aspect-ratio: 16/9;
+ /* for screen_width<=lg_min aspect-ratio will be
+ maintained given portrait mode is used */
+ /* in landscape max-height will prevent overflow,
+ however user will benefit more from using
+ youtube fullscreen at that point */
+ width: 100%;
+ /* maintains the aspect ratio for screen_width>=lg_min. */
+ max-width: $lg_min;
+ /* height(media_info_container) + height(center) < 200px */
+ max-height: calc(100dvh - 200px);
}
}