knitr::opts_chunk$set( collapse = FALSE, comment = "#>" )
library(minicss)
Style sheets are collections of multiple CSS styles.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Build a single style #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ marsha <- css_style('#marsha')$ update(marsha = 'marsha')$ update(css_prop$display$none, width = "100%") #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Create a style sheet and add the style to it #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sheet <- StyleSheet$new() sheet$append(marsha) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Directly create and add a style. # Note that the 'update' calls are on the style object, not the sheet. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sheet$add(".greg")$ update(css_prop$`align-content`$center)$ update(background = "#123456") sheet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.