소스 검색

Fixes #20827: fix theme toggle visibility for logo and buttons (#20835)

Anton BL 3 달 전
부모
커밋
bfba0ccaae
2개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 0 0
      netbox/project-static/dist/netbox.css
  2. 15 0
      netbox/project-static/styles/overrides/_tabler.scss

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
netbox/project-static/dist/netbox.css


+ 15 - 0
netbox/project-static/styles/overrides/_tabler.scss

@@ -162,3 +162,18 @@ pre code {
   vertical-align: .05em;
   height: auto;
 }
+
+// Theme-based visibility utilities
+// Tabler's .hide-theme-* utilities expect data-bs-theme on :root, but NetBox applies
+// it to body. These overrides use higher specificity selectors to ensure theme-based
+// visibility works correctly. The :root:not(.dummy) pattern provides the additional
+// specificity needed to override Tabler's :root:not() rules.
+:root:not(.dummy) body[data-bs-theme='light'] .hide-theme-light,
+:root:not(.dummy) body[data-bs-theme='dark'] .hide-theme-dark {
+  display: none !important;
+}
+
+:root:not(.dummy) body[data-bs-theme='dark'] .hide-theme-light,
+:root:not(.dummy) body[data-bs-theme='light'] .hide-theme-dark {
+  display: inline-flex !important;
+}

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.