Skip to content

Commit

Permalink
Close #895. Close #894. Close #882. Utilize bslib's navbar-default/na…
Browse files Browse the repository at this point in the history
…vbar-inverse support to resolve several issues with navbar theming
  • Loading branch information
cpsievert committed Feb 13, 2024
1 parent fb8b587 commit 68fb789
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shiny/ui/_navs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,12 +1060,12 @@ def layout(self, nav: Tag, content: Tag) -> TagList:
if self.position != "static-top":
nav_final.add_class(self.position)

nav_final.add_class(f"navbar-{'dark' if self.inverse else 'light'}")
# bslib supports navbar-default/navbar-inverse (which is no longer
# a thing in Bootstrap 5) in a way that's still useful, especially Bootswatch.
nav_final.add_class(f"navbar-{'inverse' if self.inverse else 'default'}")

if self.bg:
nav_final.attrs["style"] = "background-color: " + self.bg
else:
nav_final.add_class(f"bg-{'dark' if self.inverse else 'light'}")
nav_final.add_style(f"background-color: {self.bg} !important;")

content = _make_tabs_fillable(
content,
Expand Down

0 comments on commit 68fb789

Please sign in to comment.