fix(shiny-preset): Add border and styles to page main area only #883
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.
page_navbar()
shiny preset dashboard styles addsborder-top
to the main area, but the selector matches anydiv
directly below the page container.bslib/inst/builtin/bs5/shiny/_rules.scss
Lines 135 to 144 in 33d135d
This ends up matching the shiny notification center div that's added when a notification is shown.
I've updated the selector to use
.navbar + div
, which more specifically targets the page content area.While here, I also modified the themer app so that you can use a query string
?notification-duration=0
to disable notifications, or you can use any numeric value to pick a non-default duration. This is helpful for testing, otherwise the notifications are hard to pin down for styling.