minicss 0.1.0
  • Reference
  • Articles
    • Properties
    • Selectors
    • Shiny
    • StyleSheets
    • Styles
    • Animation and Keyframes
  • Changelog

    StyleSheets

    StyleSheets.Rmd
    library(minicss)

    CSS Style Sheets

    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
    #> #marsha {
    #>     marsha: marsha;
    #>     display: none;
    #>     width: 100%;
    #> }
    #> .greg {
    #>     align-content: center;
    #>     background: #123456;
    #> }

    Contents

    • CSS Style Sheets

    Developed by mikefc.

    Site built with pkgdown 1.4.0.