add_css_caption: Add css to tableHTML's caption

View source: R/add_caption_css.R

add_css_captionR Documentation

Add css to tableHTML's caption

Description

add_css_caption will add css to a tableHTML's caption

Usage

add_css_caption(tableHTML, css)

Arguments

tableHTML

A tableHTML object created by the tableHTML function.

css

A list of two elements with the corresponding css. The first element of the list should be an atomic vector with the style definitions (e.g. background-color). The second element will be an atomic vector with the same length as the first element, which will contain the style definitions' values (e.g. red). Check the examples for more information.

Details

add_css_caption will add css to a tableHTML's caption.

Value

A tableHTML object.

Examples

tableHTML(mtcars, caption = 'This is a caption') %>% 
  add_css_caption(css = list(c('color', 'font-size'), c('blue', '50px'))) 

tableHTML(mtcars, caption = 'This is a caption') %>% 
  add_css_caption(css = list(c('color', 'font-size'), c('blue', '50px'))) %>%
  add_css_caption(css = list('background-color', 'green'))


tableHTML documentation built on April 18, 2023, 1:11 a.m.