fix(shiny-preset): Improve Sass variable support #1134
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1132
For
page_navbar()
, don't set CSS vars holding the default background colors if the user gave us$navbar-bg
or$navbar-{light,dark}-bg
Sass vars.For
page_sidebar()
, don't set navbar colors if the user is relying on$navbar-bg
.In the example app, switch between
page_navbar()
andpage_sidebar()
to demonstrate that$navbar-bg
sets the navbar color as expected (note thatinverse
is ignored inpage_sidebar()
).In
page_navbar()
, disable the light/dark navbar bg Sass vars to confirm that$navbar-bg
wins in both. Then re-enable light/dark bg vars and toggleinverse
to see the navbar switch between light/dark variant.