You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_vertical_filmstrip.scss 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. .vertical-filmstrip .filmstrip {
  2. &.hide-videos {
  3. .remote-videos-container {
  4. opacity: 0;
  5. pointer-events: none;
  6. }
  7. }
  8. /*
  9. * Firefox sets flex items to min-height: auto and min-width: auto,
  10. * preventing flex children from shrinking like they do on other browsers.
  11. * Setting min-height and min-width 0 is a workaround for the issue so
  12. * Firefox behaves like other browsers.
  13. * https://bugzilla.mozilla.org/show_bug.cgi?id=1043520
  14. */
  15. @mixin minHWAutoFix() {
  16. min-height: 0;
  17. min-width: 0;
  18. }
  19. @extend %align-right;
  20. align-items: flex-end;
  21. bottom: 0;
  22. box-sizing: border-box;
  23. display: flex;
  24. flex-direction: column-reverse;
  25. height: 100%;
  26. width: 100%;
  27. padding: ($desktopAppDragBarHeight - 5px) 5px 10px;
  28. /**
  29. * fixed positioning is necessary for remote menus and tooltips to pop
  30. * out of the scrolling filmstrip. AtlasKit dialogs and tooltips use
  31. * a library called popper which will position its elements fixed if
  32. * any parent is also fixed.
  33. */
  34. position: fixed;
  35. top: 0;
  36. transition: height .3s ease-in;
  37. right: 0;
  38. z-index: $filmstripVideosZ;
  39. &.reduce-height {
  40. height: calc(100% - #{$newToolbarSizeWithPadding});
  41. }
  42. /**
  43. * Hide videos by making them slight to the right.
  44. */
  45. .filmstrip__videos {
  46. @extend %align-right;
  47. bottom: 0;
  48. padding: 0;
  49. position:relative;
  50. right: 0;
  51. width: auto;
  52. &.hidden {
  53. bottom: auto;
  54. right: -196px;
  55. }
  56. /**
  57. * An id selector is used to match id specificity with existing
  58. * filmstrip styles.
  59. */
  60. &#remoteVideos {
  61. border: $thumbnailsBorder solid transparent;
  62. padding-left: 0;
  63. transition: right 2s;
  64. width: 100%;
  65. }
  66. }
  67. /**
  68. * Re-styles the local Video to better fit vertical filmstrip layout.
  69. */
  70. #filmstripLocalVideo {
  71. align-self: initial;
  72. bottom: 5px;
  73. display: flex;
  74. flex-direction: column-reverse;
  75. height: auto;
  76. justify-content: flex-start;
  77. #filmstripLocalVideoThumbnail {
  78. width: calc(100% - 15px);
  79. .videocontainer {
  80. height: 0px;
  81. width: 100%;
  82. }
  83. }
  84. }
  85. /**
  86. * Remove unnecssary padding that is normally used to prevent horizontal
  87. * filmstrip from overlapping the left edge of the screen.
  88. */
  89. #filmstripLocalVideo,
  90. #filmstripRemoteVideos {
  91. padding: 0;
  92. }
  93. #filmstripRemoteVideos {
  94. @include minHWAutoFix();
  95. display: flex;
  96. flex: 1;
  97. flex-direction: column-reverse;
  98. height: auto;
  99. overflow-x: hidden;
  100. overflow-y: scroll;
  101. #filmstripRemoteVideosContainer {
  102. @include minHWAutoFix();
  103. flex-direction: column-reverse;
  104. overflow: visible;
  105. width: calc(100% - 8px); // 8px for margin + border of the thumbnails
  106. .videocontainer {
  107. height: 0px;
  108. width: 100%;
  109. }
  110. }
  111. }
  112. #remoteVideos {
  113. @include minHWAutoFix();
  114. flex-direction: column;
  115. flex-grow: 1;
  116. }
  117. .remote-videos-container {
  118. display: flex;
  119. transition: opacity 1s;
  120. }
  121. }
  122. /**
  123. * Override other styles to support vertical filmstrip mode.
  124. */
  125. .filmstrip-only .vertical-filmstrip {
  126. .filmstrip {
  127. flex-direction: row-reverse;
  128. }
  129. .filmstrip__videos-filmstripOnly {
  130. margin-top: auto;
  131. margin-bottom: auto;
  132. height: 100%;
  133. }
  134. .filmstrip__videos {
  135. &#filmstripLocalVideo {
  136. bottom: 0px;
  137. }
  138. }
  139. }
  140. /**
  141. * Workarounds for Edge and Firefox not handling scrolling properly with
  142. * flex-direction: column-reverse. The remove videos in filmstrip should
  143. * start scrolling from the bottom of the filmstrip, but in those browsers the
  144. * scrolling won't happen. Per W3C spec, scrolling should happen from the
  145. * bottom. As such, use css hacks to get around the css issue, with the intent
  146. * being to remove the hacks as the spec is supported.
  147. */
  148. @mixin undoColumnReverseVideos() {
  149. .vertical-filmstrip {
  150. #remoteVideos #filmstripRemoteVideos #filmstripRemoteVideosContainer {
  151. flex-direction: column;
  152. }
  153. }
  154. }
  155. /**
  156. * FF does not include the scroll width when calculating the size of the content. That's why we need to include
  157. * ourselves the width of the scroll so that the remote videos are aligned with the local one.
  158. */
  159. @mixin filmstripSizeWithoutScroll {
  160. .vertical-filmstrip {
  161. #remoteVideos #filmstripRemoteVideos {
  162. #filmstripRemoteVideosContainer {
  163. width: calc(100% - 15px) // 8 px - margins + border of the thumbnails; 7px - for the scroll
  164. }
  165. }
  166. }
  167. }
  168. /** Firefox detection hack **/
  169. @-moz-document url-prefix() {
  170. @include undoColumnReverseVideos();
  171. @include filmstripSizeWithoutScroll();
  172. }
  173. /** Edge detection hack **/
  174. @supports (-ms-ime-align:auto) {
  175. @include undoColumnReverseVideos();
  176. }