Skip to content

Commit bfba0cc

Browse files
Fixes #20827: fix theme toggle visibility for logo and buttons (#20835)
1 parent d571835 commit bfba0cc

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

netbox/project-static/dist/netbox.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

netbox/project-static/styles/overrides/_tabler.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,18 @@ pre code {
162162
vertical-align: .05em;
163163
height: auto;
164164
}
165+
166+
// Theme-based visibility utilities
167+
// Tabler's .hide-theme-* utilities expect data-bs-theme on :root, but NetBox applies
168+
// it to body. These overrides use higher specificity selectors to ensure theme-based
169+
// visibility works correctly. The :root:not(.dummy) pattern provides the additional
170+
// specificity needed to override Tabler's :root:not() rules.
171+
:root:not(.dummy) body[data-bs-theme='light'] .hide-theme-light,
172+
:root:not(.dummy) body[data-bs-theme='dark'] .hide-theme-dark {
173+
display: none !important;
174+
}
175+
176+
:root:not(.dummy) body[data-bs-theme='dark'] .hide-theme-light,
177+
:root:not(.dummy) body[data-bs-theme='light'] .hide-theme-dark {
178+
display: inline-flex !important;
179+
}

0 commit comments

Comments
 (0)