]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/sass/bootstrap.scss
Don't run the server in detached state
[github/Chocobozzz/PeerTube.git] / client / src / sass / bootstrap.scss
index 4d2fcf5b328eb1cd4012cef13cd4239357a3d0bc..d0465218486d93657fc9a0b61935bf19fce694ca 100644 (file)
@@ -3,31 +3,53 @@
 
 @import './_bootstrap-variables';
 
-@import '~bootstrap/scss/functions';
-@import '~bootstrap/scss/variables';
-@import '~bootstrap/scss/mixins';
-@import '~bootstrap/scss/utilities';
-
-@import '~bootstrap/scss/root';
-@import '~bootstrap/scss/reboot';
-@import '~bootstrap/scss/type';
-@import '~bootstrap/scss/grid';
-@import '~bootstrap/scss/forms';
-@import '~bootstrap/scss/buttons';
-@import '~bootstrap/scss/dropdown';
-@import '~bootstrap/scss/button-group';
-@import '~bootstrap/scss/nav';
-@import '~bootstrap/scss/card';
-@import '~bootstrap/scss/accordion';
-@import '~bootstrap/scss/alert';
-@import '~bootstrap/scss/close';
-@import '~bootstrap/scss/modal';
-@import '~bootstrap/scss/tooltip';
-@import '~bootstrap/scss/popover';
-@import '~bootstrap/scss/spinners';
-
-@import '~bootstrap/scss/helpers';
-@import '~bootstrap/scss/utilities/api';
+@import 'bootstrap/scss/functions';
+@import 'bootstrap/scss/variables';
+@import 'bootstrap/scss/maps';
+@import 'bootstrap/scss/mixins';
+@import 'bootstrap/scss/utilities';
+
+@import 'bootstrap/scss/root';
+@import 'bootstrap/scss/reboot';
+@import 'bootstrap/scss/type';
+@import 'bootstrap/scss/grid';
+@import 'bootstrap/scss/forms';
+@import 'bootstrap/scss/buttons';
+@import 'bootstrap/scss/transitions';
+@import 'bootstrap/scss/dropdown';
+@import 'bootstrap/scss/button-group';
+@import 'bootstrap/scss/nav';
+@import 'bootstrap/scss/card';
+@import 'bootstrap/scss/accordion';
+@import 'bootstrap/scss/alert';
+@import 'bootstrap/scss/close';
+@import 'bootstrap/scss/modal';
+@import 'bootstrap/scss/tooltip';
+@import 'bootstrap/scss/popover';
+@import 'bootstrap/scss/spinners';
+
+@import 'bootstrap/scss/helpers';
+@import 'bootstrap/scss/utilities/api';
+
+body {
+  --bs-border-color-translucent: #{pvar(--inputBorderColor)};
+}
+
+.accordion {
+  --bs-accordion-color: #{pvar(--mainForegroundColor)};
+  --bs-accordion-bg: #{pvar(--mainBackgroundColor)};
+
+  --bs-accordion-btn-color: var(--bs-accordion-color);
+  --bs-accordion-btn-bg: var(--bs-accordion-bg);
+}
+
+.popover {
+  --bs-popover-bg: #{pvar(--mainBackgroundColor)};
+  --bs-popover-body-color: #{pvar(--mainForegroundColor)};
+  --bs-popover-header-color: #{pvar(--mainForegroundColor)};
+
+  font-family: $main-fonts;
+}
 
 .flex-auto {
   flex: auto;
@@ -42,9 +64,9 @@
 // ---------------------------------------------------------------------------
 
 .dropdown-menu {
-  font-size: 15px;
-  color: pvar(--mainForegroundColor);
-  background-color: pvar(--mainBackgroundColor);
+  --bs-dropdown-link-hover-bg: #{pvar(--mainBackgroundHoverColor)};
+  --bs-dropdown-link-color: #{pvar(--mainForegroundColor)};
+  --bs-dropdown-border-color: #{pvar(--inputBorderColor)};
 
   .dropdown-header {
     @include padding-left(1rem);
   margin: 0.3rem 0;
 }
 
+// ---------------------------------------------------------------------------
+// Alert
+// ---------------------------------------------------------------------------
+
+.alert {
+  p:last-child {
+    margin-bottom: 0;
+  }
+}
+
 // ---------------------------------------------------------------------------
 // Modal
 // ---------------------------------------------------------------------------
     my-global-icon {
       @include icon(22px);
 
-      position: relative;
-      top: 5px;
-      float: right;
-
-      margin: 0;
-      padding: 0;
       opacity: 0.5;
 
-      &[iconName=cross] { /* stylelint-disable-line selector-max-compound-selectors */
-        @include icon(16px);
-
-        top: -3px;
+      &:hover {
+        opacity: 0.8;
       }
     }
   }
   display: flex !important;
   align-items: center;
   height: 30px !important;
-  padding: 10px 15px !important;
 }
 
 .nav.nav-pills {
   font-weight: $font-semibold !important;
 
   .nav-link {
-    opacity: 0.6 !important;
+    opacity: 0.7 !important;
 
     &.active,
     &:hover,
   font-weight: $font-semibold;
   border: 0;
   border-bottom: 2px solid transparent;
-  opacity: 0.6;
+  opacity: 0.7;
 
   &.active {
     color: pvar(--mainForegroundColor);
   border-color: #dee2e6;
 }
 
-.collapse-transition {
-  // Animation when we show/hide the filters
-  transition: max-height 0.3s;
-  display: block !important;
-  overflow: hidden !important;
-  max-height: 0;
+.accordion-button {
+  font-size: 18px;
+
+  &:not(.collapsed) {
+    font-weight: $font-bold;
 
-  &.show {
-    max-height: 1500px;
-    overflow: inherit !important;
+    my-global-icon {
+      color: pvar(--mainColorLighter);
+    }
   }
 }
 
 // Buttons & form controls
 // ---------------------------------------------------------------------------
 
+.btn:not(.btn-sm) {
+  font-size: $button-font-size;
+  line-height: 1.2;
+}
+
 .btn-outline-secondary {
-  border-color: $input-border-color;
+  border-color: pvar(--inputBorderColor);
 
   &:focus-within,
   &:focus,
 }
 
 .form-control {
-  font-size: 15px;
   color: pvar(--mainForegroundColor);
   background-color: pvar(--inputBackgroundColor);
   outline: none;
-
-  // Input box-shadow on focus
-  &:focus-within,
-  &:focus {
-    box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
-
-    &.input-error {
-      box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
-    }
-  }
 }
 
 .input-group {
   > .btn,
   > .input-group-text {
-    height: $button-height;
+    padding-top: 4px;
+    padding-bottom: 4px;
   }
 
   > .input-group-text {
-    font-size: 15px;
     line-height: normal;
     opacity: 0.9;
   }
   .input-group-text > .dropdown-toggle {
     display: flex;
   }
+}
 
+.input-group,
+.btn-group {
   .last-in-group {
     border-top-right-radius: 3px !important;
     border-bottom-right-radius: 3px !important;
 }
 
 .has-clear {
-  position: relative;
-
   input {
     @include padding-right(1.5rem !important);
   }
 
   .form-control-clear {
-    color: rgba(0, 0, 0, 0.4);
     display: flex;
     justify-content: center;
     align-items: center;
-    position: absolute;
-    right: .5rem;
     height: 95%;
     font-size: 14px;
+    position: absolute;
+    right: .5rem;
+    opacity: 0.4;
 
     &:hover {
-      color: rgba(0, 0, 0, 0.7);
+      opacity: 0.7;
       cursor: pointer;
     }
   }
     display: none;
   }
 }
+
+.text-truncate {
+  // Prevent invalid height in parent: https://stackoverflow.com/a/22425601
+  vertical-align: top;
+}