pat-s 6 лет назад
Родитель
Сommit
ff4c364920
2 измененных файлов: 8 добавлений и 3 удалений
  1. +4
    -2
      R/write_extra_css.R
  2. +4
    -1
      man/write_extra_css.Rd

+ 4
- 2
R/write_extra_css.R Просмотреть файл

#' @param css A named list of CSS definitions each containing a named list #' @param css A named list of CSS definitions each containing a named list
#' of CSS property-value pairs, i.e. #' of CSS property-value pairs, i.e.
#' `list(".class-id" = list("css-property" = "value"))` #' `list(".class-id" = list("css-property" = "value"))`
#' @param append If `TRUE` output will be appended to `outfile`; otherwise,
#' it will overwrite the contents of `outfile`.
#' @inheritParams write_xaringan_theme #' @inheritParams write_xaringan_theme
#' @export #' @export
write_extra_css <- function(css, outfile = "xaringan-themer.css") {
write_extra_css <- function(css, outfile = "xaringan-themer.css", append = TRUE) {
cat("\n\n/* Extra CSS */", list2css(css), file = outfile, cat("\n\n/* Extra CSS */", list2css(css), file = outfile,
append = TRUE, sep = "\n")
append = append, sep = "\n")
} }


#' @inheritParams write_extra_css #' @inheritParams write_extra_css

+ 4
- 1
man/write_extra_css.Rd Просмотреть файл

\alias{write_extra_css} \alias{write_extra_css}
\title{Write Extra CSS arguments} \title{Write Extra CSS arguments}
\usage{ \usage{
write_extra_css(css, outfile = "xaringan-themer.css")
write_extra_css(css, outfile = "xaringan-themer.css", append = TRUE)
} }
\arguments{ \arguments{
\item{css}{A named list of CSS definitions each containing a named list \item{css}{A named list of CSS definitions each containing a named list
\code{list(".class-id" = list("css-property" = "value"))}} \code{list(".class-id" = list("css-property" = "value"))}}


\item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}

\item{append}{If \code{TRUE} output will be appended to \code{outfile}; otherwise,
it will overwrite the contents of \code{outfile}.}
} }
\description{ \description{
Manually adds css elements to target \code{outfile}. Manually adds css elements to target \code{outfile}.

Загрузка…
Отмена
Сохранить