-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Description
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 in rmarkdown 2.8.
---
output:
flexdashboard::flex_dashboard:
css:
- mystyle.cssBackground
bslib allows for style overrides by specifying stylesheets in the css property in the front matter. This works when rendering html_documents (both shiny and shiny_prerendered). It also works in flexdashboard when using runtime: shiny, but not with runtime: 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
- Install
rmarkdown2.8(latest version) - Create an RMarkdown document with the following code
---
title: "bslib css overrides"
runtime: shiny_prerendered
output:
flexdashboard::flex_dashboard:
css:
- https://unpkg.com/nes.css@latest/css/nes.min.css
---
```{r, context="server"}
print("Hello World")
``` #end- Note the NES stylesheet changes the cursor, but the default
cosmotheme overrides the font, for example.
Metadata
Metadata
Assignees
Labels
No labels



