-
Notifications
You must be signed in to change notification settings - Fork 300
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
bslib
stylesheet overrides do not work with shiny_prerendered
and rmarkdown
2.8
#343
Comments
This happens because, in the non- ---
title: "bslib css overrides"
runtime: shiny_prerendered
output:
flexdashboard::flex_dashboard:
theme:
version: 4
# Include the font files as well!
base_font:
google: Press Start 2P
css:
- https://unpkg.com/nes.css@latest/css/nes.min.css
---
```{r, context="server"}
print("Hello World")
``` I feel like, in the non- |
I just pushed a fix for this I believe. @joemirizio can you try the PR ? remotes::install_github("rstudio/flexdashboard#344") @cpsievert even without bslib, the CSS should be inserted after the HTML dependencies, including bootstrap. |
Thanks for looking into this! I tested with the PR version and it worked great |
Problem
Referencing stylesheets in the front matter will not override the Bootstrap theme with flexdashboard and
runtime: shiny_prerendered
. This only appears to be an issue inrmarkdown
2.8
.Background
bslib
allows for style overrides by specifying stylesheets in thecss
property in the front matter. This works when renderinghtml_document
s (bothshiny
andshiny_prerendered
). It also works inflexdashboard
when usingruntime: shiny
, but not withruntime: shiny_prerendered
.📸 Expand for visual examples of each
html_document
+runtime: shiny
html_document
+runtime: shiny_prerendered
flexdashboard::flex_dashboard
+runtime: shiny
flexdashboard::flex_dashboard
+runtime: shiny_prerendered
It appears that the theme CSS (
cosmo
in this example) is applied after the prerendered HTML is loaded, thus overriding the added rules (nes
).Steps to reproduce
rmarkdown
2.8
(latest version)cosmo
theme overrides the font, for example.The text was updated successfully, but these errors were encountered: