Browse Source

fix(scss): respect dark mode in table-head-fixed (#6026)

The sticky table header was using background-color: \$white (a fixed
SCSS variable), so dark mode left it as white-text-on-white-background.

Swaps the fixed colour for Bootstrap's CSS variables so the sticky
header tracks the active colour scheme automatically:

- background-color: var(--bs-body-bg, #{\$white})
- box-shadow inset: var(--bs-border-color, ...)

The fallback to the SCSS defaults preserves behaviour if AdminLTE is
consumed without Bootstrap's CSS variables in scope.
Aigars Silkalns 20 giờ trước cách đây
mục cha
commit
99417332f0
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      src/scss/_table.scss

+ 4 - 4
src/scss/_table.scss

@@ -8,17 +8,17 @@
   }
 
   // fixed table head
+  // Uses Bootstrap CSS variables so the sticky header follows light/dark mode
+  // automatically. Fixes #6026.
   &.table-head-fixed {
     thead tr:nth-child(1) th {
       position: sticky;
       top: 0;
       z-index: 10;
-      background-color: $white;
+      background-color: var(--bs-body-bg, #{$white});
       border-bottom: 0;
-      box-shadow: inset 0 1px 0 $table-border-color, inset 0 -1px 0 $table-border-color;
+      box-shadow: inset 0 1px 0 var(--bs-border-color, #{$table-border-color}), inset 0 -1px 0 var(--bs-border-color, #{$table-border-color});
     }
-
-    // Note: Dark table styling for fixed headers is handled by Bootstrap's built-in dark table classes
   }
 
   // no border