Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use bslib's navbar Sass variables, if present #2847

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

gadenbuie
Copy link
Contributor

@gadenbuie gadenbuie commented Jan 28, 2025

bslib patches Bootstrap to add three Sass variables: $navbar-bg, $navbar-light-bg and $navbar-dark-bg (see e.g. bslib's Boostrap 5 _variables.scss file).

This PR updates pkgdown's Sass so that $pkgdown-navbar-bg and $pkgdown-navbar-bg-dark inherit the (default) values from bslib so that the same Sass variables can be used in Shiny, Quarto and pkgdown.

This change shouldn't affect anyone who is already using the pkgdown Sass variables as these will take precedence over bslib's navbar bg vars.

Fixes #2703

@jayhesselberth
Copy link
Collaborator

Could you add a news bullet? THanks

@gadenbuie
Copy link
Contributor Author

gadenbuie commented Jan 29, 2025

Could you add a news bullet? THanks

Sure! I also updated the documentation in the customise article to

  1. Inform that navbar.bg and navbar.type only take effect when template.light-switch: false.
  2. Describe the available Sass variables for selecting navbar background colors when template.light-switch: true.

@remlapmot
Copy link

This is great - this pretty much closes my request in issue #2703, so you might like to add that as a linked issue.

@jayhesselberth jayhesselberth merged commit 18cca45 into r-lib:main Jan 29, 2025
16 checks passed
@jayhesselberth
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants