st_css: Include *summarytools*' _css_ Into Active Document

View source: R/st_css.R

st_cssR Documentation

Include summarytools' css Into Active Document

Description

Generate the css needed by summarytools in html documents.

Usage

st_css(main = TRUE, global = FALSE, bootstrap = FALSE, style.tag = TRUE, ...)

Arguments

main

Logical. Include summarytools.css file. TRUE by default. This will affects only summarytools objects, for one exception: two properties of the img tag are redefined to have background-color: transparent and border: 0.

global

Logical. Include the additional summarytools-global.css file, which affects all content in the document. Provides control over objects that were not html-rendered; in particular, table widths and vertical alignment are modified to improve layout. FALSE by default.

bootstrap

Logical. Include bootstrap.min.css. FALSE by default.

style.tag

Logical. Include the opening and closing <style> tags. TRUE by default.

...

Character. Path to additional css file(s) to include.

Details

Typically the function is called right after the initial setup chunk of an R markdown document, in a chunk having options echo=FALSE and results="asis".

Value

The css file(s) content silently as a character vector, and prints (using cat()) the content.

Author(s)

Dominic Comtois, dominic.comtois@gmail.com


summarytools documentation built on May 20, 2022, 9:06 a.m.