]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Increase theme compatibility
authorChocobozzz <me@florianbigard.com>
Fri, 17 Feb 2023 12:32:11 +0000 (13:32 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 17 Feb 2023 12:32:11 +0000 (13:32 +0100)
Try to use CSS variable as much as possible

client/src/app/shared/shared-main/misc/help.component.scss
client/src/app/shared/shared-main/users/user-notifications.component.scss
client/src/sass/bootstrap.scss
client/src/sass/include/_mixins.scss
client/src/sass/ng-select.scss

index f7a7fea55b4ae69c330b0540a89f21f2d93a9ac9..6ccef9f2cc4ad2bb4f4a74a5e547956c3f4c8848 100644 (file)
     max-width: 300px;
 
     .popover-body {
-      font-family: $main-fonts;
-      text-align: start;
       padding: 10px;
       font-size: 13px;
-      background-color: pvar(--mainBackgroundColor);
-      color: pvar(--mainForegroundColor);
       border-radius: 3px;
 
       p {
@@ -37,6 +33,7 @@
 
       ul {
         @include padding-left(20px);
+
         margin-bottom: 0;
       }
     }
index 12352b3b7fd505b81789e975ba776dba479dc7b1..8f4d4c7c154f1805c0fcde9e68f3a1ee893db7bd 100644 (file)
@@ -21,7 +21,7 @@
   }
 
   my-global-icon {
-    @include apply-svg-color(#333);
+    @include apply-svg-color(#{pvar(--mainForegroundColor)});
     @include margin-right(11px);
     @include margin-left(3px);
 
index 724c4ad69e9fa8a82d5a74e8e7b60a00645e1b02..7843d3be791e91bd0e6f1f97219fe88a7fcf442b 100644 (file)
 @import 'bootstrap/scss/helpers';
 @import 'bootstrap/scss/utilities/api';
 
+:root {
+  --bs-border-color-translucent: #{pvar(--inputBorderColor)};
+}
+
 .accordion {
   --bs-accordion-color: #{pvar(--mainForegroundColor)};
   --bs-accordion-bg: #{pvar(--mainBackgroundColor)};
 }
 
+.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;
 }
 // ---------------------------------------------------------------------------
 
 .dropdown-menu {
+  --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);
   }
 
   .dropdown-item {
-    color: pvar(--mainForegroundColor);
     padding: 3px 15px;
 
     &.active {
index 79d3506295cdd95cab2aea1a6320605adda7b658..2d9f9011d2f0fcff24643fbd41a68ba2fe870b8b 100644 (file)
     position: absolute;
     pointer-events: none;
     border: 5px solid rgba(0, 0, 0, 0);
-    border-top-color: #000;
+    border-top-color: pvar(--mainForegroundColor);
     margin-top: -2px;
     z-index: 100;
   }
 }
 
 @mixin progressbar($small: false) {
-  background-color: $grey-background-color;
+  background-color: pvar(--greyBackgroundColor);
   display: flex;
   height: 1rem;
   overflow: hidden;
 
   span {
     position: absolute;
-    color: $grey-foreground-color;
+    color: pvar(--greyForegroundColor);
 
     @if $small {
       top: -1px;
index e231e4fedd1cc57614022b7d5bf5a869c6f01f31..b0af4f763ef2c9fddec5291834472a9fcdf9531f 100644 (file)
@@ -1,19 +1,36 @@
 @use '_variables' as *;
 @use '_mixins' as *;
 
-$ng-select-highlight: #f2690d;
-// $ng-select-primary-text: #333 !default;
+$ng-select-highlight: pvar(--mainColor);
+$ng-select-primary-text: pvar(--mainForegroundColor);
 // $ng-select-disabled-text: #f9f9f9 !default;
 $ng-select-border: $input-border-color;
 // $ng-select-border-radius: 4px !default;
-// $ng-select-bg: #ffffff !default;
-// $ng-select-selected: lighten($ng-select-highlight, 46) !default;
-// $ng-select-marke d: lighten($ng-select-highlight, 48) !default;
+$ng-select-bg: pvar(--mainBackgroundColor);
+
+// Cannot use a CSS variable as the default them use darken on this variable
+$ng-select-selected: lighten($main-color, 40%);
+// $ng-select-selected-text: $ng-select-primary-text !default;
+
+$ng-select-marked: pvar(--mainColorLightest);
+// $ng-select-marked-text: $ng-select-primary-text !default;
+
 $ng-select-box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
-// $ng-select-placeholder: lighten($ng-select-primary-text, 40) !default;
+$ng-select-placeholder: pvar(--greyForegroundColor);
 $ng-select-height: 30px;
 $ng-select-value-padding-left: 15px;
 $ng-select-value-font-size: $form-input-font-size;
+// $ng-select-value-text: $ng-select-primary-text !default;
+
+// $ng-select-dropdown-bg: $ng-select-bg !default;
+// $ng-select-dropdown-border: $ng-select-border !default;
+// $ng-select-dropdown-optgroup-text: rgba(0, 0, 0, 0.54) !default;
+// $ng-select-dropdown-optgroup-marked: $ng-select-dropdown-optgroup-text !default;
+// $ng-select-dropdown-option-bg: $ng-select-dropdown-bg !default;
+// $ng-select-dropdown-option-text: rgba(0, 0, 0, 0.87) !default;
+$ng-select-dropdown-option-disabled: pvar(--greyForegroundColor);
+
+$ng-select-input-text: pvar(--mainForegroundColor);
 
 @import '@ng-select/ng-select/scss/default.theme';