Skip to content

Commit

Permalink
fix(navbar): Use :where() when setting navbar bg to ensure that uti…
Browse files Browse the repository at this point in the history
…lity classes will win
  • Loading branch information
gadenbuie committed Dec 4, 2024
1 parent abf741b commit ecd2137
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inst/bs3compat/_navbar_compat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ ul.nav.navbar-nav {
background-color: $navbar-bg;
}

:where([data-bs-theme="dark"] .navbar) { @include navbar-background-dark(); }
:where([data-bs-theme="light"] .navbar, .navbar) { @include navbar-background-light(); }
[data-bs-theme="dark"] :where(.navbar) { @include navbar-background-dark(); }
[data-bs-theme="light"] :where(.navbar), :where(.navbar) { @include navbar-background-light(); }

// These are defined *after* the above rules because we want the local version
// to win without having to resort to specificity tricks.
:where(.navbar[data-bs-theme="dark"]) { @include navbar-background-dark(); }
:where(.navbar[data-bs-theme="light"]) { @include navbar-background-light(); }
:where(.navbar)[data-bs-theme="dark"] { @include navbar-background-dark(); }
:where(.navbar)[data-bs-theme="light"] { @include navbar-background-light(); }
}

// Implement bs3 navbar toggler; used in Rmd websites, i.e.
Expand Down

0 comments on commit ecd2137

Please sign in to comment.