`fitWidth` for `video-miniature`, fluid grid (#2830)
[oweals/peertube.git] / client / src / app / shared / video / abstract-video-list.scss
index 4149c910905b6205c36cde60f83bd5725597895a..2aab40ea8a5189a8ae4ada3f06333045c96808e8 100644 (file)
@@ -1,6 +1,24 @@
+@import '_bootstrap-variables';
+@import '_variables';
 @import '_mixins';
 @import '_miniature';
 
+.videos {
+  display: grid;
+  column-gap: calc(10px + .2%);
+  grid-template-columns: repeat(
+    auto-fill,
+    minmax(
+      var(--miniature-min-width, #{$video-thumbnail-width}),
+      1fr
+    )
+  );
+
+  @media screen and (min-width: #{breakpoint(xxl)}) {
+    --miniature-min-width: 300px;
+  }
+}
+
 .videos-header {
   display: flex;
   justify-content: space-between;
   margin-top: -10px;
   padding-top: 20px;
 
+  // make the element span a full grid row within .videos grid
+  grid-column: 1 / -1;
+
   &:not(:first-child) {
     border-top: 1px solid $separator-border-color;
   }
 }
 
-.margin-content {
-  @include adapt-margin-content-width;
+:host-context(.main-col:not(.expanded)) .margin-content {
+  @include adapt-margin-content-width($fluid: true);
 }
 
 @media screen and (max-width: $mobile-view) {