Просмотр исходного кода

Merge branch 'master' into dev

tags/v0.3.0
Garrick Aden-Buie 6 лет назад
Родитель
Сommit
5697cc7807
2 измененных файлов: 7 добавлений и 2 удалений
  1. +3
    -1
      R/style_extra_css.R
  2. +4
    -1
      man/style_extra_css.Rd

+ 3
- 1
R/style_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`.
#' #'
#' @examples #' @examples
#' style_extra_css( #' style_extra_css(
#' ) #' )
#' @inheritParams style_xaringan #' @inheritParams style_xaringan
#' @export #' @export
style_extra_css <- function(css, outfile = "xaringan-themer.css") {
style_extra_css <- function(css, outfile = "xaringan-themer.css", append = TRUE) {
cat( cat(
"\n\n/* Extra CSS */", "\n\n/* Extra CSS */",
list2css(css), list2css(css),

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

\alias{style_extra_css} \alias{style_extra_css}
\title{Add Extra CSS Styles} \title{Add Extra CSS Styles}
\usage{ \usage{
style_extra_css(css, outfile = "xaringan-themer.css")
style_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{
Adds css elements to target \code{outfile}, typically a xaringanthemer css file. Adds css elements to target \code{outfile}, typically a xaringanthemer css file.

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