Skip to content

Commit

Permalink
Better approach for navbar colour
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed May 22, 2024
1 parent 38092ef commit e30adb6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions inst/BS5/assets/pkgdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@

/* navbar =================================================================== */

$pkgdown-navbar-bg: mix(mix($body-bg, $body-color, 95%), $primary, 98%) !default;
$pkgdown-navbar-bg-dark: mix(mix($body-bg-dark, $body-color-dark, 95%), $primary, 98%) !default;
$pkgdown-navbar-bg: null !default;

// BS navbars appears to be designed with the idea that you have a coloured
// navbar that looks the same in both light and dark mode. We prefer a mildly
// coloured navbar that's just different enough from the body to stand out.
.navbar {
background: RGBA(var(--bs-body-color-rgb), 0.1);
background: color-mix(in oklab, color-mix(in oklab, var(--bs-body-bg) 95%, var(--bs-body-color)) 98%, var(--bs-primary));
background: $pkgdown-navbar-bg;
}
[data-bs-theme="dark"] .navbar {
background: $pkgdown-navbar-bg-dark;
}

// make both the active nav and the hovered nav more clear by mixing the
// background colour with the body and primary colours respectively
Expand Down

0 comments on commit e30adb6

Please sign in to comment.