feat: add smart responsive design for VideoPlayer
Responsive Design: - Mobile (<768px): 98% width, 50vh video height - Tablet (769-1024px): 900px max, 65vh video - Desktop (1025-1440px): 1000px max, 70vh video - Large (1441px+): 1200px max, 75vh video (advanced) - Ultra-wide (21:9 aspect): 60vh video height Features: - min() for max-width to prevent overflow - min() for max-height to respect viewport - calc() for dynamic height calculation - Aspect ratio media query for ultra-wide screens - Flexible toggle wrap on mobile
This commit is contained in:
@@ -1171,9 +1171,51 @@ onUnmounted(() => {
|
||||
<style scoped>
|
||||
.ms-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 999; display: flex; justify-content: center; align-items: flex-start; padding-top: 140px; }
|
||||
.ms-modal { background: #fff; border-radius: 20px; max-width: 380px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
|
||||
.ms-modal-video { max-width: 720px; width: 95%; padding: 20px 24px 24px; text-align: left; background: #1a1a1a; position: relative; }
|
||||
.ms-modal-video-advanced { max-width: 1200px; max-height: 90vh; }
|
||||
.ms-modal-video-advanced .video { max-height: 75vh; }
|
||||
.ms-modal-video {
|
||||
max-width: 720px;
|
||||
width: 95%;
|
||||
padding: 20px 24px 24px;
|
||||
text-align: left;
|
||||
background: #1a1a1a;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ms-modal-video-advanced {
|
||||
max-width: min(95vw, 1200px);
|
||||
max-height: 90vh;
|
||||
}
|
||||
|
||||
.ms-modal-video-advanced .video {
|
||||
max-height: min(75vh, calc(90vh - 180px));
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (max-width: 768px) {
|
||||
.ms-modal-video { width: 98%; padding: 12px 16px 16px; }
|
||||
.ms-modal-video-advanced { max-width: 98%; }
|
||||
.video { max-height: 50vh; }
|
||||
.ms-proc-toggles { flex-wrap: wrap; gap: 8px; }
|
||||
}
|
||||
|
||||
@media (min-width: 769px) and (max-width: 1024px) {
|
||||
.ms-modal-video { max-width: 900px; }
|
||||
.video { max-height: 65vh; }
|
||||
}
|
||||
|
||||
@media (min-width: 1025px) and (max-width: 1440px) {
|
||||
.ms-modal-video { max-width: 1000px; }
|
||||
.video { max-height: 70vh; }
|
||||
}
|
||||
|
||||
@media (min-width: 1441px) {
|
||||
.ms-modal-video-advanced { max-width: 1200px; }
|
||||
.ms-modal-video-advanced .video { max-height: 75vh; }
|
||||
}
|
||||
|
||||
/* Ultra-wide screens (21:9) */
|
||||
@media (min-aspect-ratio: 21/9) {
|
||||
.ms-modal-video-advanced .video { max-height: 60vh; }
|
||||
}
|
||||
.ms-modal-video-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
|
||||
.ms-modal-video-title { font-size: 14px; font-weight: 600; color: #e8eaed; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.ms-modal-video-close { border: none; background: transparent; font-size: 18px; color: #9aa0a6; cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0; }
|
||||
|
||||
Reference in New Issue
Block a user