I pushed a few simple text updates to my course learnr site today, and the style appears to be broken.
Here's an example of a page I updated and the custom style is largely ignored: https://learn.themethodsection.com/duke/702/
And here's a page that I have not re-published yet and the custom style is applied: Global health research
I did not move the css file, edit the css file, or make any changes to the YAML heading. I'm using learnr 0.10.1.
Are there any clues on these pages that might tell me why the second one applies the style, but the first one (the updated one) does not?
grrrck
August 24, 2021, 2:33am
2
I'm fairly certain the issue you're seeing is the result of a recent-ish change in rmarkdown that is causing your custom CSS files to be loaded before the default styles rather than after . I just pushed a fix for this to learnr, would you mind trying it out and letting me know if it works for you?
# Install {learnr} from the PR branch
remotes::install_github("rstudio/learnr@tutorial-format-head-content")
rstudio:master
← rstudio:tutorial-format-head-content
opened 02:28AM - 24 Aug 21 UTC
Due to the changes in rstudio/rmarkdown#2064, the HTML dependencies for learnr t… utorials are now being added just before the closing `<head>` tag. This is generally a good thing, but these dependencies are inserted between custom CSS links and the closing head tag, causing the default CSS rules to be applied _over_ the custom rules rather than the other way around.
This PR uses the new `` placeholder to ensure that the default dependencies appear _before_ customm CSS.
Originally reported on RStudio Community: [learnr style appears to be broken on re-publish - shiny - RStudio Community](https://community.rstudio.com/t/learnr-style-appears-to-be-broken-on-re-publish/113435)
2 Likes
Thanks, @grrrck ! I appreciate your help on this.
system
Closed
August 31, 2021, 11:24am
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.