Repository: gadenbuie/xaringanthemer Branch: main Commit: 5c8035bb8562 Files: 124 Total size: 781.5 KB Directory structure: gitextract_unwrwvs4/ ├── .Rbuildignore ├── .github/ │ ├── .gitignore │ └── workflows/ │ ├── R-CMD-check.yaml │ ├── pkg-maintenance.yaml │ └── pkgdown.yaml ├── .gitignore ├── DESCRIPTION ├── LICENSE ├── LICENSE.md ├── NAMESPACE ├── NEWS.md ├── R/ │ ├── color.R │ ├── css.R │ ├── ggplot2.R │ ├── style_duo.R │ ├── style_duo_accent.R │ ├── style_duo_accent_inverse.R │ ├── style_extra_css.R │ ├── style_font_default.R │ ├── style_mono_accent.R │ ├── style_mono_accent_inverse.R │ ├── style_mono_dark.R │ ├── style_mono_light.R │ ├── style_solarized_dark.R │ ├── style_solarized_light.R │ ├── style_xaringan.R │ ├── sysdata.rda │ ├── utils.R │ ├── utils_theme-gen.R │ ├── xaringanthemer-deprecated.R │ ├── xaringanthemer-package.R │ └── zzz.R ├── README.Rmd ├── README.md ├── cran-comments.md ├── data-raw/ │ └── theme_template_variables.R ├── index.Rmd ├── index.md ├── inst/ │ ├── fonts/ │ │ └── OFL.txt │ ├── resources/ │ │ ├── template.css │ │ └── template_title-slide.css │ ├── rmarkdown/ │ │ └── templates/ │ │ └── xaringanthemer/ │ │ ├── skeleton/ │ │ │ └── skeleton.Rmd │ │ └── template.yaml │ └── scripts/ │ ├── generate_theme_functions.R │ └── style_xaringan_body.R ├── make.R ├── man/ │ ├── apply_alpha.Rd │ ├── choose_dark_or_light.Rd │ ├── fragments/ │ │ ├── _colors.Rmd │ │ ├── _fonts.Rmd │ │ ├── _installation.Rmd │ │ ├── _quick-intro.Rmd │ │ ├── _tagline-gif.Rmd │ │ ├── _thanks.Rmd │ │ └── _themes.Rmd │ ├── google_font.Rd │ ├── google_language_codes.Rd │ ├── lighten_darken_color.Rd │ ├── scale_xaringan.Rd │ ├── style_duo.Rd │ ├── style_duo_accent.Rd │ ├── style_duo_accent_inverse.Rd │ ├── style_extra_css.Rd │ ├── style_mono_accent.Rd │ ├── style_mono_accent_inverse.Rd │ ├── style_mono_dark.Rd │ ├── style_mono_light.Rd │ ├── style_solarized_dark.Rd │ ├── style_solarized_light.Rd │ ├── style_xaringan.Rd │ ├── theme_xaringan.Rd │ ├── theme_xaringan_base.Rd │ ├── theme_xaringan_get_value.Rd │ ├── theme_xaringan_inverse.Rd │ ├── theme_xaringan_set_defaults.Rd │ ├── xaringanthemer-deprecated.Rd │ └── xaringanthemer-package.Rd ├── man-roxygen/ │ ├── style-usage.R │ ├── style_duo.R │ ├── style_duo_accent.R │ ├── style_duo_accent_inverse.R │ ├── style_mono_accent.R │ ├── style_mono_accent_inverse.R │ ├── style_mono_dark.R │ ├── style_mono_light.R │ ├── style_solarized_dark.R │ ├── style_solarized_light.R │ ├── style_xaringan.R │ └── theme_params.R ├── pkgdown/ │ ├── _pkgdown.yml │ └── extra.css ├── tests/ │ ├── testthat/ │ │ ├── _snaps/ │ │ │ └── utils.md │ │ ├── css/ │ │ │ ├── duo-header_bg.css │ │ │ ├── duo.css │ │ │ ├── duo_accent.css │ │ │ ├── duo_accent_inverse.css │ │ │ ├── google_fonts.css │ │ │ ├── mono_accent.css │ │ │ ├── mono_accent_inverse.css │ │ │ ├── mono_dark.css │ │ │ ├── mono_light-header_bg.css │ │ │ ├── mono_light.css │ │ │ ├── solarized_dark-header_bg.css │ │ │ ├── solarized_dark.css │ │ │ ├── solarized_light.css │ │ │ └── xaringan.css │ │ ├── helper-session.R │ │ ├── test-color.R │ │ ├── test-css.R │ │ ├── test-ggplot2.R │ │ ├── test-helpers.R │ │ ├── test-style_extra_css.R │ │ ├── test-style_xaringan.R │ │ ├── test-themes.R │ │ ├── test-utils.R │ │ └── test-xaringanthemer-deprecated.R │ └── testthat.R ├── vignettes/ │ ├── .gitignore │ ├── fonts.Rmd │ ├── ggplot2-themes.Rmd │ ├── template-variables.Rmd │ ├── themes.Rmd │ └── xaringanthemer.Rmd └── xaringanthemer.Rproj ================================================ FILE CONTENTS ================================================ ================================================ FILE: .Rbuildignore ================================================ ^.*\.Rproj$ ^\.Rproj\.user$ ^README\.Rmd$ ^LICENSE\.md$ ^make\.R$ ^vignettes/singles$ ^tests_$ ^_.+$ ^docs$ ^index\.Rmd$ ^man-roxygen$ ^tic\.R$ ^appveyor\.yml$ ^\.travis\.yml$ ^pkgdown$ ^vignettes/fonts\.Rmd$ ^vignettes/themes\.Rmd$ ^data-raw$ ^.history$ ^doc$ ^Meta$ ^index\.md$ ^\.ccache$ ^\.github$ ^clang-.* ^gfortran.* ^cran-comments\.md$ ^CRAN-RELEASE$ ^CRAN-SUBMISSION$ ================================================ FILE: .github/.gitignore ================================================ r-depends.rds *.html ================================================ FILE: .github/workflows/R-CMD-check.yaml ================================================ # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: branches: [main, master] pull_request: branches: [main, master] name: R-CMD-check jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.os }} (${{ matrix.config.r }}) strategy: fail-fast: false matrix: config: - {os: macOS-latest, r: 'release'} - {os: windows-latest, r: 'release'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} - {os: ubuntu-latest, r: 'oldrel-1'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - uses: actions/checkout@v2 - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck needs: check - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true ================================================ FILE: .github/workflows/pkg-maintenance.yaml ================================================ on: pull_request: push: branches: main name: Package Maintenance jobs: auto-pkg-maintenance: uses: rstudio/education-workflows/.github/workflows/auto-pkg-maintenance.yaml@v1 with: extra-packages: any::showtext, any::sysfonts, any::ggplot2 ================================================ FILE: .github/workflows/pkgdown.yaml ================================================ # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: branches: [main, master] pull_request: branches: [main, master] release: types: [published] workflow_dispatch: name: pkgdown jobs: pkgdown: runs-on: ubuntu-latest # Only restrict concurrency for non-PR jobs concurrency: group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 with: use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::pkgdown, local::. needs: website - name: Build site run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' uses: JamesIves/github-pages-deploy-action@4.1.4 with: clean: false branch: gh-pages folder: docs ================================================ FILE: .gitignore ================================================ .Rproj.user .Rhistory .RData .Ruserdata inst/doc _tests _stuff .DS_Store README.html # vscode .history/ # Directories that start with _ /_*/ ## https://github.com/github/gitignore/blob/master/R.gitignore # History files .Rhistory .Rapp.history # Session Data files .RData # Example code in package build process *-Ex.R # Output files from R CMD build /*.tar.gz # Output files from R CMD check /*.Rcheck/ # RStudio files .Rproj.user/ # produced vignettes vignettes/*.html vignettes/*.pdf # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 .httr-oauth # knitr and R markdown default cache directories /*_cache/ /cache/ # Temporary files created by R markdown *.utf8.md *.knit.md # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html rsconnect/ ## https://github.com/github/gitignore/blob/master/Global/macOS.gitignore # General .DS_Store .AppleDouble .LSOverride # Icon must end with two \r Icon # Thumbnails ._* # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk doc Meta docs/ ================================================ FILE: DESCRIPTION ================================================ Type: Package Package: xaringanthemer Title: Custom 'xaringan' CSS Themes Version: 0.4.4.9000 Authors@R: person("Garrick", "Aden-Buie", , "garrick@adenbuie.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7111-0077")) Description: Create beautifully color-coordinated and customized themes for your 'xaringan' slides, without writing any CSS. Complete your slide theme with 'ggplot2' themes that match the font and colors used in your slides. Customized styles can be created directly in your slides' 'R Markdown' source file or in a separate external script. License: MIT + file LICENSE URL: https://pkg.garrickadenbuie.com/xaringanthemer/, https://github.com/gadenbuie/xaringanthemer BugReports: https://github.com/gadenbuie/xaringanthemer/issues Depends: R (>= 2.10) Imports: colorspace, glue, methods, purrr, utils, whisker Suggests: callr, ggplot2, knitr, mockery, rmarkdown, scales, showtext, sysfonts, testthat (>= 2.1.0), xaringan VignetteBuilder: knitr Config/Needs/website: gadenbuie/grkgdown, pkgdown Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 ================================================ FILE: LICENSE ================================================ YEAR: 2025 COPYRIGHT HOLDER: Garrick Aden-Buie ================================================ FILE: LICENSE.md ================================================ # MIT License Copyright (c) 2020 Garrick Aden-Buie Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: NAMESPACE ================================================ # Generated by roxygen2: do not edit by hand S3method(print,google_font) S3method(print,xaringanthemer_default) export(apply_alpha) export(choose_dark_or_light) export(darken_color) export(duo) export(duo_accent) export(duo_accent_inverse) export(google_font) export(google_language_codes) export(lighten_color) export(mono_accent) export(mono_accent_inverse) export(mono_dark) export(mono_light) export(scale_xaringan_color_continuous) export(scale_xaringan_color_discrete) export(scale_xaringan_colour_continuous) export(scale_xaringan_colour_discrete) export(scale_xaringan_continuous) export(scale_xaringan_discrete) export(scale_xaringan_fill_continuous) export(scale_xaringan_fill_discrete) export(solarized_dark) export(solarized_light) export(style_duo) export(style_duo_accent) export(style_duo_accent_inverse) export(style_extra_css) export(style_mono_accent) export(style_mono_accent_inverse) export(style_mono_dark) export(style_mono_light) export(style_solarized_dark) export(style_solarized_light) export(style_xaringan) export(theme_xaringan) export(theme_xaringan_base) export(theme_xaringan_get_value) export(theme_xaringan_inverse) export(theme_xaringan_restore_defaults) export(theme_xaringan_set_defaults) export(write_extra_css) export(write_xaringan_theme) export(xaringanthemer_font_default) importFrom(grDevices,col2rgb) importFrom(grDevices,hsv) importFrom(grDevices,rgb) importFrom(grDevices,rgb2hsv) ================================================ FILE: NEWS.md ================================================ # xaringanthemer (development version) # xaringanthemer 0.4.4 - `scale_xaringan_continuous()` and `scale_xaringan_discrete()` now set `na.value = "grey50"` by default for compatibility with ggplot2 > 3.5.2 (thanks @teunbrand, #82). # xaringanthemer 0.4.3 - Update the spelling of `colour` for compatibility with ggplot2 >= 3.5.1 (@teunbrand #79). # xaringanthemer 0.4.2 - Use `.table-unshaded` class on a tables to prevent xaringanthemer's table heading and row shading (thanks @dragonattheend, #74) - Use `inverse_text_color` as the default for `inverse_header_color` in most places (#60) - Fixed a bug that happened when providing named values for key theme colors (#62) - Re-document for CRAN # xaringanthemer 0.4.1 * Text alignment in code blocks in `left`, `center`, or `right` aligned slides no longer matches the slide text. Instead, the code block width is reduced, if possible, and the block is pushed to the left, center, or right using margins (#68). * The style functions are now more permissive about color names in the `color` argument. Color names should be valid CSS classes that can also be used as CSS variable names, but the `style_` function only stops with an error if the color name contains spaces. (@jdlom #69) * Fixed an issue that caused problems rendering the xaringanthemer R Markdown template if the showtext package isn't installed (thanks @beatrizmilz, #65). # xaringanthemer 0.4.0 * Added `text_bold_font_weight` argument to xaringanthemer style functions with a corresponding CSS rule setting the `font-weight` property of `` elements (thanks @matiasandina, #50). * The style functions gain a `link_decoration` argument to set the [`text-decoration`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) property for links (#57). * Set slide number font size in `rem` so that increasing the font size at the slide level doesn't result in giant slide numbers (#53). * The xaringanthemer slide skeleton (R Markdown template) will now render when packages that are used in the template but not in xaringanthemer's Imports are not installed (#52). * xaringanthemer no longer sets the `fig.showtext` chunk option when the showtext package isn't installed and also when `fig.showtext = FALSE` (thanks @mikedecr #36, #56). # xaringanthemes 0.3.4 * Maintenance release to avoid issues with upcoming R 4.1.0 (#49) # xaringanthemer 0.3.3 * Add `inverse_link_color` to control color of links on inverse slides (thanks @dmi3kno, #44) * .pull-right[] now clears floats just for its immediate sibling * Add `header_font_family_fallback` to control fallback fonts for headings (thanks @mattwarkentin, #41) * New xaringanthemer presentation skeleton with a kitchen sink of typical slide elements with the goal of making it easier to preview new themes during development. # xaringanthemer 0.3.0 * Adds `theme_xaringan()`, a ggplot2 theme that automatically uses the colors and font styles of your xaringanthemer style. Also adds `scale_xaringan_discrete()` and `scale_xaringan_continuous()` functions that use your slides' primary colors for the color or fill aesthetics. These theme functions can recover the primary colors used in a xaringanthemer (>= 0.3.0) CSS file even if you don't call the style function directly in your slides. * Renamed all xaringanthemer functions that create CSS styles to use the prefix "`style_`". For example, `mono_light()` is now `style_mono_light()`. Additionally, `write_xaringan_theme()` is now `style_xaringan()` and `write_extra_css()` is `style_extra_css()`. Overall, this change makes the xarignanthemer API much cleaner and easier to navigate. Previous function names are deprecated but still work. * Added `background_header_auto` parameter that adds a background under the first `h1` element (i.e. `# Slide Title`) on a slide. When enabled, the background is added automatically to slides, as long as they aren't `inverse`, `center`, `middle`, or `bottom`-styled slides. When disabled, you can still enable slide title headers by adding the `header_background` class to a slide. (thanks, @Btibert3, #10) * The underlying template now uses the `whisker` package. * xaringanthemer styles now use CSS variables throughout. Most of the settings used in defining a style are stored in CSS variables. The variable names are documented in their corresponding arguments. For example, the color selected for `background_color` is stored in the variable `--background-color`. These variables can be used in custom CSS rules or in other arguments in any style functions, for example as `var(--background-color)`. * xaringanthemer now uses a different set of default fonts for heading and body fonts. The new defaults use [Cabin](https://fonts.google.com/specimen/Cabin) for headings and [Noto Sans](https://fonts.google.com/specimen/Noto+Sans) for body text. These fonts are easier to read on screens and at a distance during presentations, and they support a wide variety of languages and weights. Another reason for the change is that the xaringan (remarkjs) default body font, _Droid Serif_, is no longer officially included in Google Fonts. * Additional colors can be provided in the `colors` argument, which takes a named vector of colors. The names become both CSS classes and CSS variables that can be used throughout your slide styles. For example, `colors = c(red = "#d34213")` creates a `.red` CSS class for red foreground text, a `.bg-red` CSS class for a red background, and a `--red` CSS variable that can be referenced as `var(--red)` in any `_color` argument of your style function. ## Bugfixes and Improvements * Better handling of multiple `extra_fonts`, including improved error messages. (Thanks @pat-s, #19). * `style_extra_css()` (previously `write_extra_css()`) gained an `append` argument so that it can append to or overwrite an existing file (thanks @pat-s, #17). * The underlying tibble holding the theme template variables was updated to work with `tibble 3.0.0` (thanks @techisdead, @SymbolixAU, #32). * The `css-help` vignette was removed and may be re-written in the future. * Style function arguments that accept CSS property values are now documented in the argument documentation, including a link to the MDN web docs page for the CSS property or value (#33, thanks @TrashBirdEcology #18). * Style functions return the CSS text directly when `outfile = NULL`. ================================================ FILE: R/color.R ================================================ #' @title Generate lighter or darker version of a color #' @description Produces a linear blend of the color with white or black. #' @param color_hex A character string representing a hex color #' @param strength The "strength" of the blend with white or black, #' where 0 is entirely the original color and 1 is entirely white #' (`lighten_color()`) or black (`darken_color()`). #' @examples #' blue <- "#0e6ba8" #' blue_light <- lighten_color(blue, strength = 0.33) #' blue_dark <- darken_color(blue, strength = 0.33) #' #' if (requireNamespace("scales", quietly = TRUE)) { #' scales::show_col(c(blue_light, blue, blue_dark)) #' } #' @return A character string with the lightened or darkened color in #' hexadecimal format. #' @name lighten_darken_color NULL #' @rdname lighten_darken_color #' @export lighten_color <- function(color_hex, strength = 0.7) { stopifnot(strength >= 0 && strength <= 1) color_rgb <- col2rgb(color_hex)[, 1] color_rgb <- (1 - strength) * color_rgb + strength * 255 rgb(color_rgb[1], color_rgb[2], color_rgb[3], maxColorValue = 255) } #' @rdname lighten_darken_color #' @export darken_color <- function(color_hex, strength = 0.8) { stopifnot(strength >= 0 && strength <= 1) color_rgb <- col2rgb(color_hex)[, 1] color_rgb <- (1 - strength) * color_rgb rgb(color_rgb[1], color_rgb[2], color_rgb[3], maxColorValue = 255) } #' @title Add alpha to hex color #' @description Applies alpha (or opacity) to a color in hexadecimal form by #' converting opacity in the `[0, 1]` range to hex in the `[0, 255]` range #' and appending to the hex color. #' @inheritParams lighten_darken_color #' @param opacity Desired opacity of the output color #' @examples #' blue <- "#0e6ba8" #' blue_transparent <- apply_alpha(blue) #' #' if (requireNamespace("scales", quietly = TRUE)) { #' scales::show_col(c(blue, blue_transparent)) #' } #' @return A character string with added opacity level as hexadecimal characters. #' @export apply_alpha <- function(color_hex, opacity = 0.5) { paste0(color_hex, as.hexmode(round(255 * opacity, 0))) } adjust_value_color <- function(color_hex, strength = 0.5) { color_hsv <- rgb2hsv(col2rgb(color_hex))[, 1] color_hsv["v"] <- strength hsv(color_hsv[1], color_hsv[2], color_hsv[3]) } #' Choose dark or light color #' #' Takes a color input as `x` and returns either the black or white color (or #' expression) if dark or light text should be used over the input color for #' best contrast. Follows W3C Recommendations. #' #' @references #' @param x The background color (hex) #' @param black Text or foreground color, e.g. "#222" or #' `substitute(darken_color(x, 0.8))`, if black text provides the best contrast. #' @param white Text or foreground color or expression, e.g. "#EEE" or #' `substitute(lighten_color(x, 0.8))`, if white text provides the best contrast. #' @examples #' light_green <- "#c4d6b0" #' contrast_green <- choose_dark_or_light(light_green) #' dark_purple <- "#381d2a" #' contrast_purple <- choose_dark_or_light(dark_purple) #' #' if (requireNamespace("scales", quietly = TRUE)) { #' scales::show_col(c(light_green, contrast_green, dark_purple, contrast_purple)) #' } #' @return The `black` color or `white` color according to which color provides #' the greates contrast with the input color. #' #' @export choose_dark_or_light <- function(x, black = "#000000", white = "#FFFFFF") { if (is_light_color(x)) eval(black) else eval(white) } is_light_color <- function(x) { # this function returns TRUE if the given color # is light-colored and requires dark text color_rgb <- col2rgb(x)[, 1] # from https://stackoverflow.com/a/3943023/2022615 color_rgb <- color_rgb / 255 color_rgb[color_rgb <= 0.03928] <- color_rgb[color_rgb <= 0.03928] / 12.92 color_rgb[color_rgb > 0.03928] <- ((color_rgb[color_rgb > 0.03928] + 0.055) / 1.055)^2.4 lum <- t(c(0.2126, 0.7152, 0.0722)) %*% color_rgb lum[1, 1] > 0.179 } prepare_colors <- function(colors = NULL) { if (is.null(colors) || length(colors) < 1) return(NULL) if (is.null(names(colors))) { stop( "`colors` must have names corresponding to valid CSS classes", call. = FALSE ) } if (any(grepl("\\s", names(colors)))) { stop( "Color names in `colors` must be valid CSS classes", " and cannot contain spaces", call. = FALSE) } maybe_bad_css <- unique(grep("^[_-]|[ .>~*:|+}/]", names(colors), value = TRUE)) if (length(maybe_bad_css) > 0) { warning( "Color names in `colors` should be valid CSS classes: ", paste0("'", maybe_bad_css, "'", collapse = ", "), call. = FALSE ) } whisker::iteratelist(colors, "color_name") } full_length_hex <- function(x) { varname <- substitute(x) bad_hex_msg <- str_wrap( "`", deparse(varname), "` is not a hexadecimal color: \"", x, "\". ", "theme_xaringan() requires colors to be specified in hexadecimal format.", " If you used valid CSS colors in your xaringan theme, please convert ", "these colors to hex format, e.g. \"#1a2b3c\"." ) check_color_is_hex(x, stop, bad_hex_msg) x <- sub("^#", "", x) if (nchar(x) == 3) { x <- strsplit(x, character(0))[[1]] x <- rep(x, each = 2) x <- paste(x, collapse = "") } paste0("#", x) } check_color_is_hex <- function( color, throw = warning, msg = "{color} is not a hexadecimal color" ) { is_probably_hex <- grepl("^#", color) && !grepl("[^#0-9a-fA-F]", color) && nchar(sub("^#", "", color)) %in% c(3, 6) if (!is_probably_hex) { msg <- glue::glue(msg) if (!is.null(throw)) throw(str_wrap(msg), call. = FALSE) } is_probably_hex } ================================================ FILE: R/css.R ================================================ read_css_vars <- function(file = NULL) { if (is.null(file)) { css_candidates <- find_xaringan_themer_css() file <- choose_xaringan_themer_css(css_candidates) } css_get_root(file) } find_xaringan_themer_css <- function() { # finds xaringan themer files within or below current working directory # and is only ever intended to be called in that situation css_files <- list.files(pattern = "css$", recursive = TRUE, full.names = TRUE) css_files_head <- purrr::map(css_files, readLines, n = 5) is_xt <- grepl(pattern = "generated by xaringanthemer", css_files_head, fixed = TRUE) css_files[is_xt] } choose_xaringan_themer_css <- function(css_candidates = character(0)) { if (!length(css_candidates)) { stop("Unable to locate a xaringanthemer css file.", call. = FALSE) } else if (length(css_candidates) == 1) { file <- css_candidates } else if (length(css_candidates) > 1) { is_xaringan_themer_css <- grepl("xaringan-themer.css", css_candidates, fixed = TRUE) if (any(is_xaringan_themer_css)) { file <- css_candidates[is_xaringan_themer_css][1] } else { file <- css_candidates[1] message(glue::glue("Using xaringanthemer theme in {file}")) } } file } css_get_root <- function(file) { x <- readLines(file, warn = FALSE) x <- paste(x, collapse = "\n") where <- regexpr(":root\\s*\\{[^}]+\\}", x) if (where < 0) return(NULL) x <- substr(x, where, where + attr(where, "match.length")) x <- strsplit(x, "\n")[[1]] m <- regexec("--(.+):\\s*(.+?);", x) x <- regmatches(x, m) x <- purrr::compact(x) vars <- gsub("-", "_", purrr::map_chr(x, `[`, 2)) values <- purrr::map(x, `[`, 3) names(values) <- vars for (font_type in c("text", "header", "code")) { font_is_google <- paste0(font_type, "_font_is_google") values[[font_is_google]] <- if (!is.null(values[[font_is_google]])) { values[[font_is_google]] %in% c("1", "TRUE", "true", "yes") } else FALSE } values } css_get_padding <- function(x) { stopifnot(length(x) == 1) x <- trimws(x) x <- as.list(strsplit(x, " ")[[1]]) stopifnot(length(x) %in% c(1, 2, 4)) names(x) <- c("top", "right", "bottom", "left")[seq_along(x)] list( top = x$top, right = x$right %||% x$top, bottom = x$bottom %||% x$top, left = x$left %||% x$right %||% x$top ) } ================================================ FILE: R/ggplot2.R ================================================ #' A Plot Theme for ggplot2 by xaringanthemer #' #' @description #' #' `r lifecycle::badge("maturing")` #' #' Creates \pkg{ggplot2} themes to match the xaringanthemer theme used in the #' \pkg{xaringan} slides that seamlessly matches the "normal" slide colors and #' styles. See `vignette("ggplot2-themes")` for more information and examples. #' #' @param text_color Color for text and foreground, inherits from `text_color` #' @param background_color Color for background, inherits from #' `background_color` #' @param accent_color Color for titles and accents, inherits from #' `header_color` #' @param accent_secondary_color Color for secondary accents, inherits from #' `text_bold_color` #' @param css_file Path to a \pkg{xaringanthemer} CSS file, from which the #' theme variables and values will be inferred. In general, if you use the #' \pkg{xaringathemer} defaults, you will not need to set this. This feature #' lets you create a \pkg{ggplot2} theme for your \pkg{xaringan} slides, even #' if you have only saved your theme CSS file and you aren't creating your #' CSS theme with \pkg{xaringanthemer} in your slides' source file. #' @inheritParams theme_xaringan_base #' #' @examples #' # Requires ggplot2 #' has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) #' #' if (has_ggplot2) { #' # Because this is an example, we'll save the CSS to a temp file #' path_to_css_file <- tempfile(fileext = ".css") #' #' # Create the xaringan theme: dark blue background with teal green accents #' style_duo( #' primary_color = "#002b36", #' secondary_color = "#31b09e", #' # Using basic fonts for this example, but the plot theme will #' # automatically use your theme font if you use Google fonts #' text_font_family = "sans", #' header_font_family = "serif", #' outfile = path_to_css_file #' ) #' #' library(ggplot2) #' ggplot(mpg) + #' aes(cty, hwy) + #' geom_point() + #' ggtitle("Fuel Efficiency of Various Cars") + #' theme_xaringan() #' } #' @return A ggplot2 theme #' @family xaringanthemer ggplot2 themes #' @export theme_xaringan <- function( text_color = NULL, background_color = NULL, accent_color = NULL, accent_secondary_color = NULL, css_file = NULL, set_ggplot_defaults = TRUE, text_font = NULL, text_font_use_google = NULL, text_font_size = NULL, title_font = NULL, title_font_use_google = NULL, title_font_size = NULL, use_showtext = NULL ) { requires_xaringanthemer_env(css_file = css_file, try_css = TRUE) requires_package(fn = "xaringan_theme") background_color <- background_color %||% xaringanthemer_env$background_color text_color <- text_color %||% xaringanthemer_env$text_color accent_color <- accent_color %||% xaringanthemer_env$header_color accent_secondary_color <- accent_secondary_color %||% xaringanthemer_env$text_bold_color %||% accent_color theme_xaringan_base( text_color, background_color, accent_color = accent_color, accent_secondary_color = accent_secondary_color, set_ggplot_defaults = set_ggplot_defaults, text_font = text_font, text_font_use_google = text_font_use_google, text_font_size = text_font_size, title_font = title_font, title_font_use_google = title_font_use_google, title_font_size = title_font_size, use_showtext = use_showtext ) } #' An Inverse Plot Theme for ggplot2 by xaringanthemer #' #' @description #' #' `r lifecycle::badge("maturing")` #' #' A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse" #' \pkg{xaringan} slide colors and styles as styled by [xaringanthemer]. See #' `vignette("ggplot2-themes")` for more information and examples. #' #' @param text_color Color for text and foreground, inherits from `text_color` #' @param background_color Color for background, inherits from #' `background_color` #' @param accent_color Color for titles and accents, inherits from #' `header_color` #' @param accent_secondary_color Color for secondary accents, inherits from #' `text_bold_color` #' @inheritParams theme_xaringan #' @inheritParams theme_xaringan_base #' #' @examples #' # Requires ggplot2 #' has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) #' #' if (has_ggplot2) { #' # Because this is an example, we'll save the CSS to a temp file #' path_to_css_file <- tempfile(fileext = ".css") #' #' # Create the xaringan theme: dark blue background with teal green accents #' style_duo( #' primary_color = "#002b36", #' secondary_color = "#31b09e", #' # Using basic fonts for this example, but the plot theme will #' # automatically use your theme font if you use Google fonts #' text_font_family = "sans", #' header_font_family = "serif", #' outfile = path_to_css_file #' ) #' #' library(ggplot2) #' ggplot(mpg) + #' aes(cty, hwy) + #' geom_point() + #' ggtitle("Fuel Efficiency of Various Cars") + #' # themed to match the inverse slides: teal background with dark blue text #' theme_xaringan_inverse() #' } #' @return A ggplot2 theme #' @family xaringanthemer ggplot2 themes #' @export theme_xaringan_inverse <- function( text_color = NULL, background_color = NULL, accent_color = NULL, accent_secondary_color = NULL, css_file = NULL, set_ggplot_defaults = TRUE, text_font = NULL, text_font_use_google = NULL, text_font_size = NULL, title_font = NULL, title_font_use_google = NULL, title_font_size = NULL, use_showtext = NULL ) { requires_xaringanthemer_env(css_file = css_file, try_css = TRUE) requires_package(fn = "xaringan_theme") background_color <- background_color %||% xaringanthemer_env$inverse_background_color text_color <- text_color %||% xaringanthemer_env$inverse_text_color accent_color <- accent_color %||% xaringanthemer_env$inverse_header_color accent_secondary_color <- accent_secondary_color %||% accent_color theme_xaringan_base( text_color, background_color, accent_color = accent_color, accent_secondary_color = accent_secondary_color, set_ggplot_defaults = set_ggplot_defaults, text_font = text_font, text_font_use_google = text_font_use_google, text_font_size = text_font_size, title_font = title_font, title_font_use_google = title_font_use_google, title_font_size = title_font_size, use_showtext = use_showtext ) } #' The ggplot2 xaringanthemer base plot theme #' #' @description #' #' `r lifecycle::badge("maturing")` #' #' Provides a base plot theme for \pkg{ggplot2} to match the \pkg{xaringan} #' slide theme created by [xaringanthemer]. The theme is designed to create a #' general plot style from two colors, a `background_color` and a `text_color` #' (or foreground color). Also accepts an `accent_color` and an #' `accent_secondary_color` that are [xaringanthemer] is not required for the #' base theme. Use [theme_xaringan()] or [theme_xaringan_inverse()] in xaringan #' slides styled by xaringanthemer for a plot theme that matches the slide #' style. See `vignette("ggplot2-themes")` for more information and examples. #' #' @param text_color Color for text and foreground #' @param background_color Color for background #' @param accent_color Color for titles and accents, inherits from #' `header_color` or `text_color`. Used for the `title` base setting in #' [ggplot2::theme()], and additionally for setting the `color` or `fill` of #' \pkg{ggplot2} geom defaults. #' @param accent_secondary_color Color for secondary accents, inherits from #' `text_bold_color` or `accent_color`. Used only when setting \pkg{ggplot2} geom #' defaults. #' @param set_ggplot_defaults Should defaults be set for \pkg{ggplot2} _geoms_? #' Defaults to TRUE. To restore ggplot's defaults, or the previously set geom #' defaults, see [theme_xaringan_restore_defaults()]. #' @param text_font Font to use for text elements, passed to #' [sysfonts::font_add_google()], if available and `text_font_use_google` is #' `TRUE`. Inherits from `text_font_family`. If manually specified, can be a #' [google_font()]. #' @param text_font_use_google Is `text_font` available on [Google #' Fonts](https://fonts.google.com)? #' @param text_font_size Base text font size, inherits from `text_font_size`, or #' defaults to 11. #' @param title_font Font to use for title elements, passed to #' [sysfonts::font_add_google()], if available and `title_font_use_google` is #' `TRUE`. Inherits from `title_font_family`. If manually specified, can be a #' [google_font()]. #' @param title_font_use_google Is `title_font` available on [Google #' Fonts](https://fonts.google.com)? #' @param title_font_size Base text font size, inherits from `title_font_size`, #' or defaults to 14. #' @param use_showtext If `TRUE` the \pkg{showtext} package will be #' used to register Google fonts. Set to `FALSE` to disable this feature #' entirely, which may result in errors during plotting if the fonts used are #' not available locally. The default is `TRUE` when the \pkg{showtext} #' package is installed. #' @param ... Ignored #' #' @examples #' # Requires ggplot2 #' has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) #' #' if (has_ggplot2) { #' library(ggplot2) #' #' plot1 <- ggplot(mpg) + #' aes(cty, hwy) + #' geom_point() + #' theme_xaringan_base( #' text_color = "#602f6b", # imperial #' background_color = "#f8f8f8", # light gray #' accent_color = "#317873", # myrtle green #' title_font = "sans", #' text_font = "serif", #' set_ggplot_defaults = TRUE #' ) + #' labs( #' title = "Fuel Efficiency of Various Cars", #' subtitle = "+ theme_xaringan_base()", #' caption = "xaringanthemer" #' ) #' #' print(plot1) #' #' plot2 <- ggplot(mpg) + #' aes(hwy) + #' geom_histogram(binwidth = 2) + #' theme_xaringan_base( #' text_color = "#a8a9c8", # light purple #' background_color = "#303163", # deep slate purple #' accent_color = "#ffff99", # canary yellow #' title_font = "sans", #' text_font = "serif", #' set_ggplot_defaults = TRUE #' ) + #' labs( #' title = "Highway Fuel Efficiency", #' subtitle = "+ theme_xaringan_base()", #' caption = "xaringanthemer" #' ) #' #' print(plot2) #' } #' @return A ggplot2 theme #' @family xaringanthemer ggplot2 themes #' @export theme_xaringan_base <- function( text_color, background_color, ..., set_ggplot_defaults = TRUE, accent_color = NULL, accent_secondary_color = NULL, text_font = NULL, text_font_use_google = NULL, text_font_size = NULL, title_font = NULL, title_font_use_google = NULL, title_font_size = NULL, use_showtext = NULL ) { text_color <- full_length_hex(text_color) background_color <- full_length_hex(background_color) blend <- color_blender(text_color, background_color) text_font_size <- text_font_size %||% web_to_point(xaringanthemer_env$text_font_size, scale = 1.25) %||% 11 title_font_size <- title_font_size %||% web_to_point(xaringanthemer_env$header_h3_font_size, scale = 0.8) %||% 14 text_font_use_google <- text_font_use_google %||% is_google_font(text_font) title_font_use_google <- title_font_use_google %||% is_google_font(title_font) if (is.null(use_showtext)) { use_showtext <- requires_package("showtext", "theme_xaringan", required = FALSE) } text_font <- if (!is.null(text_font)) { register_font(text_font, identical(text_font_use_google, TRUE) && use_showtext) } else { get_theme_font("text") } title_font <- if (!is.null(title_font)) { register_font(title_font, identical(title_font_use_google, TRUE) && use_showtext) } else { get_theme_font("header") } text_font <- text_font %||% "sans" title_font <- title_font %||% "sans" if (set_ggplot_defaults) { accent_color <- accent_color %||% xaringanthemer_env$header_color %||% text_color accent_secondary_color <- accent_secondary_color %||% xaringanthemer_env$text_bold_color %||% accent_color accent_color <- full_length_hex(accent_color) accent_secondary_color <- full_length_hex(accent_secondary_color) theme_xaringan_set_defaults( text_color = text_color, background_color = background_color, accent_color = accent_color, accent_secondary_color = accent_secondary_color, text_font = text_font ) } theme <- ggplot2::theme( line = ggplot2::element_line(color = blend(0.2)), rect = ggplot2::element_rect(fill = background_color), text = ggplot2::element_text( color = blend(0.1), family = text_font, size = text_font_size ), title = ggplot2::element_text( color = accent_color, family = title_font, size = title_font_size ), plot.background = ggplot2::element_rect( fill = background_color, color = background_color ), panel.background = ggplot2::element_rect( fill = background_color, color = background_color ), panel.grid.major = ggplot2::element_line( color = blend(0.8), inherit.blank = TRUE ), panel.grid.minor = ggplot2::element_line( color = blend(0.9), inherit.blank = TRUE ), axis.title = ggplot2::element_text(size = title_font_size * 0.8), axis.ticks = ggplot2::element_line(color = blend(0.8)), axis.text = ggplot2::element_text(color = blend(0.4)), legend.key = ggplot2::element_rect(fill = "transparent", colour = NA), plot.caption = ggplot2::element_text( size = text_font_size * 0.8, color = blend(0.3) ) ) if (utils::packageVersion("ggplot2") >= package_version("3.3.0")) { theme + ggplot2::theme(plot.title.position = "plot") } else theme } #' Set and Restore ggplot2 geom Defaults #' #' @description #' #' `r lifecycle::badge("maturing")` #' #' Set \pkg{ggplot2} _geom_ defaults to match [theme_xaringan()] with #' `theme_xaringan_set_defaults()` and restore the standard or previously-set #' defaults with `theme_xaringan_restore_defaults()`. By default, #' `theme_xaringan_set_defaults()` is run with [theme_xaringan()] or #' [theme_xaringan_inverse()]. #' #' @family xaringanthemer ggplot2 themes #' @param text_font Font to use for text elements, passed to #' [sysfonts::font_add_google()], if available and `text_font_use_google` is #' `TRUE`. Inherits from `text_font_family`. Must be a length-one character. #' @inheritParams theme_xaringan #' @inheritParams theme_xaringan_base #' @return Invisibly returns a list of the current ggplot2 geom defaults #' @export theme_xaringan_set_defaults <- function( text_color = NULL, background_color = NULL, accent_color = text_color, accent_secondary_color = accent_color, text_font = NULL ) { requires_package("ggplot2") blend <- color_blender(text_color, background_color) xaringan_theme_defaults <- list( "line" = list(color = text_color), "vline" = list(color = accent_secondary_color), "hline" = list(color = accent_secondary_color), "abline" = list(color = accent_secondary_color), "segment" = list(color = text_color), "bar" = list(fill = accent_color), "col" = list(fill = accent_color), "boxplot" = list(color = text_color), "contour" = list(color = text_color), "density" = list(color = text_color, fill = text_color, alpha = 0.1), "dotplot" = list(color = accent_color), "errorbarh" = list(color = text_color), "crossbar" = list(color = text_color), "errorbar" = list(color = text_color), "linerange" = list(color = text_color), "pointrange" = list(color = text_color), "map" = list(color = text_color), "path" = list(color = text_color), "line" = list(color = text_color), "step" = list(color = text_color), "point" = list(color = accent_color), "polygon" = list(color = accent_color, fill = accent_color), "quantile" = list(color = text_color), "rug" = list(color = blend(0.5)), "segment" = list(color = text_color), "smooth" = list(fill = blend(0.75), color = accent_secondary_color), "spoke" = list(color = text_color), "label" = list(color = text_color, family= text_font %||% get_theme_font("text")), "text" = list(color = text_color, family= text_font %||% get_theme_font("text")), "rect" = list(fill = text_color), "tile" = list(fill = text_color), "violin" = list(fill = text_color), "sf" = list(color = text_color) ) geom_names <- purrr::set_names(names(xaringan_theme_defaults)) previous_defaults <- lapply( geom_names, function(geom) safely_set_geom(geom, xaringan_theme_defaults[[geom]]) ) if (is.null(xaringanthemer_env$old_ggplot_defaults)) { xaringanthemer_env$old_ggplot_defaults <- previous_defaults } invisible(previous_defaults) } #' @describeIn theme_xaringan_set_defaults Restore previous or standard #' \pkg{ggplot2} _geom_ defaults. #' @return Invisibly returns a list of the current ggplot2 geom defaults #' @export theme_xaringan_restore_defaults <- function() { requires_package("ggplot2") requires_xaringanthemer_env(try_css = FALSE, requires_theme = FALSE) if (is.null(xaringanthemer_env$old_ggplot_defaults)) { return(invisible()) } old_default <- xaringanthemer_env$old_ggplot_defaults old_default_not_std <- vapply(old_default, function(x) length(x) > 0, logical(1)) old_default <- old_default[old_default_not_std] restore_default <- utils::modifyList(xaringanthemer_env$std_ggplot_defaults, old_default) geom_names <- purrr::set_names(names(restore_default)) previous_defaults <- lapply( geom_names, function(geom) safely_set_geom(geom, restore_default[[geom]]) ) invisible(previous_defaults) } safely_set_geom <- function(geom, new) { warn <- function(x) { warning(x$message, call. = TRUE, immediate. = TRUE) invisible() } tryCatch( { ggplot2::update_geom_defaults(geom, new) }, error = warn, warning = warn ) } # Color Scales ------------------------------------------------------------ #' Themed ggplot2 Scales #' #' @description #' #' `r lifecycle::badge("maturing")` #' #' Color and fill single-color scales for discrete and continuous values, #' created using the primary accent color of the xaringanthemer styles. See #' `vignette("ggplot2-themes")` for more information and examples of #' \pkg{xaringanthemer}'s \pkg{ggplot2}-related functions. #' #' @param ... Arguments passed on to either the \pkg{colorspace} scale #' functions — one of [colorspace::scale_color_discrete_sequential()], #' [colorspace::scale_color_continuous_sequential()], #' [colorspace::scale_fill_discrete_sequential()], or #' [colorspace::scale_fill_continuous_sequential()] — or to #' [ggplot2::continuous_scale] or [ggplot2::discrete_scale]. #' @param color A color value, in hex, to override the default color. Otherwise, #' the primary color of the resulting scale is chosen from the xaringanthemer #' slide styles. #' @param inverse If `color` is not supplied and `inverse = TRUE`, a primary #' color is chosen to work well with the inverse slide styles, namely the #' value of `inverse_header_color` #' @param direction Direction of the discrete scale. Use values less than 0 to #' reverse the direction, e.g. `direction = -1`. #' @inheritParams colorspace::scale_color_continuous_sequential #' @param aes_type The type of aesthetic to which the scale is being applied. #' One of "color", "colour", or "fill". #' #' #' @examples #' # Requires ggplot2 #' has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) #' #' if (has_ggplot2) { #' library(ggplot2) #' # Saving the theme to a temp file because this is an example #' path_to_css_file <- tempfile(fileext = ".css") #' #' # Create the xaringan theme: dark blue background with teal green accents #' style_duo( #' primary_color = "#002b36", #' secondary_color = "#31b09e", #' # Using basic fonts for this example, but the plot theme will #' # automatically use your theme font if you use Google fonts #' text_font_family = "sans", #' header_font_family = "serif", #' outfile = path_to_css_file #' ) #' #' # Here's some very basic example data #' ex <- data.frame( #' name = c("Couple", "Few", "Lots", "Many"), #' n = c(2, 3, 5, 7) #' ) #' #' # Fill color scales demo #' ggplot(ex) + #' aes(name, n, fill = n) + #' geom_col() + #' ggtitle("Matching fill scales") + #' # themed to match the slides: dark blue background with teal text #' theme_xaringan() + #' # Fill color matches teal text #' scale_xaringan_fill_continuous() #' #' # Color scales demo #' ggplot(ex) + #' aes(name, y = 1, color = name) + #' geom_point(size = 10) + #' ggtitle("Matching color scales") + #' # themed to match the slides: dark blue background with teal text #' theme_xaringan() + #' # Fill color matches teal text #' scale_xaringan_color_discrete(direction = -1) #' } #' @name scale_xaringan NULL #' @rdname scale_xaringan #' @export scale_xaringan_discrete <- function( aes_type = c("color", "colour", "fill"), ..., color = NULL, direction = 1, inverse = FALSE, na.value = "grey50" ) { requires_package("ggplot2", "scale_xaringan_discrete") aes_type <- match.arg(aes_type) color <- hex2HCL(get_theme_accent_color(color, inverse)) pal <- function(n) { colors <- colorspace::sequential_hcl( n = n, c1 = color[1, "C"], l1 = color[1, "L"], h1 = color[1, "H"], rev = direction >= 1 ) } ggplot2::discrete_scale(aes_type, "manual", pal, ..., na.value = na.value) } #' @rdname scale_xaringan #' @export scale_xaringan_fill_discrete <- function( ..., color = NULL, direction = 1, inverse = FALSE ) { scale_xaringan_discrete( "fill", ..., color = color, direction = direction, inverse = inverse ) } #' @rdname scale_xaringan #' @export scale_xaringan_color_discrete <- function( ..., color = NULL, direction = 1, inverse = FALSE ) { scale_xaringan_discrete( "color", ..., color = color, direction = direction, inverse = inverse ) } #' @rdname scale_xaringan #' @export scale_xaringan_colour_discrete <- scale_xaringan_color_discrete #' @rdname scale_xaringan #' @export scale_xaringan_continuous <- function( aes_type = c("color", "colour", "fill"), ..., color = NULL, begin = 0, end = 1, inverse = FALSE, na.value = "grey50" ) { requires_package("ggplot2", "scale_xaringan_continuous") requires_package("scales", "scale_xaringan_continuous") aes_type <- match.arg(aes_type) color <- hex2HCL(get_theme_accent_color(color, inverse)) colors <- suppressWarnings(colorspace::sequential_hcl( n = 12, c1 = color[1, "C"], l1 = color[1, "L"], h1 = color[1, "H"], rev = TRUE )) rescaler <- function(x, ...) { scales::rescale(x, to = c(begin, end), from = range(x, na.rm = TRUE)) } ggplot2::continuous_scale( aes_type, "continuous_sequential", palette = scales::gradient_n_pal(colors, values = NULL), rescaler = rescaler, oob = scales::censor, na.value = na.value, ... ) } #' @rdname scale_xaringan #' @export scale_xaringan_fill_continuous <- function( ..., color = NULL, begin = 0, end = 1, inverse = FALSE ) { scale_xaringan_continuous( "fill", ..., color = color, begin = begin, end = end, inverse = inverse ) } #' @rdname scale_xaringan #' @export scale_xaringan_color_continuous <- function( ..., color = NULL, begin = 0, end = 1, inverse = FALSE ) { scale_xaringan_continuous( "color", ..., color = color, begin = begin, end = end, inverse = inverse ) } #' @rdname scale_xaringan #' @export scale_xaringan_colour_continuous <- scale_xaringan_color_continuous get_theme_accent_color <- function(color = NULL, inverse = FALSE) { color <- if (!inverse) { color %||% xaringanthemer_env[["header_color"]] %||% xaringanthemer_env[["text_color"]] } else { color %||% xaringanthemer_env[["inverse_header_color"]] } if (is.null(color)) { stop( call. = FALSE, "No color provided and no default available. ", "Have you forgotten to use a style function to set the xaringan theme?" ) } color } blend_colors <- function(x, y, alpha = 0.5) { x <- colorspace::hex2RGB(x) y <- colorspace::hex2RGB(y) z <- colorspace::mixcolor(alpha, x, y) colorspace::hex(z) } color_blender <- function(x, y) function(alpha = 0.5) blend_colors(x, y, alpha) hex2HCL <- function(x) { colorspace::coords(methods::as(colorspace::hex2RGB(x), "polarLUV")) } # Fonts ------------------------------------------------------------------- get_theme_font <- function(element = c("text", "header", "code"), use_showtext = TRUE) { element <- match.arg(element) element_family <- paste0(element, "_font_family") element_google <- paste0(element, "_font_google") element_is_google <- paste0(element, "_font_is_google") element_url <- paste0(element, "_font_url") family <- xaringanthemer_env[[element_family]] is_google_font <- xaringanthemer_env[[element_is_google]] if (is.null(is_google_font)) { is_google_font <- !is.null(xaringanthemer_env[[element_google]]) || grepl("fonts.google", xaringanthemer_env[[element_url]], fixed = TRUE) } register_font( family, google = is_google_font, fn = sys.calls()[[max(1, sys.nframe() - 1)]][[1]], use_showtext = use_showtext ) } register_font <- function( family, google = TRUE, fn = sys.calls()[[max(1, sys.nframe() - 1)]][[1]], ..., use_showtext = TRUE ) { if (is.null(family) || !use_showtext) { return(NULL) } if (is_google_font(family)) family <- family$family family <- gsub("['\"]", "", family) if (!identical(xaringanthemer_env$showtext_auto, TRUE)) { if (!requires_package(pkg = "showtext", fn, required = FALSE)) { return(family) } showtext::showtext_auto() xaringanthemer_env$showtext_auto <- TRUE } if (family %in% xaringanthemer_env[["registered_font_families"]] %||% "") { return(family) } if (!requires_package(pkg = "sysfonts", fn, required = FALSE)) { return(family) } else if (family == "Droid Serif") { dstmp <- download_tmp_droid_serif() if (!is.null(dstmp)) { sysfonts::font_add( family = "Droid Serif", regular = dstmp ) } } else if (!family %in% sysfonts::font_families()) { is_default_font <- family %in% c( "Roboto", "Source Code Pro", "Yanone Kaffeesatz" ) font_found <- family %in% sysfonts::font_families() is_google_font <- identical(google, TRUE) || (missing(google) && is_default_font) if (is_google_font) { tryCatch( { sysfonts::font_add_google(family, ...) font_found <- TRUE }, error = function(e) {}, warning = function(w) {} ) } if (!font_found) { # warn user if font still not found msg <- if (is_google_font) glue::glue( "Font '{family}' not found in Google Fonts. ", "Please manually register the font using `sysfonts::font_add()`." ) else { glue::glue( "Font '{family}' must be manually registered using `sysfonts::font_add()`." ) } warning(str_wrap(msg), call. = FALSE) } else { verify_fig_showtext(fn) } } xaringanthemer_env[["registered_font_families"]] <- c( xaringanthemer_env[["registered_font_families"]], family ) family } download_tmp_droid_serif <- function() { if (isTRUE(xaringanthemer_env[["declined_droid_serif"]])) return(NULL) message( "Using 'Droid Serif' in `theme_xaringan()` requires downloading the font from Google Fonts into a temporary file. " ) ok_to_download <- utils::askYesNo("Do you want to try to download this font now?") if (identical(ok_to_download, FALSE)) { xaringanthemer_env[["declined_droid_serif"]] <- TRUE } if (!isTRUE(ok_to_download)) { return(NULL) } dstmp <- tempfile("droid-serif", fileext = "ttf") utils::download.file( "https://github.com/google/fonts/raw/feb15862e0c66ec0e7531ca4c3ef2607071ea700/apache/droidserif/DroidSerif-Regular.ttf", dstmp, quiet = TRUE ) dstmp } verify_fig_showtext <- function(fn = "theme_xaringan_base") { if (is.null(knitr::current_input())) return() # Try to set fig.showtext automatically if (isTRUE(knitr::opts_current$get("fig.showtext"))) { return() } stop(str_wrap( "To use ", fn, "() with knitr, you need to set the chunk option ", "`fig.showtext = TRUE` for this chunk. Or you can set this option ", "globally with `knitr::opts_chunk$set(fig.showtext = TRUE)`." )) } set_fig_showtext <- function() { if (!requireNamespace("showtext", quietly = TRUE)) { return(invisible()) } curr_fst_chunk <- knitr::opts_current$get("fig.showtext") curr_fst <- curr_fst_chunk %||% knitr::opts_chunk$get("fig.showtext") if (!is.null(curr_fst) && identical(curr_fst, FALSE)) { return(invisible()) } knitr::opts_chunk$set(fig.showtext = TRUE) } requires_xaringanthemer_env <- function( css_file = NULL, try_css = TRUE, requires_theme = TRUE ) { reload <- !is.null(css_file) && isTRUE(try_css) pkg_env_exists <- exists("xaringanthemer_env") missing_theme <- requires_theme && pkg_env_exists && is.null(xaringanthemer_env$header_color) if (reload || !pkg_env_exists || missing_theme) { if (try_css) { css_vars <- read_css_vars(css_file) for (css_var in names(css_vars)) { xaringanthemer_env[[css_var]] <- css_vars[[css_var]] } return(requires_xaringanthemer_env(try_css = FALSE)) } else { stop("Please call a xaringanthemer theme function first.") } } } #' Get the Value of xaringanthemer Style Setting #' #' A helper function to retrieve the value of style settings as set by a #' xaringanthemer style function, for use in plotting and other circumstances. #' #' @section Style Settings: #' Style settings used by xaringanthemer include: #' #' - `background_color` #' - `background_image` #' - `background_position` #' - `background_size` #' - `blockquote_left_border_color` #' - `code_font_family` #' - `code_font_family_fallback` #' - `code_font_google` #' - `code_font_is_google` #' - `code_font_size` #' - `code_font_url` #' - `code_highlight_color` #' - `code_inline_background_color` #' - `code_inline_color` #' - `code_inline_font_size` #' - `extra_css` #' - `extra_fonts` #' - `footnote_color` #' - `footnote_font_size` #' - `footnote_position_bottom` #' - `header_background_auto` #' - `header_background_color` #' - `header_background_content_padding_top` #' - `header_background_ignore_classes` #' - `header_background_padding` #' - `header_background_text_color` #' - `header_color` #' - `header_font_family` #' - `header_font_google` #' - `header_font_is_google` #' - `header_font_url` #' - `header_font_weight` #' - `header_h1_font_size` #' - `header_h2_font_size` #' - `header_h3_font_size` #' - `inverse_background_color` #' - `inverse_header_color` #' - `inverse_text_color` #' - `inverse_text_shadow` #' - `left_column_selected_color` #' - `left_column_subtle_color` #' - `link_color` #' - `padding` #' - `table_border_color` #' - `table_row_border_color` #' - `table_row_even_background_color` #' - `text_bold_color` #' - `text_color` #' - `text_font_base` #' - `text_font_family` #' - `text_font_family_fallback` #' - `text_font_google` #' - `text_font_is_google` #' - `text_font_size` #' - `text_font_url` #' - `text_font_weight` #' - `text_slide_number_color` #' - `text_slide_number_font_size` #' - `title_slide_background_color` #' - `title_slide_background_image` #' - `title_slide_background_position` #' - `title_slide_background_size` #' - `title_slide_text_color` #' #' @param setting A xaringanthemer style setting #' @inheritParams theme_xaringan #' @examples #' # Create a xaringanthemer style in a temporary file for this example #' xaringan_themer_css <- tempfile("xaringan-themer", fileext = ".css") #' #' style_solarized_light(outfile = xaringan_themer_css) #' #' theme_xaringan_get_value("text_color") #' theme_xaringan_get_value("background_color") #' theme_xaringan_get_value("header_color") #' theme_xaringan_get_value("text_bold_color") #' @return The value of the xaringanthemer style parameter. #' @export theme_xaringan_get_value <- function(setting, css_file = NULL) { requires_xaringanthemer_env(css_file = css_file) if (length(setting) > 1) { ret <- list() for (var in setting) { ret[[var]] <- xaringanthemer_env[[var]] } return(ret) } xaringanthemer_env[[setting]] } web_to_point <- function(x, px_per_em = NULL, scale = 0.75) { if (is.null(x)) { return(NULL) } px_per_em <- px_per_em %||% get_base_font_size() if (grepl("pt$", x)) { return(as.numeric(sub("pt$", "", x))) } else if (grepl("px$", x)) { x <- as.numeric(sub("px$", "", x)) return(x * scale) } else if (grepl("r?em$", x)) { x <- as.numeric(sub("r?em$", "", x)) return(x * px_per_em * scale) } else { return() } } get_base_font_size <- function() { base_size <- xaringanthemer_env[["base_font_size"]] %||% xaringanthemer_env[["text_font_size"]] if (!grepl("px", base_size)) { # assume 16px base font size 16 } else { as.numeric(sub("px", "", base_size)) } } ================================================ FILE: R/style_duo.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param primary_color Duotone Primary Color. Defaults to #1F4257. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--primary)` in any argument of a #' style function or in custom CSS. #' @param secondary_color Duotone Secondary Color. Defaults to #F97B64. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--secondary)` in any argument of #' a style function or in custom CSS. #' @param text_color Text Color. Defaults to #' `choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99))`. #' Modifies the `body` element. The value of this variable is also stored as #' a CSS variable that can be referenced with `var(--text_color)` in any #' argument of a style function or in custom CSS. #' @param header_color Header Color. Defaults to `secondary_color`. Modifies #' the `h1, h2, h3` elements. The value of this variable is also stored as a #' CSS variable that can be referenced with `var(--header-color)` in any #' argument of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to `primary_color`. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to `secondary_color`. Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to `secondary_color`. #' Modifies the `strong` element. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--text-bold-color)` in #' any argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to `text_color`. #' Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to `secondary_color`. #' Modifies the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' `secondary_color`. Modifies the `.inverse` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to `primary_color`. #' Modifies the `.inverse` class. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--inverse-text-color)` #' in any argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `secondary_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `primary_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-background-color)` in any argument of a style function #' or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' `apply_alpha(secondary_color, 0.6)`. Modifies the #' `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' `secondary_color`. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to `apply_alpha(secondary_color, 0.5)`. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to `lighten_color(primary_color, 0.9)`. Modifies the #' `thead, tfoot, tr:nth-child(even)` elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_duo #' @family Duotone themes #' @export style_duo <- function( primary_color = "#1F4257", secondary_color = "#F97B64", text_color = choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99)), header_color = secondary_color, background_color = primary_color, link_color = secondary_color, text_bold_color = secondary_color, text_slide_number_color = text_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = secondary_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = secondary_color, inverse_text_color = primary_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = secondary_color, title_slide_background_color = primary_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(secondary_color, 0.6), left_column_selected_color = secondary_color, blockquote_left_border_color = apply_alpha(secondary_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(primary_color, 0.9), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R primary_color <- unname(primary_color) secondary_color <- unname(secondary_color) colors <- c(primary = primary_color, secondary = secondary_color, colors) eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_duo_accent.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param primary_color Duotone Primary Color. Defaults to #035AA6. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--primary)` in any argument of a #' style function or in custom CSS. #' @param secondary_color Duotone Secondary Color. Defaults to #03A696. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--secondary)` in any argument of #' a style function or in custom CSS. #' @param white_color Brightest color used. Defaults to #FFFFFF. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--white)` in any argument of a #' style function or in custom CSS. #' @param black_color Darkest color used. Defaults to #000000. Used in multiple #' CSS rules. The value of this variable is also stored as a CSS variable #' that can be referenced with `var(--black)` in any argument of a style #' function or in custom CSS. #' @param text_color Text Color. Defaults to `black_color`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to `primary_color`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to `white_color`. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to #' `choose_dark_or_light(secondary_color, primary_color, secondary_color)`. #' Modifies the `a, a > code` elements. The value of this variable is also #' stored as a CSS variable that can be referenced with `var(--link-color)` #' in any argument of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to #' `choose_dark_or_light(secondary_color, primary_color, secondary_color)`. #' Modifies the `strong` element. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--text-bold-color)` in #' any argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to #' `primary_color`. Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to #' `choose_dark_or_light(secondary_color, primary_color, secondary_color)`. #' Modifies the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' `secondary_color`. Modifies the `.inverse` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to #' `choose_dark_or_light(secondary_color, black_color, white_color)`. #' Modifies the `.inverse` class. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--inverse-text-color)` #' in any argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `choose_dark_or_light(primary_color, black_color, white_color)`. Modifies #' the `.title-slide` class. The value of this variable is also stored as a #' CSS variable that can be referenced with `var(--title-slide-text-color)` #' in any argument of a style function or in custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `primary_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-background-color)` in any argument of a style function #' or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' `apply_alpha(primary_color, 0.6)`. Modifies the #' `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' `primary_color`. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to `apply_alpha(secondary_color, 0.5)`. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to `lighten_color(secondary_color, 0.8)`. Modifies the #' `thead, tfoot, tr:nth-child(even)` elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_duo_accent #' @family Duotone themes #' @export style_duo_accent <- function( primary_color = "#035AA6", secondary_color = "#03A696", white_color = "#FFFFFF", black_color = "#000000", text_color = black_color, header_color = primary_color, background_color = white_color, link_color = choose_dark_or_light(secondary_color, primary_color, secondary_color), text_bold_color = choose_dark_or_light(secondary_color, primary_color, secondary_color), text_slide_number_color = primary_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = choose_dark_or_light(secondary_color, primary_color, secondary_color), code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = secondary_color, inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color), inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color), title_slide_background_color = primary_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(primary_color, 0.6), left_column_selected_color = primary_color, blockquote_left_border_color = apply_alpha(secondary_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(secondary_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R primary_color <- unname(primary_color) secondary_color <- unname(secondary_color) white_color <- unname(white_color) black_color <- unname(black_color) colors <- c(primary = primary_color, secondary = secondary_color, white = white_color, black = black_color, colors) eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_duo_accent_inverse.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param primary_color Duotone Primary Color. Defaults to #035AA6. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--primary)` in any argument of a #' style function or in custom CSS. #' @param secondary_color Duotone Secondary Color. Defaults to #03A696. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--secondary)` in any argument of #' a style function or in custom CSS. #' @param white_color Brightest color used. Defaults to #FFFFFF. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--white)` in any argument of a #' style function or in custom CSS. #' @param black_color Darkest color used. Defaults to #000000. Used in multiple #' CSS rules. The value of this variable is also stored as a CSS variable #' that can be referenced with `var(--black)` in any argument of a style #' function or in custom CSS. #' @param text_color Text Color. Defaults to `white_color`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to `primary_color`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to `black_color`. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to #' `choose_dark_or_light(secondary_color, secondary_color, primary_color)`. #' Modifies the `a, a > code` elements. The value of this variable is also #' stored as a CSS variable that can be referenced with `var(--link-color)` #' in any argument of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to #' `choose_dark_or_light(secondary_color, secondary_color, primary_color)`. #' Modifies the `strong` element. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--text-bold-color)` in #' any argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to #' `primary_color`. Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to #' `choose_dark_or_light(secondary_color, secondary_color, primary_color)`. #' Modifies the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' `secondary_color`. Modifies the `.inverse` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to #' `choose_dark_or_light(secondary_color, black_color, white_color)`. #' Modifies the `.inverse` class. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--inverse-text-color)` #' in any argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `choose_dark_or_light(primary_color, black_color, white_color)`. Modifies #' the `.title-slide` class. The value of this variable is also stored as a #' CSS variable that can be referenced with `var(--title-slide-text-color)` #' in any argument of a style function or in custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `primary_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-background-color)` in any argument of a style function #' or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' `apply_alpha(primary_color, 0.6)`. Modifies the #' `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' `primary_color`. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to `apply_alpha(secondary_color, 0.5)`. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to #' `darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.2)`. #' Modifies the `thead, tfoot, tr:nth-child(even)` elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_duo_accent_inverse #' @family Duotone themes #' @export style_duo_accent_inverse <- function( primary_color = "#035AA6", secondary_color = "#03A696", white_color = "#FFFFFF", black_color = "#000000", text_color = white_color, header_color = primary_color, background_color = black_color, link_color = choose_dark_or_light(secondary_color, secondary_color, primary_color), text_bold_color = choose_dark_or_light(secondary_color, secondary_color, primary_color), text_slide_number_color = primary_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = choose_dark_or_light(secondary_color, secondary_color, primary_color), code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = secondary_color, inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color), inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color), title_slide_background_color = primary_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(primary_color, 0.6), left_column_selected_color = primary_color, blockquote_left_border_color = apply_alpha(secondary_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.2), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R primary_color <- unname(primary_color) secondary_color <- unname(secondary_color) white_color <- unname(white_color) black_color <- unname(black_color) colors <- c(primary = primary_color, secondary = secondary_color, white = white_color, black = black_color, colors) eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_extra_css.R ================================================ #' Add Extra CSS Styles #' #' Adds css elements to target `outfile`, typically a xaringanthemer css file. #' The `css` argument takes a list of CSS classes and definitions (see examples below) #' and appends CSS rules to `outfile`. #' #' @section css list: #' The `css` input must be a named list of css properties and values within a #' named list of class identifiers, for example #' `list(".class-id" = list("css-property" = "value"))`. #' #' @param css A named list of CSS definitions each containing a named list #' of CSS property-value pairs, i.e. #' `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`. #' @param heading Heading added above extra CSS. Use `NULL` to disable. #' #' @examples #' style_extra_css( #' outfile = stdout(), #' css = list( #' ".red" = list(color = "red"), #' ".small" = list("font-size" = "90%"), #' ".full-width" = list( #' display = "flex", #' width = "100%", #' flex = "1 1 auto" #' ) #' ) #' ) #' @inheritParams style_xaringan #' @export style_extra_css <- function( css, outfile = "xaringan-themer.css", append = TRUE, heading = "Extra CSS" ) { has_heading <- !is.null(heading) x <- paste0( if (has_heading) paste0("/* ", heading, " */\n"), paste(list2css(css), collapse = "\n") ) if (append) x <- paste0(if (has_heading) "\n\n" else "\n", x) if (is.null(outfile)) return(x) cat( x, file = outfile, append = append, sep = "\n" ) invisible(x) } #' @inheritParams style_extra_css #' @keywords internal list2css <- function(css) { `%.%` <- function(x, y) paste0(x, y) error <- NULL if (is.null(names(css))) { stop("All elements in `css` list must be named", call. = FALSE) } if (purrr::pluck_depth(css) != 3) { stop(str_wrap( "`css` list must be a named list within a named list, e.g.:\n", ' list(".class-id" = list("css-property" = "value"))' )) } if (any(names(css) == "")) { not_named <- which(names(css) == "") if (length(not_named) > 1) { stop(str_wrap( call. = FALSE, "All elements in `css` list must be named. Items ", paste(not_named, collapse = ", "), " are unnamed." )) } else { stop(str_wrap( call. = FALSE, "All elements in `css` list must be named. Item ", not_named, " is not named." )) } } child_unnamed <- purrr::map_lgl(purrr::map(css, ~ { is.null(names(.)) || any(names(.) == "") }), ~ any(.)) if (any(child_unnamed)) { has_unnamed <- names(css)[child_unnamed] msg <- paste( "All properties of elements in `css` list must be named.", if (length(has_unnamed) > 1) "Elements" else "Element", paste(has_unnamed, collapse = ", "), if (length(has_unnamed) > 1) "have" else "has", "unnamed property or properties." ) stop(str_wrap(msg), call. = FALSE) } x <- purrr::imap_chr(css, function(rules, selector) { paste( sep = "\n", selector %.% " {", paste( purrr::imap_chr(rules, function(value, prop) { " " %.% prop %.% ": " %.% value %.% ";" }), collapse = "\n" ), "}" ) }) unname(x) } list2fonts <- function(fonts) { if ( length(setdiff(names(google_font('fam')), names(fonts))) == 0 && !inherits(fonts, "google_font") ) { # concatenating a string and a google_font() provides a wacky list stop( "Multiple fonts in `extra_fonts` must be specified inside a `list()`.", call. = FALSE ) } if (inherits(fonts, "google_font")) { fonts <- list(fonts) } fonts <- purrr::map_chr(fonts, function(f) { if (inherits(f, "google_font")) { f$url } else if (inherits(f, "character")) { f } else { NA_character_ } }) paste0("@import url(", fonts[!is.na(fonts)], ");") } ================================================ FILE: R/style_font_default.R ================================================ #' @describeIn style_xaringan Default values for font family, weight, URLs and #' font fallbacks. #' @param font_arg A font argument from the \pkg{xaringanthemer} `style_` #' function family. #' @export xaringanthemer_font_default <- function(font_arg) { x <- switch( font_arg, text_font_family = "Noto Sans", text_font_weight = "normal", text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap", text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial", header_font_family = "Cabin", header_font_weight = "600", header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap", code_font_family = "Source Code Pro", code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap", code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console", stop("unknown font_arg: ", font_arg) ) class(x) <- c("xaringanthemer_default", class(x)) x } #' @export print.xaringanthemer_default <- function(x, ...) { print(unclass(x)) } ================================================ FILE: R/style_mono_accent.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param base_color Monotone Base Color, works best with a strong color. #' Defaults to #43418A. Used in multiple CSS rules. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--base)` in any argument of a style function or in custom CSS. #' @param white_color Brightest color used. Defaults to #FFFFFF. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--white)` in any argument of a #' style function or in custom CSS. #' @param black_color Darkest color used. Defaults to #272822. Used in multiple #' CSS rules. The value of this variable is also stored as a CSS variable #' that can be referenced with `var(--black)` in any argument of a style #' function or in custom CSS. #' @param text_color Text Color. Defaults to `black_color`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to `base_color`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to `white_color`. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to `base_color`. Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to `base_color`. Modifies #' the `strong` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-bold-color)` in any #' argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to `base_color`. #' Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to `base_color`. #' Modifies the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' `base_color`. Modifies the `.inverse` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to `white_color`. #' Modifies the `.inverse` class. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--inverse-text-color)` #' in any argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `inverse_background_color`. Modifies the `.title-slide` class. The #' value of this variable is also stored as a CSS variable that can be #' referenced with `var(--title-slide-background-color)` in any argument of a #' style function or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' `apply_alpha(base_color, 0.6)`. Modifies the #' `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' `base_color`. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to `apply_alpha(base_color, 0.5)`. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to `lighten_color(base_color, 0.8)`. Modifies the #' `thead, tfoot, tr:nth-child(even)` elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_mono_accent #' @family Monotone themes #' @export style_mono_accent <- function( base_color = "#43418A", white_color = "#FFFFFF", black_color = "#272822", text_color = black_color, header_color = base_color, background_color = white_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = white_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(base_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R base_color <- unname(base_color) white_color <- unname(white_color) black_color <- unname(black_color) colors <- c(base = base_color, white = white_color, black = black_color, colors) eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_mono_accent_inverse.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param base_color Monotone Base Color, works best with a light color. #' Defaults to #3C989E. Used in multiple CSS rules. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--base)` in any argument of a style function or in custom CSS. #' @param white_color Brightest color used, default is a very light version of #' `base_color`. Defaults to #FFFFFF. Used in multiple CSS rules. The value #' of this variable is also stored as a CSS variable that can be referenced #' with `var(--white)` in any argument of a style function or in custom CSS. #' @param black_color Darkest color used, default is a very dark, version of #' `base_color`. Defaults to `darken_color(base_color, 0.9)`. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--black)` in any argument of a #' style function or in custom CSS. #' @param text_color Text Color. Defaults to `white_color`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to `base_color`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to `black_color`. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to `base_color`. Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to `base_color`. Modifies #' the `strong` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-bold-color)` in any #' argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to `base_color`. #' Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to `base_color`. #' Modifies the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' `base_color`. Modifies the `.inverse` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to `black_color`. #' Modifies the `.inverse` class. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--inverse-text-color)` #' in any argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `inverse_background_color`. Modifies the `.title-slide` class. The #' value of this variable is also stored as a CSS variable that can be #' referenced with `var(--title-slide-background-color)` in any argument of a #' style function or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' `apply_alpha(base_color, 0.6)`. Modifies the #' `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' `base_color`. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to `apply_alpha(base_color, 0.5)`. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to `darken_color(base_color, 0.8)`. Modifies the #' `thead, tfoot, tr:nth-child(even)` elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_mono_accent_inverse #' @family Monotone themes #' @export style_mono_accent_inverse <- function( base_color = "#3C989E", white_color = "#FFFFFF", black_color = darken_color(base_color, 0.9), text_color = white_color, header_color = base_color, background_color = black_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = black_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = darken_color(base_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R base_color <- unname(base_color) white_color <- unname(white_color) black_color <- unname(black_color) colors <- c(base = base_color, white = white_color, black = black_color, colors) eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_mono_dark.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param base_color Monotone Base Color, works best with a light color.. #' Defaults to #cbf7ed. Used in multiple CSS rules. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--base)` in any argument of a style function or in custom CSS. #' @param white_color Brightest color used, default is a very light version of #' `base_color`. Defaults to `lighten_color(base_color, 0.8)`. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--white)` in any argument of a #' style function or in custom CSS. #' @param black_color Darkest color used, default is a very dark, version of #' `base_color`. Defaults to `darken_color(base_color, 0.85)`. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--black)` in any argument of a #' style function or in custom CSS. #' @param text_color Text Color. Defaults to `white_color`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to `base_color`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to `black_color`. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to `base_color`. Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to `base_color`. Modifies #' the `strong` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-bold-color)` in any #' argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to `base_color`. #' Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to `base_color`. #' Modifies the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' `base_color`. Modifies the `.inverse` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to `black_color`. #' Modifies the `.inverse` class. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--inverse-text-color)` #' in any argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `inverse_background_color`. Modifies the `.title-slide` class. The #' value of this variable is also stored as a CSS variable that can be #' referenced with `var(--title-slide-background-color)` in any argument of a #' style function or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' `apply_alpha(base_color, 0.6)`. Modifies the #' `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' `base_color`. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to `apply_alpha(base_color, 0.5)`. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to `darken_color(base_color, 0.7)`. Modifies the #' `thead, tfoot, tr:nth-child(even)` elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_mono_dark #' @family Monotone themes #' @export style_mono_dark <- function( base_color = "#cbf7ed", white_color = lighten_color(base_color, 0.8), black_color = darken_color(base_color, 0.85), text_color = white_color, header_color = base_color, background_color = black_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = black_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = darken_color(base_color, 0.7), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R base_color <- unname(base_color) white_color <- unname(white_color) black_color <- unname(black_color) colors <- c(base = base_color, white = white_color, black = black_color, colors) eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_mono_light.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param base_color Monotone base color, works best with a strong color. #' Defaults to #23395b. Used in multiple CSS rules. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--base)` in any argument of a style function or in custom CSS. #' @param white_color Brightest color used, default is a very light version of #' `base_color`. Defaults to `lighten_color(base_color, 0.9)`. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--white)` in any argument of a #' style function or in custom CSS. #' @param black_color Darkest color used, default is a very dark, version of #' `base_color`. Defaults to `darken_color(base_color, 0.3)`. Used in #' multiple CSS rules. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--black)` in any argument of a #' style function or in custom CSS. #' @param text_color Text Color. Defaults to `black_color`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to `base_color`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to `white_color`. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to `base_color`. Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to `base_color`. Modifies #' the `strong` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-bold-color)` in any #' argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to `base_color`. #' Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to `base_color`. #' Modifies the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' `base_color`. Modifies the `.inverse` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to `white_color`. #' Modifies the `.inverse` class. The value of this variable is also stored #' as a CSS variable that can be referenced with `var(--inverse-text-color)` #' in any argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `inverse_background_color`. Modifies the `.title-slide` class. The #' value of this variable is also stored as a CSS variable that can be #' referenced with `var(--title-slide-background-color)` in any argument of a #' style function or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' `apply_alpha(base_color, 0.6)`. Modifies the #' `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' `base_color`. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to `apply_alpha(base_color, 0.5)`. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to `lighten_color(base_color, 0.8)`. Modifies the #' `thead, tfoot, tr:nth-child(even)` elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_mono_light #' @family Monotone themes #' @export style_mono_light <- function( base_color = "#23395b", white_color = lighten_color(base_color, 0.9), black_color = darken_color(base_color, 0.3), text_color = black_color, header_color = base_color, background_color = white_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = white_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(base_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R base_color <- unname(base_color) white_color <- unname(white_color) black_color <- unname(black_color) colors <- c(base = base_color, white = white_color, black = black_color, colors) eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_solarized_dark.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param text_color Text Color. Defaults to #839496. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to #dc322f. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to #002b36. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to #b58900. Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to #d33682. Modifies the #' `strong` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-bold-color)` in any #' argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to #586e75. #' Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #268bd240. #' Modifies the `.remark-code-line-highlighted` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--code-highlight-color)` in any argument of a style function or in #' custom CSS. #' @param code_inline_color Inline Code Color. Defaults to #6c71c4. Modifies #' the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' #fdf6e3. Modifies the `.inverse` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to #002b36. Modifies #' the `.inverse` class. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--inverse-text-color)` in any #' argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `inverse_background_color`. Modifies the `.title-slide` class. The #' value of this variable is also stored as a CSS variable that can be #' referenced with `var(--title-slide-background-color)` in any argument of a #' style function or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' #586e75. Modifies the `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' #93a1a1. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to #cb4b16. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #657b83. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #657b83. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to #073642. Modifies the `thead, tfoot, tr:nth-child(even)` #' elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_solarized_dark #' @family Solarized themes #' @export style_solarized_dark <- function( text_color = "#839496", header_color = "#dc322f", background_color = "#002b36", link_color = "#b58900", text_bold_color = "#d33682", text_slide_number_color = "#586e75", padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "#268bd240", code_inline_color = "#6c71c4", code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = "#fdf6e3", inverse_text_color = "#002b36", inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = "#586e75", left_column_selected_color = "#93a1a1", blockquote_left_border_color = "#cb4b16", table_border_color = "#657b83", table_row_border_color = "#657b83", table_row_even_background_color = "#073642", base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_solarized_light.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param text_color Text Color. Defaults to #657b83. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text_color)` in any argument of a style #' function or in custom CSS. #' @param header_color Header Color. Defaults to #dc322f. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to #fdf6e3. #' Modifies the `.remark-slide-content` class. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to #b58900. Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to #d33682. Modifies the #' `strong` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-bold-color)` in any #' argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to #93a1a1. #' Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #268bd240. #' Modifies the `.remark-code-line-highlighted` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--code-highlight-color)` in any argument of a style function or in #' custom CSS. #' @param code_inline_color Inline Code Color. Defaults to #6c71c4. Modifies #' the `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' #002b36. Modifies the `.inverse` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to #fdf6e3. Modifies #' the `.inverse` class. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--inverse-text-color)` in any #' argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #' `inverse_text_color`. Modifies the `.inverse h1, .inverse h2, .inverse h3` #' classes. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--inverse-header-color)` in any argument of a #' style function or in custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `inverse_background_color`. Modifies the `.title-slide` class. The #' value of this variable is also stored as a CSS variable that can be #' referenced with `var(--title-slide-background-color)` in any argument of a #' style function or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' #93a1a1. Modifies the `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' #586e75. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to #cb4b16. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #839496. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #839496. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to #eee8d5. Modifies the `thead, tfoot, tr:nth-child(even)` #' elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_solarized_light #' @family Solarized themes #' @export style_solarized_light <- function( text_color = "#657b83", header_color = "#dc322f", background_color = "#fdf6e3", link_color = "#b58900", text_bold_color = "#d33682", text_slide_number_color = "#93a1a1", padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "#268bd240", code_inline_color = "#6c71c4", code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = "#002b36", inverse_text_color = "#fdf6e3", inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = "#93a1a1", left_column_selected_color = "#586e75", blockquote_left_border_color = "#cb4b16", table_border_color = "#839496", table_row_border_color = "#839496", table_row_even_background_color = "#eee8d5", base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R eval(parse(text = call_style_xaringan())) } ================================================ FILE: R/style_xaringan.R ================================================ # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand #' @param text_color Text Color. Defaults to #000. Modifies the `body` element. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--text_color)` in any argument of a style function or #' in custom CSS. #' @param header_color Header Color. Defaults to #000. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-color)` in any argument #' of a style function or in custom CSS. #' @param background_color Slide Background Color. Defaults to #FFF. Modifies #' the `.remark-slide-content` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--background-color)` in any argument of a style function or in custom #' CSS. #' @param link_color Link Color. Defaults to rgb(249, 38, 114). Modifies the #' `a, a > code` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--link-color)` in any argument #' of a style function or in custom CSS. #' @param text_bold_color Bold Text Color. Defaults to `NULL`. Modifies the #' `strong` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-bold-color)` in any #' argument of a style function or in custom CSS. #' @param text_slide_number_color Slide Number Color. Defaults to #' `inverse_background_color`. Modifies the `.remark-slide-number` class. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class. #' Accepts CSS #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param background_image Background image applied to each *and every* slide. #' Set `title_slide_background_image = "none"` to remove the background image #' from the title slide. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. #' @param background_size Background image size, requires `background_image` to #' be set. If `background_image` is set, `background_size` will default to #' `cover` so the background fills the screen. If both `background_image` and #' `background_position` are set, will default to 100 percent. Defaults to #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param background_position Background image position, requires #' `background_image` to be set, and it is recommended to adjust #' `background_size`. Defaults to `NULL`. Modifies the #' `.remark-slide-content` class. Accepts CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param code_highlight_color Code Line Highlight. Defaults to #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class. #' The value of this variable is also stored as a CSS variable that can be #' referenced with `var(--code-highlight-color)` in any argument of a style #' function or in custom CSS. #' @param code_inline_color Inline Code Color. Defaults to #000. Modifies the #' `.remark-inline-code` class. #' @param code_inline_background_color Inline Code Background Color. Defaults #' to `NULL`. Modifies the `.remark-inline-code` class. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em. #' Modifies the `.remark-inline-code` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-inline-font-size)` in any #' argument of a style function or in custom CSS. #' @param inverse_background_color Inverse Background Color. Defaults to #' #272822. Modifies the `.inverse` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--inverse-background-color)` in any argument of a style function or #' in custom CSS. #' @param inverse_text_color Inverse Text Color. Defaults to #d6d6d6. Modifies #' the `.inverse` class. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--inverse-text-color)` in any #' argument of a style function or in custom CSS. #' @param inverse_text_shadow Enables Shadow on text of inverse slides. #' Defaults to `FALSE`. Modifies the `.inverse` class. #' @param inverse_header_color Inverse Header Color. Defaults to #f3f3f3. #' Modifies the `.inverse h1, .inverse h2, .inverse h3` classes. The value of #' this variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-header-color)` in any argument of a style function or in #' custom CSS. #' @param inverse_link_color Inverse Link Color. Defaults to `link_color`. #' Modifies the `.inverse a, .inverse a > code` classes. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--inverse-link-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_text_color Title Slide Text Color. Defaults to #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--title-slide-text-color)` in any argument of a style function or in #' custom CSS. #' @param title_slide_background_color Title Slide Background Color. Defaults #' to `inverse_background_color`. Modifies the `.title-slide` class. The #' value of this variable is also stored as a CSS variable that can be #' referenced with `var(--title-slide-background-color)` in any argument of a #' style function or in custom CSS. #' @param title_slide_background_image Title Slide Background Image URL. #' Defaults to `NULL`. Modifies the `.title-slide` class. #' @param title_slide_background_size Title Slide Background Image Size, #' defaults to "cover" if background image is set. Defaults to `NULL`. #' Modifies the `.title-slide` class. Accepts CSS #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size) #' property values. #' @param title_slide_background_position Title Slide Background Image #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts #' CSS #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position) #' property values. #' @param footnote_color Footnote text color (if `NA`, then it will be the same #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote` #' class. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies #' the `.footnote` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param footnote_position_bottom Footnote location from bottom of screen. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value) #' property values. #' @param left_column_subtle_color Left Column Text (not last). Defaults to #' #777. Modifies the `.left-column h2, .left-column h3` classes. #' @param left_column_selected_color Left Column Current Selection. Defaults to #' #000. Modifies the #' `.left-column h2:last-of-type, .left-column h3:last-child` classes. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults #' to lightgray. Modifies the `blockquote` element. #' @param table_border_color Table top/bottom border. Defaults to #666. #' Modifies the `table: border-top, border-bottom` elements. #' @param table_row_border_color Table row inner bottom border. Defaults to #' #ddd. Modifies the `table thead th: border-bottom` elements. #' @param table_row_even_background_color Table Even Row Background Color. #' Defaults to #eee. Modifies the `thead, tfoot, tr:nth-child(even)` #' elements. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`). #' Defaults to 20px. Modifies the `html` element. The value of this variable #' is also stored as a CSS variable that can be referenced with #' `var(--base-font-size)` in any argument of a style function or in custom #' CSS. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies #' the `.remark-slide-content` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem. #' Modifies the `.remark-slide-content h1` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h1-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem. #' Modifies the `.remark-slide-content h2` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h2-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem. #' Modifies the `.remark-slide-content h3` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-h3-font-size)` in any #' argument of a style function or in custom CSS. #' @param header_background_auto Add background under slide title automatically #' for h1 header elements. If not enabled, use `class: header_background` to #' enable. Defaults to `FALSE`. #' @param header_background_color Background Color for h1 Header with #' Background. Defaults to `header_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-color)` in any argument of a style function or in #' custom CSS. #' @param header_background_text_color Text Color for h1 Header with #' Background. Defaults to `background_color`. Modifies the #' `.remark-slide-content h1` class. The value of this variable is also #' stored as a CSS variable that can be referenced with #' `var(--header-background-text-color)` in any argument of a style function #' or in custom CSS. #' @param header_background_padding Padding for h1 Header with Background. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) #' property values. #' @param header_background_content_padding_top Top Padding for Content in #' Slide with Header with Background. Defaults to 7rem. Modifies the #' `.remark-slide-content` class. #' @param header_background_ignore_classes Slide Classes Where Header with #' Background will not be Applied. Defaults to #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the #' `.remark-slide-content` class. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to #' 0.9rem. Modifies the `.remark-slide-number` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. #' @param text_font_google Use `google_font()` to specify body font. Defaults #' to `NULL`. Modifies the `body` element. #' @param text_font_family Body Text Font Family (xaringan default is #' `'Droid Serif'`). Defaults to #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body` #' element. The value of this variable is also stored as a CSS variable that #' can be referenced with `var(--text-font-family)` in any argument of a #' style function or in custom CSS. #' @param text_font_weight Body Text Font Weight. Defaults to #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body` #' element. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param text_bold_font_weight Body Bold Text Font Weight. Defaults to bold. #' Modifies the `strong` element. #' @param text_font_url Body Text Font URL(s). Defaults to #' `xaringanthemer_font_default("text_font_url")`. Modifies the #' `@import url()` elements. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the #' `body` element. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--text-font-family-fallback)` in #' any argument of a style function or in custom CSS. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults #' to sans-serif. Modifies the `body` element. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--text-font-base)` in any argument of a style function or in custom #' CSS. #' @param header_font_google Use `google_font()` to specify header font. #' Defaults to `NULL`. Modifies the `body` element. #' @param header_font_family Header Font Family (xaringan default is #' `'Yanone Kaffeesatz'`). Defaults to #' `xaringanthemer_font_default("header_font_family")`. Modifies the #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--header-font-family)` in any #' argument of a style function or in custom CSS. #' @param header_font_weight Header Font Weight. Defaults to #' `xaringanthemer_font_default("header_font_weight")`. Modifies the #' `h1, h2, h3` elements. Accepts CSS #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) #' property values. #' @param header_font_family_fallback Header Font Family Fallback. Defaults to #' Georgia, serif. Modifies the `h1, h2, h3` elements. The value of this #' variable is also stored as a CSS variable that can be referenced with #' `var(--header-font-family-fallback)` in any argument of a style function #' or in custom CSS. #' @param header_font_url Header Font URL. Defaults to #' `xaringanthemer_font_default("header_font_url")`. Modifies the #' `@import url` elements. #' @param code_font_google Use `google_font()` to specify code font. Defaults #' to `NULL`. Modifies the `body` element. #' @param code_font_family Code Font Family. Defaults to #' `xaringanthemer_font_default("code_font_family")`. Modifies the #' `.remark-code, .remark-inline-code` classes. The value of this variable is #' also stored as a CSS variable that can be referenced with #' `var(--code-font-family)` in any argument of a style function or in custom #' CSS. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the #' `.remark-inline` class. Accepts CSS #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) #' property values. The value of this variable is also stored as a CSS #' variable that can be referenced with `var(--code-font-size)` in any #' argument of a style function or in custom CSS. #' @param code_font_url Code Font URL. Defaults to #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url` #' elements. #' @param code_font_family_fallback Code Font Fallback. Defaults to #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the #' `.remark-code, .remark-inline-code` classes. #' @param link_decoration Text decoration of links. Defaults to none. Modifies #' the `a, a > code` elements. Accepts CSS #' [text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) #' property values. #' @template theme_params #' @template style-usage #' @template style_xaringan #' @export style_xaringan <- function( text_color = "#000", header_color = "#000", background_color = "#FFF", link_color = "rgb(249, 38, 114)", text_bold_color = NULL, text_slide_number_color = inverse_background_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = "#000", code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = "#272822", inverse_text_color = "#d6d6d6", inverse_text_shadow = FALSE, inverse_header_color = "#f3f3f3", inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = "#777", left_column_selected_color = "#000", blockquote_left_border_color = "lightgray", table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = "#eee", base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) { # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R force(text_font_family) force(text_font_weight) force(text_font_url) force(text_font_family_fallback) force(header_font_family) force(header_font_weight) force(header_font_url) force(code_font_family) force(code_font_url) force(code_font_family_fallback) # the defaults are google fonts is_default <- function(type, suffix) { # check if font arg value is from xaringanthemer_font_default var <- paste0(type, "_", suffix) inherits( get(var, envir = parent.frame(2), inherits = FALSE), "xaringanthemer_default" ) } for (var in c("text", "header", "code")) { suffixes <- c("font_family", "font_weight", "font_url") if (var == "code") suffixes <- setdiff(suffixes, "font_weight") var_is_google <- all(vapply(suffixes, is_default, logical(1), type = var)) var_is_google <- as.integer(var_is_google) r_set_font_is_google <- glue::glue("{var}_font_is_google <- {var_is_google}") eval(parse(text = r_set_font_is_google)) } # Make sure font names are wrapped in quotes if they have spaces f_args <- names(formals(sys.function())) for (var in f_args[grepl("font_family$", f_args)]) { var_value <- get(var, inherits = FALSE) if (!is.null(var_value)) { eval(parse(text = paste0(var, "<-quote_elements_w_spaces(", var, ")"))) } } # Warn if base_font_size isn't absolute css_abs_units <- c("cm", "mm", "Q", "in", "pc", "pt", "px") if (!grepl(paste(tolower(css_abs_units), collapse = "|"), tolower(base_font_size))) { warning( glue::glue( "Base font size '{base_font_size}' is not in absolute units. ", "For best results, specify the `base_font_size` using absolute CSS units: ", "{paste(css_abs_units, collapse = ', ')}" ), call. = FALSE, immediate. = TRUE ) } # If certain colors aren't in hexadecimal it may cause problems with theme_xaringan() # TODO: at some point I'd rather be able to process CSS colors or variables colors_used_by_theme_xaringan <- list( background_color = background_color, text_color = text_color, header_color = header_color, text_bold_color = text_bold_color, inverse_background_color = inverse_background_color, inverse_text_color = inverse_text_color, inverse_header_color = inverse_header_color ) colors_used_by_theme_xaringan <- purrr::discard(colors_used_by_theme_xaringan, is.null) colors_are_hex <- purrr::map_lgl(colors_used_by_theme_xaringan, check_color_is_hex, throw = NULL) if (any(!colors_are_hex)) { colors_better_as_hex <- names(colors_used_by_theme_xaringan)[!colors_are_hex] colors_better_as_hex <- paste(colors_better_as_hex, collapse = ", ") warning( glue::glue("Colors that will be used by `theme_xaringan()` need to be in ", "hexadecimal format: {colors_better_as_hex}"), immediate. = TRUE, call. = FALSE ) } # Use font_..._google args to overwrite font args for (var in f_args[grepl("font_google$", f_args)]) { gf <- eval(parse(text = var)) if (is.null(gf)) next if (!inherits(gf, "google_font")) { stop("`", var, "` must be set using `google_font()`.") } group <- strsplit(var, "_")[[1]][1] if (group == "text") { text_font_family <- quote_elements_w_spaces(gf$family) text_font_weight <- gf$weights %||% "normal" if (grepl(",", text_font_weight)) { # Use first font weight if multiple are imported text_font_weight <- substr(text_font_weight, 1, regexpr(",", text_font_weight)[1] - 1) } text_font_url <- gf$url } else { eval(parse(text = paste0(group, "_font_family <- quote_elements_w_spaces(gf$family)"))) eval(parse(text = paste0(group, "_font_url <- gf$url"))) } eval(parse(text = paste0(group, "_font_is_google <- 1"))) } extra_font_imports <- if (is.null(extra_fonts)) "" else list2fonts(extra_fonts) extra_font_imports <- paste(extra_font_imports, collapse = "\n") # convert NA arguments to NULL for (var in f_args) { val <- eval(parse(text = var)) if (is.null(val)) next val <- val[!is.na(val)] is_na <- length(val) == 0 if (is_na) assign(var, NULL, envir = sys.frame(sys.nframe())) } # prepare variables for template body_font_family <- paste(c(text_font_family, text_font_family_fallback, text_font_base), collapse = ", ") background_size_fallback <- if (is.null(background_position)) "cover" else "100%" background_size <- background_image %??% (background_size %||% background_size_fallback) title_slide_background_size <- title_slide_background_size %||% ( title_slide_background_image %??% "cover" ) table_row_even_background_color <- table_row_even_background_color %||% background_color # stash theme settings in package env lapply(f_args, function(n) assign(n, get(n), envir = xaringanthemer_env)) for (font_is_google in paste0(c("text", "code", "header"), "_font_is_google")) { assign( font_is_google, get(font_is_google, inherits = FALSE) == 1, envir = xaringanthemer_env ) } xaringanthemer_version <- utils::packageVersion("xaringanthemer") # prepare header background object needs_leading_dot <- !grepl("^\\.", header_background_ignore_classes) header_background_ignore_classes[needs_leading_dot] <- paste0( ".", header_background_ignore_classes[needs_leading_dot] ) header_background_ignore_classes <- purrr::map( header_background_ignore_classes, ~ list(class = .) ) if (is.null(header_background_padding)) { slide_padding <- css_get_padding(padding) header_background_padding <- paste( "2rem", slide_padding$right, "1.5rem", slide_padding$left ) } header_background <- list( auto = header_background_auto, background_color = header_background_color, text_color = header_background_text_color, padding = header_background_padding, content_padding_top = header_background_content_padding_top, ignore = header_background_ignore_classes ) colors <- prepare_colors(colors) tf <- system.file("resources", "template.css", package = "xaringanthemer") template <- readLines(tf, warn = FALSE) template <- paste(template, collapse = "\n") x <- whisker::whisker.render(template) if (!is.null(extra_css)) { x <- c(x, style_extra_css(extra_css, outfile = NULL)) } if (is.null(outfile)) { return(x) } writeLines(x, con = outfile) invisible(outfile) } ================================================ FILE: R/utils.R ================================================ `%||%` <- function(x, y) if (is.null(x)) y else x `%??%` <- function(x, y) if (!is.null(x)) y else NULL requires_package <- function(pkg = "ggplot2", fn = "", required = TRUE) { raise <- if (required) stop else warning if (!requireNamespace(pkg, quietly = TRUE)) { msg <- paste0( "`", pkg, "` is ", if (required) "required " else "suggested ", if (fn != "") paste0("by ", fn, "() ")[1], "but is not installed." ) raise(msg, call. = FALSE) return(invisible(FALSE)) } invisible(TRUE) } #' @keywords internal call_style_xaringan <- function() { paste0( "style_xaringan(", paste(names(formals(style_xaringan)), collapse = ", "), ")" ) } #' Specify Google Font #' #' Builds Google Fonts URL from family name. Extra weights are given in the #' `...` parameters. Languages can be specified in `languages` and must one or #' more of the language codes as given by `google_language_codes()`. #' #' @examples #' google_font("Josefin Sans", "400", "400i", "600i", "700") #' google_font("Josefin Sans", languages = c("latin-ext", "vietnamese")) #' @param family Font family #' @param ... Font weights to include, example "400", "400i" #' @param languages Font languages to include (dependent on the font.) See #' [google_language_codes()]. #' @return A `"google_font"` object. #' @export google_font <- function(family, ..., languages = NULL) { base <- "https://fonts.googleapis.com/css?family=" weights <- if (length(list(...))) paste(c(...), collapse = ",") languages <- if (!is.null(languages)) paste(google_language_codes(languages), collapse = ",") structure( list( family = family, weights = weights, languages = languages, url = paste0( base, gsub(" ", "+", family), if (!is.null(weights)) paste0(":", weights), if (!is.null(languages)) paste0("&subset=", languages), "&display=swap" ) ), class = "google_font" ) } is_google_font <- function(x) inherits(x, "google_font") #' @title List Valid Google Language Codes #' @description Gives a list of valid Language Codes for Google Fonts, or #' validates that the language codes given are valid. #' @seealso [google_font()] #' @param language_codes Vector of potential Google language codes #' @return A vector of Google Font language codes matching `language_codes`. #' @export google_language_codes <- function( language_codes = c( "latin", "latin-ext", "sinhala", "greek", "hebrew", "vietnamese", "cyrillic", "cyrillic-ext", "devanagari", "arabic", "khmer", "tamil", "greek-ext", "thai", "bengali", "gujarati", "oriya", "malayalam", "gurmukhi", "kannada", "telugu", "myanmar" )) { unique(match.arg(language_codes, several.ok = TRUE)) } #' @export print.google_font <- function(x, ...) { cat( "Family: ", x$family, if (!is.null(x$weights)) paste("\nWeights:", x$weights), if (!is.null(x$languages)) paste("\nLangs: ", x$languages), "\nURL: ", x$url ) } quote_elements_w_spaces <- function(x) { x <- strsplit(x, ", ?")[[1]] has_space <- grepl("\\w \\w", x) not_quoted <- grepl("^\\w.+\\w$", x) x[has_space & not_quoted] <- paste0("'", x[has_space & not_quoted], "'") paste(x, collapse = ", ") } str_wrap <- function(...) { paste(strwrap(paste0(...)), collapse = "\n") } ================================================ FILE: R/utils_theme-gen.R ================================================ # nocov start # Theme Generating Helpers ---------------------------------------------- plural_element <- function(css_name) { is_mult <- grepl(",|and|or", css_name) is_class <- grepl("^\\.", css_name) ifelse(is_class, ifelse(is_mult, "classes", "class"), ifelse(is_mult, "elements", "element") ) } element_description <- function(element) { out <- rep("", length(element)) multiple <- grepl("multiple", element) out[multiple] <- "Used in multiple CSS rules." ifelse( multiple | is.na(element) | element == "", out, glue::glue("Modifies the `{element}` {plural_element(element)}.") ) } describe_css_variable <- function(css_variable = NULL) { if (is.null(css_variable)) return("") ifelse( is.na(css_variable), "", glue::glue( " The value of this variable is also stored as a CSS variable that can be ", "referenced with `var({css_variable})` in any argument of a style ", "function or in custom CSS." ) ) } describe_css_property <- function(css_property = NULL) { if (is.null(css_property)) return("") ifelse( is.na(css_property), "", glue::glue(" Accepts CSS {css_property} property values.") ) } # nocov end ================================================ FILE: R/xaringanthemer-deprecated.R ================================================ #' Deprecated or renamed functions #' #' These functions in xaringanthemer have been deprecated or renamed. #' #' @param ... Argumets passed to the new or renamed functions. #' @return The result of the new or renamed function. #' @name xaringanthemer-deprecated NULL #' @description #' Use [style_xaringan()] instead of `write_xaringan_theme()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated write_xaringan_theme <- function(...) { .Deprecated(msg = "write_xaringan_theme() was renamed. Please use `style_xaringan()` instead.") style_xaringan(...) } #' @description #' Use [style_extra_css()] instead of `write_extra_css()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated write_extra_css <- function(...) { .Deprecated(msg = "write_extra_css() was renamed. Please use `style_extra_css()` instead.") style_extra_css(...) } #' @description #' Use [style_mono_light()] instead of `mono_light()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated mono_light <- function(...) { .Deprecated(msg = "mono_light() was renamed. Please use `style_mono_light()` instead.") style_mono_light(...) } #' @description #' Use [style_mono_dark()] instead of `mono_dark()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated mono_dark <- function(...) { .Deprecated(msg = "mono_dark() was renamed. Please use `style_mono_dark()` instead.") style_mono_dark(...) } #' @description #' Use [style_mono_accent()] instead of `mono_accent()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated mono_accent <- function(...) { .Deprecated(msg = "mono_accent() was renamed. Please use `style_mono_accent()` instead.") style_mono_accent(...) } #' @description #' Use [style_mono_accent_inverse()] instead of `mono_accent_inverse()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated mono_accent_inverse <- function(...) { .Deprecated(msg = "mono_accent_inverse() was renamed. Please use `style_mono_accent_inverse()` instead.") style_mono_accent_inverse(...) } #' @description #' Use [style_duo()] instead of `duo()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated duo <- function(...) { .Deprecated(msg = "duo() was renamed. Please use `style_duo()` instead.") style_duo(...) } #' @description #' Use [style_duo_accent()] instead of `duo_accent()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated duo_accent <- function(...) { .Deprecated(msg = "duo_accent() was renamed. Please use `style_duo_accent()` instead.") style_duo_accent(...) } #' @description #' Use [style_duo_accent_inverse()] instead of `duo_accent_inverse()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated duo_accent_inverse <- function(...) { .Deprecated(msg = "duo_accent_inverse() was renamed. Please use `style_duo_accent_inverse()` instead.") style_duo_accent_inverse(...) } #' @description #' Use [style_solarized_light()] instead of `solarized_light()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated solarized_light <- function(...) { .Deprecated(msg = "solarized_light() was renamed. Please use `style_solarized_light()` instead.") style_solarized_light(...) } #' @description #' Use [style_solarized_dark()] instead of `solarized_dark()`. #' #' @export #' @keywords internal #' @rdname xaringanthemer-deprecated solarized_dark <- function(...) { .Deprecated(msg = "solarized_dark() was renamed. Please use `style_solarized_dark()` instead.") style_solarized_dark(...) } ================================================ FILE: R/xaringanthemer-package.R ================================================ #' @importFrom grDevices col2rgb rgb rgb2hsv hsv #' @keywords internal "_PACKAGE" xaringanthemer_env <- new.env(parent = emptyenv()) # I looked up these ggplot geom aesthetic defaults manually via e.g. # ggplot2::geom_line()$geom$default_aes xaringanthemer_env$std_ggplot_defaults <- list( "line" = list(colour = "black"), "vline" = list(colour = "black"), "hline" = list(colour = "black"), "abline" = list(colour = "black"), "segment" = list(colour = "black"), "bar" = list(fill = "grey35"), "col" = list(fill = "grey35"), "boxplot" = list(colour = "grey20", fill = "white"), "contour" = list(colour = "#3366FF"), "density" = list(colour = "black", fill = NA, alpha = NA), "dotplot" = list(colour = "black"), "errorbarh" = list(colour = "black"), "crossbar" = list(colour = "black"), "errorbar" = list(colour = "black"), "linerange" = list(colour = "black"), "pointrange" = list(colour = "black"), "map" = list(colour = "black"), "path" = list(colour = "black"), "line" = list(colour = "black"), "step" = list(colour = "black"), "point" = list(colour = "black"), "polygon" = list(colour = NA, fill = "grey20"), "quantile" = list(colour = "#3366FF"), "rug" = list(colour = "black"), "segment" = list(colour = "black"), "smooth" = list(fill = "grey60", colour = "#3366FF"), "spoke" = list(colour = "black"), "label" = list(colour = "black", family = ""), "text" = list(colour = "black", family = ""), "rect" = list(fill = "grey35"), "tile" = list(fill = "grey20"), "violin" = list(fill = "white", colour = "grey20") ) ================================================ FILE: R/zzz.R ================================================ # nocov start .onLoad <- function(libname, pkgname, ...) { if ("knitr" %in% loadedNamespaces()) { set_fig_showtext() } setHook( packageEvent("knitr", "onLoad"), function(...) { set_fig_showtext() } ) invisible() } # nocov end ================================================ FILE: README.Rmd ================================================ --- output: github_document --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, results = "asis", echo = FALSE, comment = "#>", fig.path = "man/figures/index-", out.width = "100%" ) IS_README <- TRUE library(xaringanthemer) ``` # xaringanthemer [![CRAN status](https://www.r-pkg.org/badges/version/xaringanthemer)](https://CRAN.R-project.org/package=xaringanthemer) [![xaringanthemer status badge](https://gadenbuie.r-universe.dev/badges/xaringanthemer)](https://gadenbuie.r-universe.dev) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![R-CMD-Check status badge](https://github.com/gadenbuie/xaringanthemer/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/gadenbuie/xaringanthemer/actions) [![Codecov](https://img.shields.io/codecov/c/github/gadenbuie/xaringanthemer)](https://app.codecov.io/github/gadenbuie/xaringanthemer) ```{r child="man/fragments/_tagline-gif.Rmd"} ``` ## Installation ```{r child="man/fragments/_installation.Rmd"} ``` ## Features There's a lot more that **xaringanthemer** can do! [Discover xaringanthemer's features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) ================================================ FILE: README.md ================================================ # xaringanthemer [![CRAN status](https://www.r-pkg.org/badges/version/xaringanthemer)](https://CRAN.R-project.org/package=xaringanthemer) [![xaringanthemer status badge](https://gadenbuie.r-universe.dev/badges/xaringanthemer)](https://gadenbuie.r-universe.dev) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![R-CMD-Check status badge](https://github.com/gadenbuie/xaringanthemer/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/gadenbuie/xaringanthemer/actions) [![Codecov](https://img.shields.io/codecov/c/github/gadenbuie/xaringanthemer)](https://app.codecov.io/github/gadenbuie/xaringanthemer) Give your [xaringan](https://github.com/yihui/xaringan) slides some style with **xaringanthemer** within your `slides.Rmd` file without (much) CSS. Animation previewing many xaringanthemer themes ## Installation You can install **xaringanthemer** from CRAN ``` r install.packages("xaringanthemer") ``` or you can install the development version of xaringanthemer from [GitHub](https://github.com/gadenbuie/xaringanthemer). ``` r # install.packages("remotes") remotes::install_github("gadenbuie/xaringanthemer") ``` ## Features There’s a lot more that **xaringanthemer** can do! [Discover xaringanthemer’s features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) ================================================ FILE: cran-comments.md ================================================ ## R CMD check results 0 errors | 0 warnings | 0 note This is a minor maintenance release to address changes in ggplot2. ================================================ FILE: data-raw/theme_template_variables.R ================================================ #nocov start template_variables <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "text_color", "#000", "body", "Text Color", "--text_color" , "header_color", "#000", "h1, h2, h3", "Header Color", "--header-color" , "background_color", "#FFF", ".remark-slide-content", "Slide Background Color", "--background-color" , "link_color", "rgb(249, 38, 114)", "a, a > code", "Link Color", "--link-color" , "text_bold_color", "{NULL}", "strong", "Bold Text Color", "--text-bold-color" , "text_slide_number_color", "{inverse_background_color}", ".remark-slide-number", "Slide Number Color", NA_character_ , "padding", "16px 64px 16px 64px", ".remark-slide-content", "Slide Padding in `top right [bottom left]` format", NA_character_ , "background_image", "{NULL}", ".remark-slide-content", "Background image applied to each *and every* slide. Set `title_slide_background_image = \"none\"` to remove the background image from the title slide", NA_character_ , "background_size", "{NULL}", ".remark-slide-content", "Background image size, requires `background_image` to be set. If `background_image` is set, `background_size` will default to `cover` so the background fills the screen. If both `background_image` and `background_position` are set, will default to 100 percent", NA_character_ , "background_position", "{NULL}", ".remark-slide-content", "Background image position, requires `background_image` to be set, and it is recommended to adjust `background_size`", NA_character_ , "code_highlight_color", "rgba(255,255,0,0.5)", ".remark-code-line-highlighted", "Code Line Highlight", "--code-highlight-color" , "code_inline_color", "#000", ".remark-inline-code", "Inline Code Color", NA_character_ , "code_inline_background_color", "{NULL}", ".remark-inline-code", "Inline Code Background Color", NA_character_ , "code_inline_font_size", "1em", ".remark-inline-code", "Inline Code Text Font Size", "--code-inline-font-size" , "inverse_background_color", "#272822", ".inverse", "Inverse Background Color", "--inverse-background-color" , "inverse_text_color", "#d6d6d6", ".inverse", "Inverse Text Color", "--inverse-text-color" , "inverse_text_shadow", "{FALSE}", ".inverse", "Enables Shadow on text of inverse slides", NA_character_ , "inverse_header_color", "#f3f3f3", ".inverse h1, .inverse h2, .inverse h3", "Inverse Header Color", "--inverse-header-color" , "inverse_link_color", "{link_color}", ".inverse a, .inverse a > code", "Inverse Link Color", "--inverse-link-color" , "title_slide_text_color", "{inverse_text_color}", ".title-slide", "Title Slide Text Color", "--title-slide-text-color" , "title_slide_background_color", "{inverse_background_color}", ".title-slide", "Title Slide Background Color", "--title-slide-background-color" , "title_slide_background_image", "{NULL}", ".title-slide", "Title Slide Background Image URL", NA_character_ , "title_slide_background_size", "{NULL}", ".title-slide", "Title Slide Background Image Size, defaults to \"cover\" if background image is set", NA_character_ , "title_slide_background_position", "{NULL}", ".title-slide", "Title Slide Background Image Position", NA_character_ , "footnote_color", "{NULL}", ".footnote", "Footnote text color (if `NA`, then it will be the same color as `text_color`)", NA_character_ , "footnote_font_size", "0.9em", ".footnote", "Footnote font size", NA_character_ , "footnote_position_bottom", "60px", ".footnote", "Footnote location from bottom of screen", NA_character_ , "left_column_subtle_color", "#777", ".left-column h2, .left-column h3", "Left Column Text (not last)", NA_character_ , "left_column_selected_color", "#000", ".left-column h2:last-of-type, .left-column h3:last-child", "Left Column Current Selection", NA_character_ , "blockquote_left_border_color", "lightgray", "blockquote", "Blockquote Left Border Color", NA_character_ , "table_border_color", "#666", "table: border-top, border-bottom", "Table top/bottom border", NA_character_ , "table_row_border_color", "#ddd", "table thead th: border-bottom", "Table row inner bottom border", NA_character_ , "table_row_even_background_color", "#eee", "thead, tfoot, tr:nth-child(even)", "Table Even Row Background Color", NA_character_ , "base_font_size", "20px", "html", "Base Font Size for All Slide Elements (must be `px`)", "--base-font-size" , "text_font_size", "1rem", ".remark-slide-content", "Slide Body Text Font Size", "--text-font-size" , "header_h1_font_size", "2.75rem", ".remark-slide-content h1", "h1 Header Text Font Size", "--header-h1-font-size" , "header_h2_font_size", "2.25rem", ".remark-slide-content h2", "h2 Header Text Font Size", "--header-h2-font-size" , "header_h3_font_size", "1.75rem", ".remark-slide-content h3", "h3 Header Text Font Size", "--header-h3-font-size" , "header_background_auto", "{FALSE}", "", "Add background under slide title automatically for h1 header elements. If not enabled, use `class: header_background` to enable", NA_character_ , "header_background_color", "{header_color}", ".remark-slide-content h1", "Background Color for h1 Header with Background", "--header-background-color" , "header_background_text_color", "{background_color}", ".remark-slide-content h1", "Text Color for h1 Header with Background", "--header-background-text-color" , "header_background_padding", "{NULL}", ".remark-slide-content h1", "Padding for h1 Header with Background", NA_character_ , "header_background_content_padding_top", "7rem", ".remark-slide-content", "Top Padding for Content in Slide with Header with Background", NA_character_ , "header_background_ignore_classes", "{c('normal', 'inverse', 'title', 'middle', 'bottom')}", ".remark-slide-content", "Slide Classes Where Header with Background will not be Applied", NA_character_ , "text_slide_number_font_size", "0.9rem", ".remark-slide-number", "Slide Number Text Font Size", NA_character_ , "text_font_google", "{NULL}", "body", "Use `google_font()` to specify body font", NA_character_ , "text_font_family", '{xaringanthemer_font_default("text_font_family")}', "body", "Body Text Font Family (xaringan default is `'Droid Serif'`)", "--text-font-family" , "text_font_weight", '{xaringanthemer_font_default("text_font_weight")}', "body", "Body Text Font Weight", NA_character_ , "text_bold_font_weight", 'bold', "strong", "Body Bold Text Font Weight", NA_character_ , "text_font_url", '{xaringanthemer_font_default("text_font_url")}', "@import url()", "Body Text Font URL(s)", NA_character_ , "text_font_family_fallback", '{xaringanthemer_font_default("text_font_family_fallback")}', "body", "Body Text Font Fallbacks", "--text-font-family-fallback" , "text_font_base", "sans-serif", "body", "Body Text Base Font (Total Failure Fallback)", "--text-font-base" , "header_font_google", "{NULL}", "body", "Use `google_font()` to specify header font", NA_character_ , "header_font_family", '{xaringanthemer_font_default("header_font_family")}', "h1, h2, h3", "Header Font Family (xaringan default is `'Yanone Kaffeesatz'`)", "--header-font-family" , "header_font_weight", '{xaringanthemer_font_default("header_font_weight")}', "h1, h2, h3", "Header Font Weight", NA_character_ , "header_font_family_fallback", 'Georgia, serif', "h1, h2, h3", "Header Font Family Fallback", "--header-font-family-fallback" , "header_font_url", '{xaringanthemer_font_default("header_font_url")}', "@import url", "Header Font URL", NA_character_ , "code_font_google", "{NULL}", "body", "Use `google_font()` to specify code font", NA_character_ , "code_font_family", '{xaringanthemer_font_default("code_font_family")}', ".remark-code, .remark-inline-code", "Code Font Family", "--code-font-family" , "code_font_size", "0.9rem", ".remark-inline", "Code Text Font Size", "--code-font-size" , "code_font_url", '{xaringanthemer_font_default("code_font_url")}', "@import url", "Code Font URL", NA_character_ , "code_font_family_fallback", '{xaringanthemer_font_default("code_font_family_fallback")}', ".remark-code, .remark-inline-code", "Code Font Fallback", NA_character_ , "link_decoration", "none", "a, a > code", "Text decoration of links", NA_character_ ) set_default <- function(tv, ..., set_var = "default") { vars <- c(...) for (var in names(vars)) { tv[tv$variable == var, set_var] <- vars[var] } tv } template_variables$css_property <- NA_character_ mdn_font_size <- "[font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)" mdn_font_weight <- "[font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)" mdn_background_size <- "[background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)" mdn_background_position <- "[background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)" mdn_padding <- "[padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)" template_variables <- set_default( template_variables, set_var = "css_property", padding = mdn_padding, background_size = mdn_background_size, background_position = mdn_background_position, code_inline_font_size = mdn_font_size, title_slide_background_position = mdn_background_position, title_slide_background_size = mdn_background_size, footnote_font_size = mdn_font_size, footnote_position_bottom = "[position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value)", text_font_size = mdn_font_size, header_h1_font_size = mdn_font_size, header_h2_font_size = mdn_font_size, header_h3_font_size = mdn_font_size, header_background_padding = mdn_padding, text_slide_number_font_size = mdn_font_size, text_font_weight = mdn_font_weight, header_font_weight = mdn_font_weight, code_font_size = mdn_font_size, link_decoration = "[text-decoration](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration)" ) template_mono_light <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "base_color", "#23395b", "multiple", "Monotone base color, works best with a strong color", "--base" , "white_color", "{lighten_color(base_color, 0.9)}", "multiple", "Brightest color used, default is a very light version of `base_color`", "--white" , "black_color", "{darken_color(base_color, 0.3)}", "multiple", "Darkest color used, default is a very dark, version of `base_color`", "--black" ) template_mono_light <- dplyr::bind_rows(template_mono_light, template_variables) template_mono_light <- set_default( template_mono_light, text_color = "{black_color}", header_color = "{base_color}", background_color = "{white_color}", link_color = "{base_color}", text_bold_color = "{base_color}", text_slide_number_color = "{base_color}", code_inline_color = "{base_color}", inverse_background_color = "{base_color}", inverse_text_color = "{white_color}", inverse_header_color = "{inverse_text_color}", left_column_subtle_color = "{apply_alpha(base_color, 0.6)}", left_column_selected_color = "{base_color}", blockquote_left_border_color = "{apply_alpha(base_color, 0.5)}", table_row_even_background_color = "{lighten_color(base_color, 0.8)}") template_mono_dark <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "base_color", "#cbf7ed", "multiple", "Monotone Base Color, works best with a light color.", "--base" , "white_color", "{lighten_color(base_color, 0.8)}", "multiple", "Brightest color used, default is a very light version of `base_color`", "--white" , "black_color", "{darken_color(base_color, 0.85)}", "multiple", "Darkest color used, default is a very dark, version of `base_color`", "--black" ) template_mono_dark <- dplyr::bind_rows(template_mono_dark, template_variables) template_mono_dark <- set_default( template_mono_dark, text_color = "{white_color}", header_color = "{base_color}", background_color = "{black_color}", link_color = "{base_color}", text_bold_color = "{base_color}", text_slide_number_color = "{base_color}", code_inline_color = "{base_color}", inverse_background_color = "{base_color}", inverse_text_color = "{black_color}", inverse_header_color = "{inverse_text_color}", left_column_subtle_color = "{apply_alpha(base_color, 0.6)}", left_column_selected_color = "{base_color}", blockquote_left_border_color = "{apply_alpha(base_color, 0.5)}", table_row_even_background_color = "{darken_color(base_color, 0.7)}") template_mono_accent <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "base_color", "#43418A", "multiple", "Monotone Base Color, works best with a strong color", "--base" , "white_color", "#FFFFFF", "multiple", "Brightest color used", "--white" , "black_color", "#272822", "multiple", "Darkest color used", "--black" ) template_mono_accent <- dplyr::bind_rows(template_mono_accent, template_variables) template_mono_accent <- set_default( template_mono_accent, text_color = "{black_color}", header_color = "{base_color}", background_color = "{white_color}", link_color = "{base_color}", text_bold_color = "{base_color}", text_slide_number_color = "{base_color}", code_inline_color = "{base_color}", inverse_background_color = "{base_color}", inverse_text_color = "{white_color}", inverse_header_color = "{inverse_text_color}", left_column_subtle_color = "{apply_alpha(base_color, 0.6)}", left_column_selected_color = "{base_color}", blockquote_left_border_color = "{apply_alpha(base_color, 0.5)}", table_row_even_background_color = "{lighten_color(base_color, 0.8)}") template_mono_accent_inverse <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "base_color", "#3C989E", "multiple", "Monotone Base Color, works best with a light color", "--base" , "white_color", "#FFFFFF", "multiple", "Brightest color used, default is a very light version of `base_color`", "--white" , "black_color", "{darken_color(base_color, 0.9)}", "multiple", "Darkest color used, default is a very dark, version of `base_color`", "--black" ) template_mono_accent_inverse <- dplyr::bind_rows(template_mono_accent_inverse, template_variables) template_mono_accent_inverse <- set_default( template_mono_accent_inverse, text_color = "{white_color}", header_color = "{base_color}", background_color = "{black_color}", link_color = "{base_color}", text_bold_color = "{base_color}", text_slide_number_color = "{base_color}", code_inline_color = "{base_color}", inverse_background_color = "{base_color}", inverse_text_color = "{black_color}", inverse_header_color = "{inverse_text_color}", left_column_subtle_color = "{apply_alpha(base_color, 0.6)}", left_column_selected_color = "{base_color}", blockquote_left_border_color = "{apply_alpha(base_color, 0.5)}", table_row_even_background_color = "{darken_color(base_color, 0.8)}") template_duo_light <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "primary_color", "#1F4257", "multiple", "Duotone Secondary Color", "--primary" , "secondary_color", "#F97B64", "multiple", "Duotone Primary Color", "--secondary" , "white_color", "{lighten_color(primary_color, 0.99)}", "multiple", "Brightest color used, default is a very light version of `primary_color`", "--white" , "black_color", "{darken_color(secondary_color, 0.9)}", "multiple", "Darkest color used, default is a very dark version of `secondary_color`", "--black" ) template_duo_light <- dplyr::bind_rows(template_duo_light, template_variables) template_duo_light <- set_default( template_duo_light, text_color = "{black_color}", header_color = "{primary_color}", background_color = "{white_color}", link_color = "{secondary_color}", text_bold_color = "{secondary_color}", text_slide_number_color = "{primary_color}", code_inline_color = "{secondary_color}", inverse_background_color = "{primary_color}", inverse_text_color = "{secondary_color}", inverse_header_color = "{inverse_text_color}", left_column_subtle_color = "{apply_alpha(secondary_color, 0.6)}", left_column_selected_color = "{secondary_color}", blockquote_left_border_color = "{apply_alpha(secondary_color, 0.5)}", table_row_even_background_color = "{lighten_color(secondary_color, 0.9)}") template_duo <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "primary_color", "#1F4257", "multiple", "Duotone Primary Color", "--primary" , "secondary_color", "#F97B64", "multiple", "Duotone Secondary Color", "--secondary" ) template_duo <- dplyr::bind_rows(template_duo, template_variables) template_duo <- set_default( template_duo, text_color = "{choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99))}", header_color = "{secondary_color}", background_color = "{primary_color}", link_color = "{secondary_color}", text_bold_color = "{secondary_color}", text_slide_number_color = "{text_color}", code_inline_color = "{secondary_color}", inverse_background_color = "{secondary_color}", inverse_text_color = "{primary_color}", inverse_header_color = "{inverse_text_color}", title_slide_text_color = "{secondary_color}", title_slide_background_color = "{primary_color}", left_column_subtle_color = "{apply_alpha(secondary_color, 0.6)}", left_column_selected_color = "{secondary_color}", blockquote_left_border_color = "{apply_alpha(secondary_color, 0.5)}", table_row_even_background_color = "{lighten_color(primary_color, 0.9)}") template_duo_accent <- tibble::tribble( ~ variable, ~ default, ~ element, ~ description, ~ css_variable , "primary_color", "#035AA6", "multiple", "Duotone Primary Color", "--primary" , "secondary_color", "#03A696", "multiple", "Duotone Secondary Color", "--secondary" , "white_color", "#FFFFFF", "multiple", "Brightest color used", "--white" , "black_color", "#000000", "multiple", "Darkest color used", "--black" ) template_duo_accent <- dplyr::bind_rows(template_duo_accent, template_variables) template_duo_accent <- set_default( template_duo_accent, text_color = "{black_color}", header_color = "{primary_color}", background_color = "{white_color}", link_color = "{choose_dark_or_light(secondary_color, primary_color, secondary_color)}", text_bold_color = "{choose_dark_or_light(secondary_color, primary_color, secondary_color)}", text_slide_number_color = "{primary_color}", code_inline_color = "{choose_dark_or_light(secondary_color, primary_color, secondary_color)}", inverse_background_color = "{secondary_color}", inverse_text_color = "{choose_dark_or_light(secondary_color, black_color, white_color)}", inverse_header_color = "{inverse_text_color}", title_slide_background_color = "{primary_color}", title_slide_text_color = "{choose_dark_or_light(primary_color, black_color, white_color)}", left_column_subtle_color = "{apply_alpha(primary_color, 0.6)}", left_column_selected_color = "{primary_color}", blockquote_left_border_color = "{apply_alpha(secondary_color, 0.5)}", table_row_even_background_color = "{lighten_color(secondary_color, 0.8)}") template_duo_accent_inverse <- set_default( template_duo_accent, text_color = "{white_color}", header_color = "{primary_color}", background_color = "{black_color}", link_color = "{choose_dark_or_light(secondary_color, secondary_color, primary_color)}", text_bold_color = "{choose_dark_or_light(secondary_color, secondary_color, primary_color)}", text_slide_number_color = "{primary_color}", code_inline_color = "{choose_dark_or_light(secondary_color, secondary_color, primary_color)}", inverse_background_color = "{secondary_color}", inverse_text_color = "{choose_dark_or_light(secondary_color, black_color, white_color)}", inverse_header_color = "{inverse_text_color}", title_slide_background_color = "{primary_color}", title_slide_text_color = "{choose_dark_or_light(primary_color, black_color, white_color)}", left_column_subtle_color = "{apply_alpha(primary_color, 0.6)}", left_column_selected_color = "{primary_color}", blockquote_left_border_color = "{apply_alpha(secondary_color, 0.5)}", table_row_even_background_color = "{darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.2)}") solarized <- list( "base03" = "#002b36", "base02" = "#073642", "base01" = "#586e75", "base00" = "#657b83", "base0" = "#839496", "base1" = "#93a1a1", "base2" = "#eee8d5", "base3" = "#fdf6e3", "yellow" = "#b58900", "orange" = "#cb4b16", "red" = "#dc322f", "magenta" = "#d33682", "violet" = "#6c71c4", "blue" = "#268bd2", "cyan" = "#2aa198", "green" = "#859900") template_solarized_light <- set_default( template_variables, text_color = solarized$base00, header_color = solarized$red, background_color = solarized$base3, link_color = solarized$yellow, text_bold_color = solarized$magenta, text_slide_number_color = solarized$base1, code_highlight_color = "#268bd240", #xaringanthemer:::apply_alpha(solarized$blue, 0.25) code_inline_color = solarized$violet, inverse_background_color = solarized$base03, inverse_text_color = solarized$base3, inverse_header_color = "{inverse_text_color}", title_slide_text_color = "{inverse_text_color}", title_slide_background_color = "{inverse_background_color}", left_column_subtle_color = solarized$base1, left_column_selected_color = solarized$base01, blockquote_left_border_color = solarized$orange, table_border_color = solarized$base0, table_row_border_color = solarized$base0, table_row_even_background_color = solarized$base2 ) template_solarized_dark <- set_default( template_variables, text_color = solarized$base0, header_color = solarized$red, background_color = solarized$base03, link_color = solarized$yellow, text_bold_color = solarized$magenta, text_slide_number_color = solarized$base01, code_highlight_color = "#268bd240", #xaringanthemer:::apply_alpha(solarized$blue, 0.25) code_inline_color = solarized$violet, inverse_background_color = solarized$base3, inverse_text_color = solarized$base03, inverse_header_color = "{inverse_text_color}", title_slide_text_color = "{inverse_text_color}", title_slide_background_color = "{inverse_background_color}", left_column_subtle_color = solarized$base01, left_column_selected_color = solarized$base1, blockquote_left_border_color = solarized$orange, table_border_color = solarized$base00, table_row_border_color = solarized$base00, table_row_even_background_color = solarized$base02 ) usethis::use_data( template_variables, template_mono_accent, template_mono_accent_inverse, template_mono_light, template_mono_dark, template_duo, template_duo_light, template_duo_accent, template_duo_accent_inverse, template_solarized_light, template_solarized_dark, internal = TRUE, overwrite = TRUE ) ================================================ FILE: index.Rmd ================================================ --- output: github_document --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, results = "asis", echo = FALSE, comment = "#>", fig.path = "man/figures/index-", out.width = "100%" ) IS_README <- TRUE library(xaringanthemer) ``` # xaringanthemer [![CRAN status](https://www.r-pkg.org/badges/version/xaringanthemer)](https://CRAN.R-project.org/package=xaringanthemer) [![xaringanthemer status badge](https://gadenbuie.r-universe.dev/badges/xaringanthemer)](https://gadenbuie.r-universe.dev) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![R-CMD-Check status badge](https://github.com/gadenbuie/xaringanthemer/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/gadenbuie/xaringanthemer/actions) [![Codecov](https://img.shields.io/codecov/c/github/gadenbuie/xaringanthemer)](https://codecov.io/github/gadenbuie/xaringanthemer) ```{r child="man/fragments/_tagline-gif.Rmd"} ``` ## Installation ```{r child="man/fragments/_installation.Rmd"} ``` ## Quick Intro [theme-functions]: #themes [theme-settings]: #theme-settings [template-variables]: vignettes/template-variables.md [ggplot2]: https://ggplot2.tidyverse.org ```{r child="man/fragments/_quick-intro.Rmd"} ``` ## Features There's a lot more that **xaringanthemer** can do! [Discover xaringanthemer's features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) ================================================ FILE: index.md ================================================ # xaringanthemer [![CRAN status](https://www.r-pkg.org/badges/version/xaringanthemer)](https://CRAN.R-project.org/package=xaringanthemer) [![xaringanthemer status badge](https://gadenbuie.r-universe.dev/badges/xaringanthemer)](https://gadenbuie.r-universe.dev) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html) [![R-CMD-Check status badge](https://github.com/gadenbuie/xaringanthemer/workflows/R-CMD-check/badge.svg?branch=main)](https://github.com/gadenbuie/xaringanthemer/actions) [![Codecov](https://img.shields.io/codecov/c/github/gadenbuie/xaringanthemer)](https://codecov.io/github/gadenbuie/xaringanthemer) Give your [xaringan](https://github.com/yihui/xaringan) slides some style with **xaringanthemer** within your `slides.Rmd` file without (much) CSS. Animation previewing many xaringanthemer themes ## Installation You can install **xaringanthemer** from CRAN ``` r install.packages("xaringanthemer") ``` or you can install the development version of xaringanthemer from [GitHub](https://github.com/gadenbuie/xaringanthemer). ``` r # install.packages("remotes") remotes::install_github("gadenbuie/xaringanthemer") ``` ## Quick Intro First, add the `xaringan-themer.css` file to the YAML header of your xaringan slides. ``` yaml output: xaringan::moon_reader: css: xaringan-themer.css ``` Then, in a hidden chunk just after the knitr setup chunk, load **xaringanthemer** and try one of the [theme functions](#themes). ```` markdown ```{r xaringan-themer, include=FALSE, warning=FALSE} library(xaringanthemer) style_mono_accent( base_color = "#1c5253", header_font_google = google_font("Josefin Sans"), text_font_google = google_font("Montserrat", "300", "300i"), code_font_google = google_font("Fira Mono") ) ``` ```` Example title and normal slides using a green xaringanthemer theme ### Matching ggplot Themes **xaringanthemer** even provides a [ggplot2](https://ggplot2.tidyverse.org) theme with `theme_xaringan()` that uses the colors and fonts from your slide theme. Built on the [showtext](https://github.com/yixuan/showtext) package, and designed to work seamlessly with [Google Fonts](https://fonts.google.com). Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See `?scale_xaringan` for more details. More details and examples can be found in `vignette("ggplot2-themes")`. ``` r library(ggplot2) ggplot(diamonds) + aes(cut, fill = cut) + geom_bar(show.legend = FALSE) + labs( x = "Cut", y = "Count", title = "A Fancy diamonds Plot" ) + theme_xaringan(background_color = "#FFFFFF") + scale_xaringan_fill_discrete() ``` ### Tab Completion **xaringanthemer** is Tab friendly – [use autocomplete to explore](#theme-settings) the [template variables](vignettes/template-variables.md) that you can adjust in each of the themes! Demonstration of argument auto-completion with RStudio ### R Markdown Template in RStudio You can also skip the above and just create a *Ninja Themed Presentation* from the New R Markdown Document menu in RStudio.
The 'New R Markdown Document' menu in RStudio
## Features There’s a lot more that **xaringanthemer** can do! [Discover xaringanthemer’s features.](https://pkg.garrickadenbuie.com/xaringanthemer/articles/xaringanthemer.html) ================================================ FILE: inst/fonts/OFL.txt ================================================ Copyright 2019 Alfredo Marco Pradil (https://hanken.co/), with Reserved Font Name "Glacial Indifference". This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: inst/resources/template.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * {{#xaringanthemer_version}} * Version: {{xaringanthemer_version}}{{/xaringanthemer_version}} * * ------------------------------------------------------- */ @import url({{{text_font_url}}}); @import url({{{header_font_url}}}); @import url({{{code_font_url}}}); {{#extra_font_imports}}{{{extra_font_imports}}}{{/extra_font_imports}} :root { /* Fonts */ --text-font-family: {{text_font_family}}; --text-font-is-google: {{text_font_is_google}}; --text-font-family-fallback: {{text_font_family_fallback}}; --text-font-base: {{text_font_base}}; --header-font-family: {{header_font_family}}; --header-font-is-google: {{header_font_is_google}}; --header-font-family-fallback: {{header_font_family_fallback}}; --code-font-family: {{code_font_family}}; --code-font-is-google: {{code_font_is_google}}; --base-font-size: {{base_font_size}}; --text-font-size: {{text_font_size}}; --code-font-size: {{code_font_size}}; --code-inline-font-size: {{code_inline_font_size}}; --header-h1-font-size: {{header_h1_font_size}}; --header-h2-font-size: {{header_h2_font_size}}; --header-h3-font-size: {{header_h3_font_size}}; /* Colors */ --text-color: {{text_color}}; --header-color: {{header_color}}; --background-color: {{background_color}}; --link-color: {{link_color}};{{#text_bold_color}} --text-bold-color: {{text_bold_color}};{{/text_bold_color}} --code-highlight-color: {{code_highlight_color}}; --inverse-text-color: {{inverse_text_color}}; --inverse-background-color: {{inverse_background_color}}; --inverse-header-color: {{inverse_header_color}}; --inverse-link-color: {{inverse_link_color}}; --title-slide-background-color: {{title_slide_background_color}}; --title-slide-text-color: {{title_slide_text_color}}; --header-background-color: {{header_background_color}}; --header-background-text-color: {{header_background_text_color}};{{#colors}} --{{color_name}}: {{value}};{{/colors}} } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: {{text_font_weight}}; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: {{header_font_weight}}; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: {{text_font_size}};{{#background_image}} background-image: url({{{background_image}}});{{#background_size}} background-size: {{background_size}};{{/background_size}}{{#background_position}} background-position: {{background_position}};{{/background_position}}{{/background_image}} padding: {{padding}}; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), {{code_font_family_fallback}}, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size);{{#code_inline_color}} color: {{code_inline_color}};{{/code_inline_color}}{{#code_inline_background_color}} background-color: {{code_inline_background_color}}; padding: 2px;{{/code_inline_background_color}} } .remark-slide-number { color: {{text_slide_number_color}}; opacity: 1; font-size: {{text_slide_number_font_size}}; } strong { font-weight: {{text_bold_font_weight}};{{#text_bold_color}} color: var(--text-bold-color);{{/text_bold_color}} } a, a > code { color: var(--link-color); text-decoration: {{link_decoration}}; } .footnote { position: absolute;{{#footnote_color}} color: {{footnote_color}};{{/footnote_color}} bottom: {{footnote_position_bottom}}; padding-right: 4em; font-size: {{footnote_font_size}}; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); {{#inverse_text_shadow}}text-shadow: 0 0 20px #333;{{/inverse_text_shadow}} } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color);{{#title_slide_background_image}} background-image: url("{{{title_slide_background_image}}}");{{/title_slide_background_image}}{{#title_slide_background_size}} background-size: {{title_slide_background_size}};{{/title_slide_background_size}}{{#title_slide_background_position}} background-position: {{title_slide_background_position}};{{/title_slide_background_position}} } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: {{left_column_subtle_color}}; } .left-column h2:last-of-type, .left-column h3:last-child { color: {{left_column_selected_color}}; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px {{blockquote_left_border_color}}; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid {{table_border_color}}; border-bottom: 1px solid {{table_border_color}}; } .remark-slide table thead th { border-bottom: 1px solid {{table_row_border_color}}; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: {{table_row_even_background_color}}; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: {{table_row_even_background_color}}; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } {{#header_background}} /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1{{#auto}}, .remark-slide-content{{#ignore}}:not({{class}}){{/ignore}} > h1{{/auto}} { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: {{padding}}; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background{{#auto}}, .remark-slide-content{{#ignore}}:not({{class}}){{/ignore}}{{/auto}} { padding-top: {{content_padding_top}}; } {{/header_background}} @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } {{#colors}} .{{color_name}} { color: var(--{{color_name}}); } .bg-{{color_name}} { background-color: var(--{{color_name}}); } {{/colors}} ================================================ FILE: inst/resources/template_title-slide.css ================================================ .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { background-color: #fff !important; color: #222 !important; } .title-slide h3 { font-family: 'Roboto Condensed', 'Avenir Next', 'Helvetica Neue', 'Helvetica', sans-serif; font-weight: 400; padding-top: 15px; font-size: 28px; } .title-slide h3:nth-of-type(2) { margin-top: 10px; font-size: 28px; } .title-slide table { padding-top: 35px !important; } .title-slide i.fa { font-size: 2em; } ================================================ FILE: inst/rmarkdown/templates/xaringanthemer/skeleton/skeleton.Rmd ================================================ --- title: "Presentation Ninja" subtitle: "⚔️ xaringan +
😎 xaringanthemer" author: - "Yihui Xie" - "Garrick Aden-Buie" date: '`r Sys.Date()`' output: xaringan::moon_reader: css: xaringan-themer.css nature: slideNumberFormat: "%current%" highlightStyle: github highlightLines: true ratio: 16:9 countIncrementalSlides: true --- ```{r setup, include=FALSE} options(htmltools.dir.version = FALSE) knitr::opts_chunk$set( fig.width=9, fig.height=3.5, fig.retina=3, out.width = "100%", cache = FALSE, echo = TRUE, message = FALSE, warning = FALSE, hiline = TRUE ) ``` ```{r xaringan-themer, include=FALSE, warning=FALSE} library(xaringanthemer) style_duo_accent( primary_color = "#1381B0", secondary_color = "#FF961C", inverse_header_color = "#FFFFFF" ) ``` ## Typography Text can be **bold**, _italic_, ~~strikethrough~~, or `inline code`. [Link to another slide](#colors). ### Lorem Ipsum Dolor imperdiet nostra sapien scelerisque praesent curae metus facilisis dignissim tortor. Lacinia neque mollis nascetur neque urna velit bibendum. Himenaeos suspendisse leo varius mus risus sagittis aliquet venenatis duis nec. - Dolor cubilia nostra nunc sodales - Consectetur aliquet mauris blandit - Ipsum dis nec porttitor urna sed --- name: colors ## Colors .left-column[ Text color [Link Color](#3) **Bold Color** _Italic Color_ `Inline Code` ] .right-column[ Lorem ipsum dolor sit amet, [consectetur adipiscing elit (link)](#3), sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Erat nam at lectus urna. Pellentesque elit ullamcorper **dignissim cras tincidunt (bold)** lobortis feugiat. _Eros donec ac odio tempor_ orci dapibus ultrices. Id porta nibh venenatis cras sed felis eget velit aliquet. Aliquam id diam maecenas ultricies mi. Enim sit amet `code_color("inline")` venenatis urna cursus eget nunc scelerisque viverra. ] --- # Big Topic or Inverse Slides `#` ## Slide Headings `##` ### Sub-slide Headings `###` #### Bold Call-Out `####` This is a normal paragraph text. Only use header levels 1-4. ##### Possible, but not recommended `#####` ###### Definitely don't use h6 `######` --- # Left-Column Headings .left-column[ ## First ## Second ## Third ] .right-column[ Dolor quis aptent mus a dictum ultricies egestas. Amet egestas neque tempor fermentum proin massa! Dolor elementum fermentum pharetra lectus arcu pulvinar. ] --- class: inverse center middle # Topic Changing Interstitial -- ``` class: inverse center middle ``` --- layout: true ## Blocks --- ### Blockquote > This is a blockquote following a header. > > When something is important enough, you do it even if the odds are not in your favor. --- ### Code Blocks #### R Code ```{r eval=FALSE} ggplot(gapminder) + aes(x = gdpPercap, y = lifeExp, size = pop, color = country) + geom_point() + facet_wrap(~year) ``` #### JavaScript ```js var fun = function lang(l) { dateformat.i18n = require('./lang/' + l) return true; } ``` --- ### More R Code ```{r eval=FALSE} dplyr::starwars %>% dplyr::slice_sample(n = 4) ``` --- ```{r message=TRUE, eval=requireNamespace("cli", quietly = TRUE)} cli::cli_alert_success("It worked!") ``` -- ```{r message=TRUE} message("Just a friendly message") ``` -- ```{r warning=TRUE} warning("This could be bad...") ``` -- ```{r error=TRUE} stop("I hope you're sitting down for this") ``` --- layout: true ## Tables --- exclude: `r if (requireNamespace("tibble", quietly=TRUE)) "false" else "true"` ```{r eval=requireNamespace("tibble", quietly=TRUE)} tibble::as_tibble(mtcars) ``` --- ```{r} knitr::kable(head(mtcars), format = 'html') ``` --- exclude: `r if (requireNamespace("DT", quietly=TRUE)) "false" else "true"` ```{r eval=requireNamespace("DT", quietly=TRUE)} DT::datatable(head(mtcars), fillContainer = FALSE, options = list(pageLength = 4)) ``` --- layout: true ## Lists --- .pull-left[ #### Here is an unordered list: * Item foo * Item bar * Item baz * Item zip ] .pull-right[ #### And an ordered list: 1. Item one 1. Item two 1. Item three 1. Item four ] --- ### And a nested list: - level 1 item - level 2 item - level 2 item - level 3 item - level 3 item - level 1 item - level 2 item - level 2 item - level 2 item - level 1 item - level 2 item - level 2 item - level 1 item --- ### Nesting an ol in ul in an ol - level 1 item (ul) 1. level 2 item (ol) 1. level 2 item (ol) - level 3 item (ul) - level 3 item (ul) - level 1 item (ul) 1. level 2 item (ol) 1. level 2 item (ol) - level 3 item (ul) - level 3 item (ul) 1. level 4 item (ol) 1. level 4 item (ol) - level 3 item (ul) - level 3 item (ul) - level 1 item (ul) --- layout: true ## Plots --- ```{r plot-example, eval=requireNamespace("ggplot2", quietly=TRUE)} library(ggplot2) (g <- ggplot(mpg) + aes(hwy, cty, color = class) + geom_point()) ``` --- ```{r plot-example-themed, eval=requireNamespace("showtext", quietly=TRUE) && requireNamespace("ggplot2", quietly=TRUE)} g + xaringanthemer::theme_xaringan(text_font_size = 16, title_font_size = 18) + ggtitle("A Plot About Cars") ``` .footnote[Requires `{showtext}`] --- layout: false ## Square image
GithHub Octocat
.footnote[GitHub Octocat] --- ### Wide image ![A wide image with a diagram of branching in git.](https://docs.github.com/assets/images/help/repository/branching.png) .footnote[Wide images scale to 100% slide width] --- ## Two images .pull-left[ ![A GitHub Octocat, style "mother hubber"](https://octodex.github.com/images/motherhubbertocat.png) ] .pull-right[ ![A GitHub Octocat, style "dinotcat"](https://octodex.github.com/images/dinotocat.png) ] --- ### Definition lists can be used with HTML syntax.
Name
Godzilla
Born
1952
Birthplace
Japan
Color
Green
--- class: center, middle # Thanks! Slides created via the R packages: [**xaringan**](https://github.com/yihui/xaringan)
[gadenbuie/xaringanthemer](https://github.com/gadenbuie/xaringanthemer) The chakra comes from [remark.js](https://remarkjs.com), [**knitr**](http://yihui.name/knitr), and [R Markdown](https://rmarkdown.rstudio.com). ================================================ FILE: inst/rmarkdown/templates/xaringanthemer/template.yaml ================================================ name: Ninja Themed Presentation description: > Create a themed presentation using the xaringanthemer package, to make a xaringan presentation based on remark.js. create_dir: false ================================================ FILE: inst/scripts/generate_theme_functions.R ================================================ source(here::here("R/utils_theme-gen.R")) load(here::here("R/sysdata.rda")) # R/theme_settings.R contains element_description() and plural_elements() setup_theme_function <- function( f_name = "style_xaringan", template = template_variables, ..., file = "", body = " eval(parse(text = call_style_xaringan()))", theme_colors = NULL ) { if (file == "clip" && !requireNamespace("clipr", quietly = TRUE)) file <- "" f_body_theme_colors <- include_theme_colors(theme_colors) f_body <- c( " # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R", f_body_theme_colors, body ) tv <- template f_def <- c( "# Generated by inst/scripts/generate_theme_functions.R: do not edit by hand\n", as.character( glue::glue_data( tv, "#' @param {variable} {description}. ", "Defaults to {gsub('[{{}}]', '`', default)}. ", "{element_description(element)}", "{describe_css_property(css_property)}", "{describe_css_variable(css_variable)}" ) ), "#' @template theme_params", "#' @template style-usage", ..., glue::glue("{f_name} <- function("), as.character( glue::glue_data( tv, " {variable} = {ifelse(!grepl('^[{].+[}]$', default), paste0('\"', default, '\"'), gsub('[{}]', '', default))}," ) ), " colors = NULL,", " extra_css = NULL,", " extra_fonts = NULL,", " outfile = \"xaringan-themer.css\"", ") {" ) if (!is.null(f_body)) f_def <- c(f_def, f_body, "}") if (file == "clip") { clipr::write_clip(f_def) message("Wrote ", f_name, " function signature to clipboard.") } else { cat(reflow_roxygen(f_def), sep = "\n", file = file) message("Wrote ", f_name, " to ", file) } invisible() } reflow_roxygen <- function(x) { is_roxy_tag <- grepl("^#' @", x) roxy_tags <- x[is_roxy_tag] roxy_tags <- sub("^#' ", "", roxy_tags) roxy_tags <- purrr::map_chr( roxy_tags, ~ paste( "#'", strwrap( pack_inline_code(.x), width = 77, exdent = 2 ), collapse = "\n") ) roxy_tags <- gsub("\u00A0", " ", roxy_tags) x[is_roxy_tag] <- roxy_tags x } pack_inline_code <- function(x) { stopifnot(length(x) == 1, is.character(x)) x <- strsplit(x, "")[[1]] inline_code <- FALSE for (i in seq_along(x)) { if (identical(x[i], "`")) { inline_code <- !inline_code } else if (inline_code && identical(x[i], " ")) { x[i] <- "\u00A0" } } paste(x, collapse = "") } include_theme_colors <- function(theme_colors = NULL) { if (is.null(theme_colors)) return(NULL) unname <- glue::glue("{theme_colors} <- unname({theme_colors})") unname <- paste(unname, collapse = "\n ") x <- glue::glue('{names(theme_colors)} = {theme_colors}') x <- paste(x, collapse = ", ") glue::glue(" {unname}\n colors <- c({x}, colors)", .trim = FALSE) } # ---- Write Xaringan Theme Function ---- setup_theme_function( "style_xaringan", template_variables, "#' @template style_xaringan", "#' @export", body = paste0(" ", readLines(here::here("inst/scripts/style_xaringan_body.R"))), file = here::here("R/style_xaringan.R") ) # ---- Monotone Light ---- setup_theme_function( "style_mono_light", template_mono_light, "#' @template style_mono_light", "#' @family Monotone themes", "#' @export", file = here::here("R/style_mono_light.R"), theme_colors = c(base = "base_color", white = "white_color", black = "black_color") ) # ---- Monotone Dark ---- setup_theme_function( "style_mono_dark", template_mono_dark, "#' @template style_mono_dark", "#' @family Monotone themes", "#' @export", file = here::here("R/style_mono_dark.R"), theme_colors = c(base = "base_color", white = "white_color", black = "black_color") ) # ---- Monotone Accent ---- setup_theme_function( "style_mono_accent", template_mono_accent, "#' @template style_mono_accent", "#' @family Monotone themes", "#' @export", file = here::here("R/style_mono_accent.R"), theme_colors = c(base = "base_color", white = "white_color", black = "black_color") ) # ---- Monotone Accent Inverse ---- setup_theme_function( "style_mono_accent_inverse", template_mono_accent_inverse, "#' @template style_mono_accent_inverse", "#' @family Monotone themes", "#' @export", file = here::here("R/style_mono_accent_inverse.R"), theme_colors = c(base = "base_color", white = "white_color", black = "black_color") ) # ---- Duotone ---- setup_theme_function( "style_duo", template_duo, "#' @template style_duo", "#' @family Duotone themes", "#' @export", file = here::here("R/style_duo.R"), theme_colors = c(primary = "primary_color", secondary = "secondary_color") ) # ---- Duotone Accent ---- setup_theme_function( "style_duo_accent", template_duo_accent, "#' @template style_duo_accent", "#' @family Duotone themes", "#' @export", file = here::here("R/style_duo_accent.R"), theme_colors = c(primary = "primary_color", secondary = "secondary_color", white = "white_color", black = "black_color") ) # ---- Duotone Accent Inverse ---- setup_theme_function( "style_duo_accent_inverse", template_duo_accent_inverse, "#' @template style_duo_accent_inverse", "#' @family Duotone themes", "#' @export", file = here::here("R/style_duo_accent_inverse.R"), theme_colors = c(primary = "primary_color", secondary = "secondary_color", white = "white_color", black = "black_color") ) # ---- Solarized Light ---- setup_theme_function( "style_solarized_light", template_solarized_light, "#' @template style_solarized_light", "#' @family Solarized themes", "#' @export", file = here::here("R/style_solarized_light.R") ) # ---- Solarized Dark ---- setup_theme_function( "style_solarized_dark", template_solarized_dark, "#' @template style_solarized_dark", "#' @family Solarized themes", "#' @export", file = here::here("R/style_solarized_dark.R") ) ================================================ FILE: inst/scripts/style_xaringan_body.R ================================================ force(text_font_family) force(text_font_weight) force(text_font_url) force(text_font_family_fallback) force(header_font_family) force(header_font_weight) force(header_font_url) force(code_font_family) force(code_font_url) force(code_font_family_fallback) # the defaults are google fonts is_default <- function(type, suffix) { # check if font arg value is from xaringanthemer_font_default var <- paste0(type, "_", suffix) inherits( get(var, envir = parent.frame(2), inherits = FALSE), "xaringanthemer_default" ) } for (var in c("text", "header", "code")) { suffixes <- c("font_family", "font_weight", "font_url") if (var == "code") suffixes <- setdiff(suffixes, "font_weight") var_is_google <- all(vapply(suffixes, is_default, logical(1), type = var)) var_is_google <- as.integer(var_is_google) r_set_font_is_google <- glue::glue("{var}_font_is_google <- {var_is_google}") eval(parse(text = r_set_font_is_google)) } # Make sure font names are wrapped in quotes if they have spaces f_args <- names(formals(sys.function())) for (var in f_args[grepl("font_family$", f_args)]) { var_value <- get(var, inherits = FALSE) if (!is.null(var_value)) { eval(parse(text = paste0(var, "<-quote_elements_w_spaces(", var, ")"))) } } # Warn if base_font_size isn't absolute css_abs_units <- c("cm", "mm", "Q", "in", "pc", "pt", "px") if (!grepl(paste(tolower(css_abs_units), collapse = "|"), tolower(base_font_size))) { warning( glue::glue( "Base font size '{base_font_size}' is not in absolute units. ", "For best results, specify the `base_font_size` using absolute CSS units: ", "{paste(css_abs_units, collapse = ', ')}" ), call. = FALSE, immediate. = TRUE ) } # If certain colors aren't in hexadecimal it may cause problems with theme_xaringan() # TODO: at some point I'd rather be able to process CSS colors or variables colors_used_by_theme_xaringan <- list( background_color = background_color, text_color = text_color, header_color = header_color, text_bold_color = text_bold_color, inverse_background_color = inverse_background_color, inverse_text_color = inverse_text_color, inverse_header_color = inverse_header_color ) colors_used_by_theme_xaringan <- purrr::discard(colors_used_by_theme_xaringan, is.null) colors_are_hex <- purrr::map_lgl(colors_used_by_theme_xaringan, check_color_is_hex, throw = NULL) if (any(!colors_are_hex)) { colors_better_as_hex <- names(colors_used_by_theme_xaringan)[!colors_are_hex] colors_better_as_hex <- paste(colors_better_as_hex, collapse = ", ") warning( glue::glue("Colors that will be used by `theme_xaringan()` need to be in ", "hexadecimal format: {colors_better_as_hex}"), immediate. = TRUE, call. = FALSE ) } # Use font_..._google args to overwrite font args for (var in f_args[grepl("font_google$", f_args)]) { gf <- eval(parse(text = var)) if (is.null(gf)) next if (!inherits(gf, "google_font")) { stop("`", var, "` must be set using `google_font()`.") } group <- strsplit(var, "_")[[1]][1] if (group == "text") { text_font_family <- quote_elements_w_spaces(gf$family) text_font_weight <- gf$weights %||% "normal" if (grepl(",", text_font_weight)) { # Use first font weight if multiple are imported text_font_weight <- substr(text_font_weight, 1, regexpr(",", text_font_weight)[1] - 1) } text_font_url <- gf$url } else { eval(parse(text = paste0(group, "_font_family <- quote_elements_w_spaces(gf$family)"))) eval(parse(text = paste0(group, "_font_url <- gf$url"))) } eval(parse(text = paste0(group, "_font_is_google <- 1"))) } extra_font_imports <- if (is.null(extra_fonts)) "" else list2fonts(extra_fonts) extra_font_imports <- paste(extra_font_imports, collapse = "\n") # convert NA arguments to NULL for (var in f_args) { val <- eval(parse(text = var)) if (is.null(val)) next val <- val[!is.na(val)] is_na <- length(val) == 0 if (is_na) assign(var, NULL, envir = sys.frame(sys.nframe())) } # prepare variables for template body_font_family <- paste(c(text_font_family, text_font_family_fallback, text_font_base), collapse = ", ") background_size_fallback <- if (is.null(background_position)) "cover" else "100%" background_size <- background_image %??% (background_size %||% background_size_fallback) title_slide_background_size <- title_slide_background_size %||% ( title_slide_background_image %??% "cover" ) table_row_even_background_color <- table_row_even_background_color %||% background_color # stash theme settings in package env lapply(f_args, function(n) assign(n, get(n), envir = xaringanthemer_env)) for (font_is_google in paste0(c("text", "code", "header"), "_font_is_google")) { assign( font_is_google, get(font_is_google, inherits = FALSE) == 1, envir = xaringanthemer_env ) } xaringanthemer_version <- utils::packageVersion("xaringanthemer") # prepare header background object needs_leading_dot <- !grepl("^\\.", header_background_ignore_classes) header_background_ignore_classes[needs_leading_dot] <- paste0( ".", header_background_ignore_classes[needs_leading_dot] ) header_background_ignore_classes <- purrr::map( header_background_ignore_classes, ~ list(class = .) ) if (is.null(header_background_padding)) { slide_padding <- css_get_padding(padding) header_background_padding <- paste( "2rem", slide_padding$right, "1.5rem", slide_padding$left ) } header_background <- list( auto = header_background_auto, background_color = header_background_color, text_color = header_background_text_color, padding = header_background_padding, content_padding_top = header_background_content_padding_top, ignore = header_background_ignore_classes ) colors <- prepare_colors(colors) tf <- system.file("resources", "template.css", package = "xaringanthemer") template <- readLines(tf, warn = FALSE) template <- paste(template, collapse = "\n") x <- whisker::whisker.render(template) if (!is.null(extra_css)) { x <- c(x, style_extra_css(extra_css, outfile = NULL)) } if (is.null(outfile)) { return(x) } writeLines(x, con = outfile) invisible(outfile) ================================================ FILE: make.R ================================================ callr::rscript("data-raw/theme_template_variables.R") message("Building theme functions") callr::rscript("generate_theme_functions.R", wd = here::here("inst/scripts")) message("Writing documentation") devtools::document() message("Rendering README.Rmd for GitHub") rmarkdown::render("README.Rmd", quiet = TRUE) unlink("README.html") message("Checking package") devtools::check(document = FALSE) message("Checking urls") urlchecker::url_check() message("Building and Installing Package with Vignettes") devtools::install(build_vignettes = TRUE) ================================================ FILE: man/apply_alpha.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/color.R \name{apply_alpha} \alias{apply_alpha} \title{Add alpha to hex color} \usage{ apply_alpha(color_hex, opacity = 0.5) } \arguments{ \item{color_hex}{A character string representing a hex color} \item{opacity}{Desired opacity of the output color} } \value{ A character string with added opacity level as hexadecimal characters. } \description{ Applies alpha (or opacity) to a color in hexadecimal form by converting opacity in the \verb{[0, 1]} range to hex in the \verb{[0, 255]} range and appending to the hex color. } \examples{ blue <- "#0e6ba8" blue_transparent <- apply_alpha(blue) if (requireNamespace("scales", quietly = TRUE)) { scales::show_col(c(blue, blue_transparent)) } } ================================================ FILE: man/choose_dark_or_light.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/color.R \name{choose_dark_or_light} \alias{choose_dark_or_light} \title{Choose dark or light color} \usage{ choose_dark_or_light(x, black = "#000000", white = "#FFFFFF") } \arguments{ \item{x}{The background color (hex)} \item{black}{Text or foreground color, e.g. "#222" or \code{substitute(darken_color(x, 0.8))}, if black text provides the best contrast.} \item{white}{Text or foreground color or expression, e.g. "#EEE" or \code{substitute(lighten_color(x, 0.8))}, if white text provides the best contrast.} } \value{ The \code{black} color or \code{white} color according to which color provides the greates contrast with the input color. } \description{ Takes a color input as \code{x} and returns either the black or white color (or expression) if dark or light text should be used over the input color for best contrast. Follows W3C Recommendations. } \examples{ light_green <- "#c4d6b0" contrast_green <- choose_dark_or_light(light_green) dark_purple <- "#381d2a" contrast_purple <- choose_dark_or_light(dark_purple) if (requireNamespace("scales", quietly = TRUE)) { scales::show_col(c(light_green, contrast_green, dark_purple, contrast_purple)) } } \references{ \url{https://stackoverflow.com/a/3943023/2022615} } ================================================ FILE: man/fragments/_colors.Rmd ================================================ When designing your xaringan theme, you may have additional colors in your desired color palette beyond those used in the accent colors of the mono and duotone styles. The `style*()` functions in xaringanthemer include a `colors` argument that lets you quickly define additional colors to use in your slides. This argument takes a vector of named colors ```r colors = c( red = "#f34213", purple = "#3e2f5b", orange = "#ff8811", green = "#136f63", white = "#FFFFFF" ) ``` and creates CSS classes from the color name that set the text color — e.g. `.red` — or that set the background color — e.g. `.bg-red`. If you use custom CSS in your slides, the color name is also stored in a CSS variable — e.g. `var(--red)`. So slide text like this ```markdown This **.red[simple]** .white.bg-purple[demo] _.orange[shows]_ the colors .green[in action]. ``` will be rendered in HTML as
This simple demo shows the colors in action.
Note that the color names in `colors` need to be valid CSS names, so `"purple-light"` will work, but `"purple light"` will not. ================================================ FILE: man/fragments/_fonts.Rmd ================================================ [google-fonts]: https://fonts.google.com ```{css echo=FALSE} .cabin { font-family: Cabin; font-weight: 600 } .noto-sans { font-family: 'Noto Sans'; } .font-preview { padding: 1em; margin-top: 1em; margin-bottom: 1em; border: 1px solid #dddddd; border-radius: 3px; font-size: 1.25em; } ``` ### Default Fonts The default heading and body fonts used in **xaringanthemer** are different than the xaringan default fonts. In xaringanthemer, [Cabin](https://fonts.google.com/specimen/Cabin) is used for headings and [Noto Sans](https://fonts.google.com/specimen/Noto+Sans) for body text.

A Cabin in the Clearing

Pack my box with five dozen liquor jugs. Amazingly few discotheques provide jukeboxes.

These fonts are easier to read on screens and at a distance during presentations, and they support a wide variety of languages and weights. Another reason for the change is that the xaringan (remarkjs) default body font, _Droid Serif_, is no longer officially included in Google Fonts. If you would like to use the fonts from the [default xaringan theme](https://slides.yihui.org/xaringan/), you can use the following arguments in your style function. ```{r eval=FALSE, echo=TRUE} style_xaringan( text_font_family = "Droid Serif", text_font_url = "https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic", header_font_google = google_font("Yanone Kaffeesatz") ) ``` ### Custom and _Google Font_ Fonts **xaringanthemer** makes it easy to use [Google Fonts][google-fonts] in your presentations (provided you have an internet connection during the presentation) or to fully specify your font files. To use [Google Fonts][google-fonts], set the `_font_google` theme arguments -- ```{r results='asis', echo=FALSE} cat(paste0("`", tvv[grepl("_font_google$", tvv)], "`", collapse = ", ")) ``` --- using the `google_font()` helper. The help documentation in `?google_font` provides more info. ```{r eval=FALSE, echo=TRUE} style_mono_light( header_font_google = google_font("Josefin Slab", "600"), text_font_google = google_font("Work Sans", "300", "300i"), code_font_google = google_font("IBM Plex Mono") ) ``` If you set an `_font_google` theme arguments, then `_font_family`, `_font_weight` and `_font_url` are overwritten -- where `` is one of `header`, `text`, or `code`. To use a font hosted outside of Google fonts, you need to provide both `_font_family` and `_font_url`. For example, suppose you want to use a code font with ligatures for your code chunks, such as [Fira Code](https://github.com/tonsky/FiraCode), which would be declared with `code_font_family`. The [browser usage](https://github.com/tonsky/FiraCode#browser-support) section of the Fira Code README provides a CSS URL to be used with an `@import` statement that you can use with the `code_font_url` argument. ```{r eval=FALSE, echo=TRUE} style_solarized_dark( code_font_family = "Fira Code", code_font_url = "https://cdn.jsdelivr.net/gh/tonsky/FiraCode@2/distr/fira_code.css" ) ``` Remember that you need to supply either `_google_font` using the `google_font()` helper _or both_ `_font_family` and `_font_url`. ### Using Additional Fonts If you want to use additional fonts for use in [custom CSS definitions][adding-custom-css], use the `extra_fonts` argument to pass a list of URLs or `google_font()`s. Notice that you will need to add custom CSS (for example, via `extra_css`) to use the fonts imported in `extra_fonts`. ```{r eval=FALSE, echo=TRUE} style_mono_light( extra_fonts = list( google_font("Sofia"), # Young Serif by uplaod.fr "https://cdn.jsdelivr.net/gh/uplaod/YoungSerif/fonts/webfonts/fontface.css", ), extra_css = list( ".title-slide h2" = list("font-family" = "Sofia"), blockquote = list("font-family" = "youngserifregular") ) ) ``` ================================================ FILE: man/fragments/_installation.Rmd ================================================ You can install **xaringanthemer** from CRAN ```r install.packages("xaringanthemer") ``` or you can install the development version of xaringanthemer from [GitHub](https://github.com/gadenbuie/xaringanthemer). ```r # install.packages("remotes") remotes::install_github("gadenbuie/xaringanthemer") ``` ================================================ FILE: man/fragments/_quick-intro.Rmd ================================================ ```{r include=FALSE} IN_PKGDOWN <- identical(Sys.getenv("IN_PKGDOWN"), "true") ``` First, add the `xaringan-themer.css` file to the YAML header of your xaringan slides. ```yaml output: xaringan::moon_reader: css: xaringan-themer.css ``` Then, in a hidden chunk just after the knitr setup chunk, load **xaringanthemer** and try one of the [theme functions][theme-functions]. ````markdown ```{r xaringan-themer, include=FALSE, warning=FALSE}`r ""` library(xaringanthemer) style_mono_accent( base_color = "#1c5253", header_font_google = google_font("Josefin Sans"), text_font_google = google_font("Montserrat", "300", "300i"), code_font_google = google_font("Fira Mono") ) ``` ```` Example title and normal slides using a green xaringanthemer theme ### Matching ggplot Themes [showtext]: https://github.com/yixuan/showtext **xaringanthemer** even provides a [ggplot2] theme with `theme_xaringan()` that uses the colors and fonts from your slide theme. Built on the [showtext] package, and designed to work seamlessly with [Google Fonts](https://fonts.google.com). Color and fill scales are also provided for matching sequential color scales based on the primary color used in your slides. See `?scale_xaringan` for more details. More details and examples can be found in `vignette("ggplot2-themes")`. ```{r xaringanthemer-ggplot-setup, include=FALSE, eval=!IN_PKGDOWN} style_mono_accent( base_color = "#1c5253", header_font_google = google_font("Josefin Sans"), text_font_google = google_font("Montserrat", "300", "300i"), code_font_google = google_font("Fira Mono"), outfile = NULL ) ``` ```{r theme_xaringan_demo, echo=TRUE, warning=FALSE, fig.width=13, fig.height=5.5, eval=!IN_PKGDOWN, fig.showtext=TRUE} library(ggplot2) ggplot(diamonds) + aes(cut, fill = cut) + geom_bar(show.legend = FALSE) + labs( x = "Cut", y = "Count", title = "A Fancy diamonds Plot" ) + theme_xaringan(background_color = "#FFFFFF") + scale_xaringan_fill_discrete() ``` ```{r link-to-plot-image, echo=FALSE, eval=IN_PKGDOWN, results='asis'} cat("![](../reference/figures/index-theme_xaringan_demo-1.png)") ``` ### Tab Completion **xaringanthemer** is Tab friendly -- [use autocomplete to explore][theme-settings] the [template variables][template-variables] that you can adjust in each of the themes! Demonstration of argument auto-completion with RStudio ### R Markdown Template in RStudio You can also skip the above and just create a *Ninja Themed Presentation* from the New R Markdown Document menu in RStudio.
The 'New R Markdown Document' menu in RStudio
================================================ FILE: man/fragments/_tagline-gif.Rmd ================================================ [xaringan]: https://github.com/yihui/xaringan Give your [xaringan] slides some style with **xaringanthemer** within your `slides.Rmd` file without (much) CSS. Animation previewing many xaringanthemer themes ================================================ FILE: man/fragments/_thanks.Rmd ================================================ *** [xaringan]: https://github.com/yihui/xaringan [remarkjs]: https://github.com/gnab/remark **xaringanthemer** was built by [Garrick Aden-Buie](https://www.garrickadenbuie.com) ([@grrrck](https://twitter.com/grrrck)). Big thank you to [Yihui Xie](https://yihui.org/), especially for [xaringan]. Also thanks to [Ole Petter Bang](https://gnab.org/) for [remark.js][remarkjs]. Feel free to [file an issue](https://github.com/gadenbuie/xaringanthemer/issues) if you find a bug or have a theme suggestion -- or better yet, submit a pull request! ================================================ FILE: man/fragments/_themes.Rmd ================================================ **xaringanthemer** includes a number of functions that provide themed **xaringan** styles. All of the styling functions start with the `style_` prefix. The goal of each style function is to quickly set up a coordinated color palette for your slides based on one or two starter colors. Styles based on one color start with `style_mono_` and styles based on two colors start with `style_duo_`. How the starter colors are used is described in the final portion of the style function name. For example, `style_mono_accent()` uses a single color as an accent color. Note that the colors used below are for demonstration only, the point of the `style_` functions is for you to choose your own color palette! If your color palette uses more than two colors, you can add additional colors with the `colors` argument. See the [Colors](#colors) section for more information. ### Monotone ```{r include=FALSE} IS_README <- exists("IS_README") && IS_README include_graphic <- function(img_path) { glue::glue( '' ) } ``` Use these functions to automatically create a consistent color palette for your slides, based around a single color. #### `style_mono_light()` A light theme based around a single color. ```{r style_mono_light} demo_function_call <- function(f, n_params = 1) { cat(sep = "", "```r\n", paste(substitute(f)), "(", if (n_params > 0) paste(collapse = ", ", sapply(1:n_params, function(i) { paste0(names(formals(f))[i], ' = "', formals(f)[[i]], '"')})), ")\n```" ) } demo_function_call(style_mono_light, 1) ``` `r include_graphic("example_mono_light.png")` #### `style_mono_dark()` A dark theme based around a single color. ```{r style_mono_dark} demo_function_call(style_mono_dark, 1) ``` `r include_graphic("example_mono_dark.png")` #### `style_mono_accent()` The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). ```{r style_mono_accent} demo_function_call(style_mono_accent, 1) ``` `r include_graphic("example_mono_accent.png")` #### `style_mono_accent_inverse()` An "inverted" default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). ```{r style_mono_accent_inverse} demo_function_call(style_mono_accent_inverse, 1) ``` `r include_graphic("example_mono_accent_inverse.png")` ### Duotone These themes build from two (ideally) complementary colors. #### `style_duo()` A two-colored theme based on a primary and secondary color. ```{r style_duo} demo_function_call(style_duo, 2) ``` `r include_graphic("example_duo.png")` #### `style_duo_accent()` The default Xaringan theme with two accent colors. ```{r style_duo_accent} demo_function_call(style_duo_accent, 2) ``` `r include_graphic("example_duo_accent.png")` #### `style_duo_accent_inverse()` An "inverted" default Xaringan theme with two accent colors. ```{r style_duo_accent_inverse} demo_function_call(style_duo_accent_inverse, 2) ``` `r include_graphic("example_duo_accent_inverse.png")` ### Solarized There are also two themes based around the [solarized color palette](https://ethanschoonover.com/solarized/), `style_solarized_light()` and `style_solarized_dark()`. For both themes, it is advisted to change the syntax highlighting theme to `solarized-light` or `solarized-dark` (looks great paired or constrasted). #### `style_solarized_light()` ```{r style_solarized_light} demo_function_call(style_solarized_light, 0) ``` `r include_graphic("example_solarized_light.png")` #### `style_solarized_dark()` ```{r style_solarized_dark} demo_function_call(style_solarized_dark, 0) ``` `r include_graphic("example_solarized_dark.png")` To do this, your YAML header should look more-or-less like this: ```yaml output: xaringan::moon_reader: css: ["xaringan-themer.css"] nature: highlightStyle: solarized-dark highlightLines: true countIncrementalSlides: false ``` ================================================ FILE: man/google_font.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{google_font} \alias{google_font} \title{Specify Google Font} \usage{ google_font(family, ..., languages = NULL) } \arguments{ \item{family}{Font family} \item{...}{Font weights to include, example "400", "400i"} \item{languages}{Font languages to include (dependent on the font.) See \code{\link[=google_language_codes]{google_language_codes()}}.} } \value{ A \code{"google_font"} object. } \description{ Builds Google Fonts URL from family name. Extra weights are given in the \code{...} parameters. Languages can be specified in \code{languages} and must one or more of the language codes as given by \code{google_language_codes()}. } \examples{ google_font("Josefin Sans", "400", "400i", "600i", "700") google_font("Josefin Sans", languages = c("latin-ext", "vietnamese")) } ================================================ FILE: man/google_language_codes.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{google_language_codes} \alias{google_language_codes} \title{List Valid Google Language Codes} \usage{ google_language_codes( language_codes = c("latin", "latin-ext", "sinhala", "greek", "hebrew", "vietnamese", "cyrillic", "cyrillic-ext", "devanagari", "arabic", "khmer", "tamil", "greek-ext", "thai", "bengali", "gujarati", "oriya", "malayalam", "gurmukhi", "kannada", "telugu", "myanmar") ) } \arguments{ \item{language_codes}{Vector of potential Google language codes} } \value{ A vector of Google Font language codes matching \code{language_codes}. } \description{ Gives a list of valid Language Codes for Google Fonts, or validates that the language codes given are valid. } \seealso{ \code{\link[=google_font]{google_font()}} } ================================================ FILE: man/lighten_darken_color.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/color.R \name{lighten_darken_color} \alias{lighten_darken_color} \alias{lighten_color} \alias{darken_color} \title{Generate lighter or darker version of a color} \usage{ lighten_color(color_hex, strength = 0.7) darken_color(color_hex, strength = 0.8) } \arguments{ \item{color_hex}{A character string representing a hex color} \item{strength}{The "strength" of the blend with white or black, where 0 is entirely the original color and 1 is entirely white (\code{lighten_color()}) or black (\code{darken_color()}).} } \value{ A character string with the lightened or darkened color in hexadecimal format. } \description{ Produces a linear blend of the color with white or black. } \examples{ blue <- "#0e6ba8" blue_light <- lighten_color(blue, strength = 0.33) blue_dark <- darken_color(blue, strength = 0.33) if (requireNamespace("scales", quietly = TRUE)) { scales::show_col(c(blue_light, blue, blue_dark)) } } ================================================ FILE: man/scale_xaringan.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot2.R \name{scale_xaringan} \alias{scale_xaringan} \alias{scale_xaringan_discrete} \alias{scale_xaringan_fill_discrete} \alias{scale_xaringan_color_discrete} \alias{scale_xaringan_colour_discrete} \alias{scale_xaringan_continuous} \alias{scale_xaringan_fill_continuous} \alias{scale_xaringan_color_continuous} \alias{scale_xaringan_colour_continuous} \title{Themed ggplot2 Scales} \usage{ scale_xaringan_discrete( aes_type = c("color", "colour", "fill"), ..., color = NULL, direction = 1, inverse = FALSE, na.value = "grey50" ) scale_xaringan_fill_discrete(..., color = NULL, direction = 1, inverse = FALSE) scale_xaringan_color_discrete( ..., color = NULL, direction = 1, inverse = FALSE ) scale_xaringan_colour_discrete( ..., color = NULL, direction = 1, inverse = FALSE ) scale_xaringan_continuous( aes_type = c("color", "colour", "fill"), ..., color = NULL, begin = 0, end = 1, inverse = FALSE, na.value = "grey50" ) scale_xaringan_fill_continuous( ..., color = NULL, begin = 0, end = 1, inverse = FALSE ) scale_xaringan_color_continuous( ..., color = NULL, begin = 0, end = 1, inverse = FALSE ) scale_xaringan_colour_continuous( ..., color = NULL, begin = 0, end = 1, inverse = FALSE ) } \arguments{ \item{aes_type}{The type of aesthetic to which the scale is being applied. One of "color", "colour", or "fill".} \item{...}{Arguments passed on to either the \pkg{colorspace} scale functions — one of \code{\link[colorspace:scale_colour_discrete_sequential]{colorspace::scale_color_discrete_sequential()}}, \code{\link[colorspace:scale_colour_continuous_sequential]{colorspace::scale_color_continuous_sequential()}}, \code{\link[colorspace:scale_colour_discrete_sequential]{colorspace::scale_fill_discrete_sequential()}}, or \code{\link[colorspace:scale_colour_continuous_sequential]{colorspace::scale_fill_continuous_sequential()}} — or to \link[ggplot2:continuous_scale]{ggplot2::continuous_scale} or \link[ggplot2:discrete_scale]{ggplot2::discrete_scale}.} \item{color}{A color value, in hex, to override the default color. Otherwise, the primary color of the resulting scale is chosen from the xaringanthemer slide styles.} \item{direction}{Direction of the discrete scale. Use values less than 0 to reverse the direction, e.g. \code{direction = -1}.} \item{inverse}{If \code{color} is not supplied and \code{inverse = TRUE}, a primary color is chosen to work well with the inverse slide styles, namely the value of \code{inverse_header_color}} \item{na.value}{Color to be used for missing data points.} \item{begin}{Number in the range of \code{[0, 1]} indicating to which point in the color scale the smallest data value should be mapped.} \item{end}{Number in the range of \code{[0, 1]} indicating to which point in the color scale the largest data value should be mapped.} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}} Color and fill single-color scales for discrete and continuous values, created using the primary accent color of the xaringanthemer styles. See \code{vignette("ggplot2-themes")} for more information and examples of \pkg{xaringanthemer}'s \pkg{ggplot2}-related functions. } \examples{ # Requires ggplot2 has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) if (has_ggplot2) { library(ggplot2) # Saving the theme to a temp file because this is an example path_to_css_file <- tempfile(fileext = ".css") # Create the xaringan theme: dark blue background with teal green accents style_duo( primary_color = "#002b36", secondary_color = "#31b09e", # Using basic fonts for this example, but the plot theme will # automatically use your theme font if you use Google fonts text_font_family = "sans", header_font_family = "serif", outfile = path_to_css_file ) # Here's some very basic example data ex <- data.frame( name = c("Couple", "Few", "Lots", "Many"), n = c(2, 3, 5, 7) ) # Fill color scales demo ggplot(ex) + aes(name, n, fill = n) + geom_col() + ggtitle("Matching fill scales") + # themed to match the slides: dark blue background with teal text theme_xaringan() + # Fill color matches teal text scale_xaringan_fill_continuous() # Color scales demo ggplot(ex) + aes(name, y = 1, color = name) + geom_point(size = 10) + ggtitle("Matching color scales") + # themed to match the slides: dark blue background with teal text theme_xaringan() + # Fill color matches teal text scale_xaringan_color_discrete(direction = -1) } } ================================================ FILE: man/style_duo.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_duo.R \name{style_duo} \alias{style_duo} \title{Duotone Theme} \usage{ style_duo( primary_color = "#1F4257", secondary_color = "#F97B64", text_color = choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99)), header_color = secondary_color, background_color = primary_color, link_color = secondary_color, text_bold_color = secondary_color, text_slide_number_color = text_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = secondary_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = secondary_color, inverse_text_color = primary_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = secondary_color, title_slide_background_color = primary_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(secondary_color, 0.6), left_column_selected_color = secondary_color, blockquote_left_border_color = apply_alpha(secondary_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(primary_color, 0.9), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{primary_color}{Duotone Primary Color. Defaults to #1F4257. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--primary)} in any argument of a style function or in custom CSS.} \item{secondary_color}{Duotone Secondary Color. Defaults to #F97B64. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--secondary)} in any argument of a style function or in custom CSS.} \item{text_color}{Text Color. Defaults to \code{choose_dark_or_light(primary_color, darken_color(primary_color, 0.9), lighten_color(secondary_color, 0.99))}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to \code{secondary_color}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to \code{primary_color}. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to \code{secondary_color}. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{secondary_color}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{text_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to \code{secondary_color}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to \code{secondary_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to \code{primary_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{secondary_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{primary_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to \code{apply_alpha(secondary_color, 0.6)}. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to \code{secondary_color}. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to \code{apply_alpha(secondary_color, 0.5)}. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to \code{lighten_color(primary_color, 0.9)}. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ A duotone theme designed to work well with two complementary colors. } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_duo( primary_color = "#1f4257", secondary_color = "#f97b64", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Duotone themes: \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()} } \concept{Duotone themes} \concept{themes} ================================================ FILE: man/style_duo_accent.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_duo_accent.R \name{style_duo_accent} \alias{style_duo_accent} \title{Duotone Accent Theme} \usage{ style_duo_accent( primary_color = "#035AA6", secondary_color = "#03A696", white_color = "#FFFFFF", black_color = "#000000", text_color = black_color, header_color = primary_color, background_color = white_color, link_color = choose_dark_or_light(secondary_color, primary_color, secondary_color), text_bold_color = choose_dark_or_light(secondary_color, primary_color, secondary_color), text_slide_number_color = primary_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = choose_dark_or_light(secondary_color, primary_color, secondary_color), code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = secondary_color, inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color), inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color), title_slide_background_color = primary_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(primary_color, 0.6), left_column_selected_color = primary_color, blockquote_left_border_color = apply_alpha(secondary_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(secondary_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{primary_color}{Duotone Primary Color. Defaults to #035AA6. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--primary)} in any argument of a style function or in custom CSS.} \item{secondary_color}{Duotone Secondary Color. Defaults to #03A696. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--secondary)} in any argument of a style function or in custom CSS.} \item{white_color}{Brightest color used. Defaults to #FFFFFF. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--white)} in any argument of a style function or in custom CSS.} \item{black_color}{Darkest color used. Defaults to #000000. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--black)} in any argument of a style function or in custom CSS.} \item{text_color}{Text Color. Defaults to \code{black_color}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to \code{primary_color}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to \code{white_color}. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to \code{choose_dark_or_light(secondary_color, primary_color, secondary_color)}. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{choose_dark_or_light(secondary_color, primary_color, secondary_color)}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{primary_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to \code{choose_dark_or_light(secondary_color, primary_color, secondary_color)}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to \code{secondary_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to \code{choose_dark_or_light(secondary_color, black_color, white_color)}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{choose_dark_or_light(primary_color, black_color, white_color)}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{primary_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to \code{apply_alpha(primary_color, 0.6)}. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to \code{primary_color}. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to \code{apply_alpha(secondary_color, 0.5)}. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to \code{lighten_color(secondary_color, 0.8)}. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ An default xaringan theme with a two colors used for color accents on select elements (headers, bold text, etc.). } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_duo_accent( primary_color = "#006747", secondary_color = "#cfc493", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Duotone themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent_inverse}()} } \concept{Duotone themes} \concept{themes} ================================================ FILE: man/style_duo_accent_inverse.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_duo_accent_inverse.R \name{style_duo_accent_inverse} \alias{style_duo_accent_inverse} \title{Duotone Accent Inverse Theme} \usage{ style_duo_accent_inverse( primary_color = "#035AA6", secondary_color = "#03A696", white_color = "#FFFFFF", black_color = "#000000", text_color = white_color, header_color = primary_color, background_color = black_color, link_color = choose_dark_or_light(secondary_color, secondary_color, primary_color), text_bold_color = choose_dark_or_light(secondary_color, secondary_color, primary_color), text_slide_number_color = primary_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = choose_dark_or_light(secondary_color, secondary_color, primary_color), code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = secondary_color, inverse_text_color = choose_dark_or_light(secondary_color, black_color, white_color), inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = choose_dark_or_light(primary_color, black_color, white_color), title_slide_background_color = primary_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(primary_color, 0.6), left_column_selected_color = primary_color, blockquote_left_border_color = apply_alpha(secondary_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.2), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{primary_color}{Duotone Primary Color. Defaults to #035AA6. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--primary)} in any argument of a style function or in custom CSS.} \item{secondary_color}{Duotone Secondary Color. Defaults to #03A696. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--secondary)} in any argument of a style function or in custom CSS.} \item{white_color}{Brightest color used. Defaults to #FFFFFF. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--white)} in any argument of a style function or in custom CSS.} \item{black_color}{Darkest color used. Defaults to #000000. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--black)} in any argument of a style function or in custom CSS.} \item{text_color}{Text Color. Defaults to \code{white_color}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to \code{primary_color}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to \code{black_color}. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to \code{choose_dark_or_light(secondary_color, secondary_color, primary_color)}. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{choose_dark_or_light(secondary_color, secondary_color, primary_color)}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{primary_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to \code{choose_dark_or_light(secondary_color, secondary_color, primary_color)}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to \code{secondary_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to \code{choose_dark_or_light(secondary_color, black_color, white_color)}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{choose_dark_or_light(primary_color, black_color, white_color)}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{primary_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to \code{apply_alpha(primary_color, 0.6)}. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to \code{primary_color}. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to \code{apply_alpha(secondary_color, 0.5)}. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to \code{darken_color(choose_dark_or_light(primary_color, secondary_color, primary_color), 0.2)}. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ An "inverted" default xaringan theme with a two colors used for color accents on select elements (headers, bold text, etc.). } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_duo_accent_inverse( primary_color = "#006747", secondary_color = "#cfc493", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Duotone themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()} } \concept{Duotone themes} \concept{themes} ================================================ FILE: man/style_extra_css.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_extra_css.R \name{style_extra_css} \alias{style_extra_css} \title{Add Extra CSS Styles} \usage{ style_extra_css( css, outfile = "xaringan-themer.css", append = TRUE, heading = "Extra CSS" ) } \arguments{ \item{css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}} \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}.} \item{heading}{Heading added above extra CSS. Use \code{NULL} to disable.} } \description{ Adds css elements to target \code{outfile}, typically a xaringanthemer css file. The \code{css} argument takes a list of CSS classes and definitions (see examples below) and appends CSS rules to \code{outfile}. } \section{css list}{ The \code{css} input must be a named list of css properties and values within a named list of class identifiers, for example \code{list(".class-id" = list("css-property" = "value"))}. } \examples{ style_extra_css( outfile = stdout(), css = list( ".red" = list(color = "red"), ".small" = list("font-size" = "90\%"), ".full-width" = list( display = "flex", width = "100\%", flex = "1 1 auto" ) ) ) } ================================================ FILE: man/style_mono_accent.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_mono_accent.R \name{style_mono_accent} \alias{style_mono_accent} \title{Monotone Accent Theme} \usage{ style_mono_accent( base_color = "#43418A", white_color = "#FFFFFF", black_color = "#272822", text_color = black_color, header_color = base_color, background_color = white_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = white_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(base_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{base_color}{Monotone Base Color, works best with a strong color. Defaults to #43418A. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base)} in any argument of a style function or in custom CSS.} \item{white_color}{Brightest color used. Defaults to #FFFFFF. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--white)} in any argument of a style function or in custom CSS.} \item{black_color}{Darkest color used. Defaults to #272822. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--black)} in any argument of a style function or in custom CSS.} \item{text_color}{Text Color. Defaults to \code{black_color}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to \code{white_color}. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to \code{white_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to \code{apply_alpha(base_color, 0.6)}. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to \code{base_color}. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to \code{lighten_color(base_color, 0.8)}. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ The default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_mono_accent( base_color = "#43418A", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Monotone themes: \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()} } \concept{Monotone themes} \concept{themes} ================================================ FILE: man/style_mono_accent_inverse.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_mono_accent_inverse.R \name{style_mono_accent_inverse} \alias{style_mono_accent_inverse} \title{Monotone Accent Inverse Theme} \usage{ style_mono_accent_inverse( base_color = "#3C989E", white_color = "#FFFFFF", black_color = darken_color(base_color, 0.9), text_color = white_color, header_color = base_color, background_color = black_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = black_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = darken_color(base_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{base_color}{Monotone Base Color, works best with a light color. Defaults to #3C989E. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base)} in any argument of a style function or in custom CSS.} \item{white_color}{Brightest color used, default is a very light version of \code{base_color}. Defaults to #FFFFFF. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--white)} in any argument of a style function or in custom CSS.} \item{black_color}{Darkest color used, default is a very dark, version of \code{base_color}. Defaults to \code{darken_color(base_color, 0.9)}. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--black)} in any argument of a style function or in custom CSS.} \item{text_color}{Text Color. Defaults to \code{white_color}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to \code{black_color}. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to \code{black_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to \code{apply_alpha(base_color, 0.6)}. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to \code{base_color}. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to \code{darken_color(base_color, 0.8)}. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ An "inverted" default xaringan theme with a single color used for color accents on select elements (headers, bold text, etc.). } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_mono_accent_inverse( base_color = "#3c989e", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Monotone themes: \code{\link{style_mono_accent}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()} } \concept{Monotone themes} \concept{themes} ================================================ FILE: man/style_mono_dark.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_mono_dark.R \name{style_mono_dark} \alias{style_mono_dark} \title{Monotone Dark Theme} \usage{ style_mono_dark( base_color = "#cbf7ed", white_color = lighten_color(base_color, 0.8), black_color = darken_color(base_color, 0.85), text_color = white_color, header_color = base_color, background_color = black_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = black_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = darken_color(base_color, 0.7), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{base_color}{Monotone Base Color, works best with a light color.. Defaults to #cbf7ed. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base)} in any argument of a style function or in custom CSS.} \item{white_color}{Brightest color used, default is a very light version of \code{base_color}. Defaults to \code{lighten_color(base_color, 0.8)}. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--white)} in any argument of a style function or in custom CSS.} \item{black_color}{Darkest color used, default is a very dark, version of \code{base_color}. Defaults to \code{darken_color(base_color, 0.85)}. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--black)} in any argument of a style function or in custom CSS.} \item{text_color}{Text Color. Defaults to \code{white_color}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to \code{black_color}. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to \code{black_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to \code{apply_alpha(base_color, 0.6)}. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to \code{base_color}. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to \code{darken_color(base_color, 0.7)}. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ A dark monotone theme based around a single color. } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_mono_dark( base_color = "#cbf7ed", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Monotone themes: \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_light}()} } \concept{Monotone themes} \concept{themes} ================================================ FILE: man/style_mono_light.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_mono_light.R \name{style_mono_light} \alias{style_mono_light} \title{Monotone Light Theme} \usage{ style_mono_light( base_color = "#23395b", white_color = lighten_color(base_color, 0.9), black_color = darken_color(base_color, 0.3), text_color = black_color, header_color = base_color, background_color = white_color, link_color = base_color, text_bold_color = base_color, text_slide_number_color = base_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = base_color, code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = base_color, inverse_text_color = white_color, inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = apply_alpha(base_color, 0.6), left_column_selected_color = base_color, blockquote_left_border_color = apply_alpha(base_color, 0.5), table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = lighten_color(base_color, 0.8), base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{base_color}{Monotone base color, works best with a strong color. Defaults to #23395b. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base)} in any argument of a style function or in custom CSS.} \item{white_color}{Brightest color used, default is a very light version of \code{base_color}. Defaults to \code{lighten_color(base_color, 0.9)}. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--white)} in any argument of a style function or in custom CSS.} \item{black_color}{Darkest color used, default is a very dark, version of \code{base_color}. Defaults to \code{darken_color(base_color, 0.3)}. Used in multiple CSS rules. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--black)} in any argument of a style function or in custom CSS.} \item{text_color}{Text Color. Defaults to \code{black_color}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to \code{white_color}. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to \code{white_color}. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to \code{apply_alpha(base_color, 0.6)}. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to \code{base_color}. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to \code{lighten_color(base_color, 0.8)}. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ A light monotone theme based around a single color. } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_mono_light( base_color = "#23395b", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Monotone themes: \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()} } \concept{Monotone themes} \concept{themes} ================================================ FILE: man/style_solarized_dark.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_solarized_dark.R \name{style_solarized_dark} \alias{style_solarized_dark} \title{Solarized Dark Theme} \usage{ style_solarized_dark( text_color = "#839496", header_color = "#dc322f", background_color = "#002b36", link_color = "#b58900", text_bold_color = "#d33682", text_slide_number_color = "#586e75", padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "#268bd240", code_inline_color = "#6c71c4", code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = "#fdf6e3", inverse_text_color = "#002b36", inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = "#586e75", left_column_selected_color = "#93a1a1", blockquote_left_border_color = "#cb4b16", table_border_color = "#657b83", table_row_border_color = "#657b83", table_row_even_background_color = "#073642", base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{text_color}{Text Color. Defaults to #839496. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to #dc322f. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to #002b36. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to #b58900. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to #d33682. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to #586e75. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to #268bd240. Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to #6c71c4. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to #fdf6e3. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to #002b36. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to #586e75. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to #93a1a1. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to #cb4b16. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #657b83. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #657b83. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to #073642. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ A dark theme based around on the solarized color scheme. Works well with "\code{highlightStyle: solarized-dark}" or "\code{highlighStyle: solarized-light}". } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_solarized_dark( outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \references{ \url{https://ethanschoonover.com/solarized/} } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_light}()}, \code{\link{xaringanthemer_font_default}()} Other Solarized themes: \code{\link{style_solarized_light}()} } \concept{Solarized themes} \concept{themes} ================================================ FILE: man/style_solarized_light.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_solarized_light.R \name{style_solarized_light} \alias{style_solarized_light} \title{Solarized Light Theme} \usage{ style_solarized_light( text_color = "#657b83", header_color = "#dc322f", background_color = "#fdf6e3", link_color = "#b58900", text_bold_color = "#d33682", text_slide_number_color = "#93a1a1", padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "#268bd240", code_inline_color = "#6c71c4", code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = "#002b36", inverse_text_color = "#fdf6e3", inverse_text_shadow = FALSE, inverse_header_color = inverse_text_color, inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = "#93a1a1", left_column_selected_color = "#586e75", blockquote_left_border_color = "#cb4b16", table_border_color = "#839496", table_row_border_color = "#839496", table_row_even_background_color = "#eee8d5", base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{text_color}{Text Color. Defaults to #657b83. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to #dc322f. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to #fdf6e3. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to #b58900. Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to #d33682. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to #93a1a1. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to #268bd240. Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to #6c71c4. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to #002b36. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to #fdf6e3. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to \code{inverse_text_color}. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to #93a1a1. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to #586e75. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to #cb4b16. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #839496. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #839496. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to #eee8d5. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ A light theme based around on the solarized color scheme. Works well with "\code{highlightStyle: solarized-dark}" or "\code{highlighStyle: solarized-light}". } \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_solarized_light( outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \references{ \url{https://ethanschoonover.com/solarized/} } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{xaringanthemer_font_default}()} Other Solarized themes: \code{\link{style_solarized_dark}()} } \concept{Solarized themes} \concept{themes} ================================================ FILE: man/style_xaringan.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/style_font_default.R, R/style_xaringan.R \name{xaringanthemer_font_default} \alias{xaringanthemer_font_default} \alias{style_xaringan} \title{Write A Customized Xaringan Theme} \usage{ xaringanthemer_font_default(font_arg) style_xaringan( text_color = "#000", header_color = "#000", background_color = "#FFF", link_color = "rgb(249, 38, 114)", text_bold_color = NULL, text_slide_number_color = inverse_background_color, padding = "16px 64px 16px 64px", background_image = NULL, background_size = NULL, background_position = NULL, code_highlight_color = "rgba(255,255,0,0.5)", code_inline_color = "#000", code_inline_background_color = NULL, code_inline_font_size = "1em", inverse_background_color = "#272822", inverse_text_color = "#d6d6d6", inverse_text_shadow = FALSE, inverse_header_color = "#f3f3f3", inverse_link_color = link_color, title_slide_text_color = inverse_text_color, title_slide_background_color = inverse_background_color, title_slide_background_image = NULL, title_slide_background_size = NULL, title_slide_background_position = NULL, footnote_color = NULL, footnote_font_size = "0.9em", footnote_position_bottom = "60px", left_column_subtle_color = "#777", left_column_selected_color = "#000", blockquote_left_border_color = "lightgray", table_border_color = "#666", table_row_border_color = "#ddd", table_row_even_background_color = "#eee", base_font_size = "20px", text_font_size = "1rem", header_h1_font_size = "2.75rem", header_h2_font_size = "2.25rem", header_h3_font_size = "1.75rem", header_background_auto = FALSE, header_background_color = header_color, header_background_text_color = background_color, header_background_padding = NULL, header_background_content_padding_top = "7rem", header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"), text_slide_number_font_size = "0.9rem", text_font_google = NULL, text_font_family = xaringanthemer_font_default("text_font_family"), text_font_weight = xaringanthemer_font_default("text_font_weight"), text_bold_font_weight = "bold", text_font_url = xaringanthemer_font_default("text_font_url"), text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"), text_font_base = "sans-serif", header_font_google = NULL, header_font_family = xaringanthemer_font_default("header_font_family"), header_font_weight = xaringanthemer_font_default("header_font_weight"), header_font_family_fallback = "Georgia, serif", header_font_url = xaringanthemer_font_default("header_font_url"), code_font_google = NULL, code_font_family = xaringanthemer_font_default("code_font_family"), code_font_size = "0.9rem", code_font_url = xaringanthemer_font_default("code_font_url"), code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"), link_decoration = "none", colors = NULL, extra_css = NULL, extra_fonts = NULL, outfile = "xaringan-themer.css" ) } \arguments{ \item{font_arg}{A font argument from the \pkg{xaringanthemer} \code{style_} function family.} \item{text_color}{Text Color. Defaults to #000. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text_color)} in any argument of a style function or in custom CSS.} \item{header_color}{Header Color. Defaults to #000. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-color)} in any argument of a style function or in custom CSS.} \item{background_color}{Slide Background Color. Defaults to #FFF. Modifies the \code{.remark-slide-content} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--background-color)} in any argument of a style function or in custom CSS.} \item{link_color}{Link Color. Defaults to rgb(249, 38, 114). Modifies the \verb{a, a > code} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--link-color)} in any argument of a style function or in custom CSS.} \item{text_bold_color}{Bold Text Color. Defaults to \code{NULL}. Modifies the \code{strong} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-bold-color)} in any argument of a style function or in custom CSS.} \item{text_slide_number_color}{Slide Number Color. Defaults to \code{inverse_background_color}. Modifies the \code{.remark-slide-number} class.} \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{background_image}{Background image applied to each \emph{and every} slide. Set \code{title_slide_background_image = "none"} to remove the background image from the title slide. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class.} \item{background_size}{Background image size, requires \code{background_image} to be set. If \code{background_image} is set, \code{background_size} will default to \code{cover} so the background fills the screen. If both \code{background_image} and \code{background_position} are set, will default to 100 percent. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{background_position}{Background image position, requires \code{background_image} to be set, and it is recommended to adjust \code{background_size}. Defaults to \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{code_highlight_color}{Code Line Highlight. Defaults to rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-highlight-color)} in any argument of a style function or in custom CSS.} \item{code_inline_color}{Inline Code Color. Defaults to #000. Modifies the \code{.remark-inline-code} class.} \item{code_inline_background_color}{Inline Code Background Color. Defaults to \code{NULL}. Modifies the \code{.remark-inline-code} class.} \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em. Modifies the \code{.remark-inline-code} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-inline-font-size)} in any argument of a style function or in custom CSS.} \item{inverse_background_color}{Inverse Background Color. Defaults to #272822. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-background-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_color}{Inverse Text Color. Defaults to #d6d6d6. Modifies the \code{.inverse} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-text-color)} in any argument of a style function or in custom CSS.} \item{inverse_text_shadow}{Enables Shadow on text of inverse slides. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.} \item{inverse_header_color}{Inverse Header Color. Defaults to #f3f3f3. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-header-color)} in any argument of a style function or in custom CSS.} \item{inverse_link_color}{Inverse Link Color. Defaults to \code{link_color}. Modifies the \verb{.inverse a, .inverse a > code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--inverse-link-color)} in any argument of a style function or in custom CSS.} \item{title_slide_text_color}{Title Slide Text Color. Defaults to \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-text-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_color}{Title Slide Background Color. Defaults to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--title-slide-background-color)} in any argument of a style function or in custom CSS.} \item{title_slide_background_image}{Title Slide Background Image URL. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.} \item{title_slide_background_size}{Title Slide Background Image Size, defaults to "cover" if background image is set. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size} property values.} \item{title_slide_background_position}{Title Slide Background Image Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position} property values.} \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote} class.} \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{footnote_position_bottom}{Footnote location from bottom of screen. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position} property values.} \item{left_column_subtle_color}{Left Column Text (not last). Defaults to #777. Modifies the \verb{.left-column h2, .left-column h3} classes.} \item{left_column_selected_color}{Left Column Current Selection. Defaults to #000. Modifies the \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.} \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults to lightgray. Modifies the \code{blockquote} element.} \item{table_border_color}{Table top/bottom border. Defaults to #666. Modifies the \verb{table: border-top, border-bottom} elements.} \item{table_row_border_color}{Table row inner bottom border. Defaults to #ddd. Modifies the \verb{table thead th: border-bottom} elements.} \item{table_row_even_background_color}{Table Even Row Background Color. Defaults to #eee. Modifies the \verb{thead, tfoot, tr:nth-child(even)} elements.} \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}). Defaults to 20px. Modifies the \code{html} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--base-font-size)} in any argument of a style function or in custom CSS.} \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies the \code{.remark-slide-content} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-size)} in any argument of a style function or in custom CSS.} \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h1-font-size)} in any argument of a style function or in custom CSS.} \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h2-font-size)} in any argument of a style function or in custom CSS.} \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-h3-font-size)} in any argument of a style function or in custom CSS.} \item{header_background_auto}{Add background under slide title automatically for h1 header elements. If not enabled, use \code{class: header_background} to enable. Defaults to \code{FALSE}.} \item{header_background_color}{Background Color for h1 Header with Background. Defaults to \code{header_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-color)} in any argument of a style function or in custom CSS.} \item{header_background_text_color}{Text Color for h1 Header with Background. Defaults to \code{background_color}. Modifies the \verb{.remark-slide-content h1} class. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-background-text-color)} in any argument of a style function or in custom CSS.} \item{header_background_padding}{Padding for h1 Header with Background. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding} property values.} \item{header_background_content_padding_top}{Top Padding for Content in Slide with Header with Background. Defaults to 7rem. Modifies the \code{.remark-slide-content} class.} \item{header_background_ignore_classes}{Slide Classes Where Header with Background will not be Applied. Defaults to \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the \code{.remark-slide-content} class.} \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-slide-number} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values.} \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{text_font_family}{Body Text Font Family (xaringan default is \code{'Droid Serif'}). Defaults to \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family)} in any argument of a style function or in custom CSS.} \item{text_font_weight}{Body Text Font Weight. Defaults to \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body} element. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{text_bold_font_weight}{Body Bold Text Font Weight. Defaults to bold. Modifies the \code{strong} element.} \item{text_font_url}{Body Text Font URL(s). Defaults to \code{xaringanthemer_font_default("text_font_url")}. Modifies the \verb{@import url()} elements.} \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults to sans-serif. Modifies the \code{body} element. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--text-font-base)} in any argument of a style function or in custom CSS.} \item{header_font_google}{Use \code{google_font()} to specify header font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{header_font_family}{Header Font Family (xaringan default is \code{'Yanone Kaffeesatz'}). Defaults to \code{xaringanthemer_font_default("header_font_family")}. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family)} in any argument of a style function or in custom CSS.} \item{header_font_weight}{Header Font Weight. Defaults to \code{xaringanthemer_font_default("header_font_weight")}. Modifies the \verb{h1, h2, h3} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight} property values.} \item{header_font_family_fallback}{Header Font Family Fallback. Defaults to Georgia, serif. Modifies the \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--header-font-family-fallback)} in any argument of a style function or in custom CSS.} \item{header_font_url}{Header Font URL. Defaults to \code{xaringanthemer_font_default("header_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults to \code{NULL}. Modifies the \code{body} element.} \item{code_font_family}{Code Font Family. Defaults to \code{xaringanthemer_font_default("code_font_family")}. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-family)} in any argument of a style function or in custom CSS.} \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the \code{.remark-inline} class. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size} property values. The value of this variable is also stored as a CSS variable that can be referenced with \code{var(--code-font-size)} in any argument of a style function or in custom CSS.} \item{code_font_url}{Code Font URL. Defaults to \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url} elements.} \item{code_font_family_fallback}{Code Font Fallback. Defaults to \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the \verb{.remark-code, .remark-inline-code} classes.} \item{link_decoration}{Text decoration of links. Defaults to none. Modifies the \verb{a, a > code} elements. Accepts CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration}{text-decoration} property values.} \item{colors}{A named vector of custom colors. The names of the colors become CSS variables and classes that can be used within your slides. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable \code{--blue}, a \code{.blue} CSS class that applies the color to the text or foreground color, and a \code{.bg-blue} CSS class that applies the color to the background.} \item{extra_css}{A named list of CSS definitions each containing a named list of CSS property-value pairs, i.e. \code{list(".class-id" = list("css-property" = "value"))}.} \item{extra_fonts}{A list of additional fonts to import, each list element can be either a URL as a character string or a call to \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you will need to write custom CSS rules that apply the font to an element or class with the \code{font-family} property. See the \strong{Fonts} section of \code{vignette("xaringanthemer")} for an example.} \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"} } \value{ The CSS styles are written to the file path provided in \code{outfile} (by default to \code{xaringan-themer.css}). If \code{outfile} is \code{NULL}, the CSS is returned directly as a character string. } \description{ Creates a customized Xaringan theme CSS file. } \section{Functions}{ \itemize{ \item \code{xaringanthemer_font_default()}: Default values for font family, weight, URLs and font fallbacks. }} \section{Usage}{ To use the styles created by this theme function, make sure that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML header. If you change the name of the output file using the \code{outfile} argument, use that name instead of the default file name. \if{html}{\out{
}}\preformatted{output: xaringan::moon_reader: css: xaringan-themer.css }\if{html}{\out{
}} } \examples{ # Create a xaringan style in a temporary file xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") style_xaringan( text_color = "#002b3", inverse_background_color = "#31b09e", inverse_text_color = "#002b3", outfile = xaringan_themer_css # omit in your slides to write the # styles to xaringan-themer.css ) # View the CSS: # file.edit(xaringan_themer_css) } \seealso{ Other themes: \code{\link{style_duo}()}, \code{\link{style_duo_accent}()}, \code{\link{style_duo_accent_inverse}()}, \code{\link{style_mono_accent}()}, \code{\link{style_mono_accent_inverse}()}, \code{\link{style_mono_dark}()}, \code{\link{style_mono_light}()}, \code{\link{style_solarized_dark}()}, \code{\link{style_solarized_light}()} } \concept{themes} ================================================ FILE: man/theme_xaringan.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot2.R \name{theme_xaringan} \alias{theme_xaringan} \title{A Plot Theme for ggplot2 by xaringanthemer} \usage{ theme_xaringan( text_color = NULL, background_color = NULL, accent_color = NULL, accent_secondary_color = NULL, css_file = NULL, set_ggplot_defaults = TRUE, text_font = NULL, text_font_use_google = NULL, text_font_size = NULL, title_font = NULL, title_font_use_google = NULL, title_font_size = NULL, use_showtext = NULL ) } \arguments{ \item{text_color}{Color for text and foreground, inherits from \code{text_color}} \item{background_color}{Color for background, inherits from \code{background_color}} \item{accent_color}{Color for titles and accents, inherits from \code{header_color}} \item{accent_secondary_color}{Color for secondary accents, inherits from \code{text_bold_color}} \item{css_file}{Path to a \pkg{xaringanthemer} CSS file, from which the theme variables and values will be inferred. In general, if you use the \pkg{xaringathemer} defaults, you will not need to set this. This feature lets you create a \pkg{ggplot2} theme for your \pkg{xaringan} slides, even if you have only saved your theme CSS file and you aren't creating your CSS theme with \pkg{xaringanthemer} in your slides' source file.} \item{set_ggplot_defaults}{Should defaults be set for \pkg{ggplot2} \emph{geoms}? Defaults to TRUE. To restore ggplot's defaults, or the previously set geom defaults, see \code{\link[=theme_xaringan_restore_defaults]{theme_xaringan_restore_defaults()}}.} \item{text_font}{Font to use for text elements, passed to \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{text_font_use_google} is \code{TRUE}. Inherits from \code{text_font_family}. If manually specified, can be a \code{\link[=google_font]{google_font()}}.} \item{text_font_use_google}{Is \code{text_font} available on \href{https://fonts.google.com}{Google Fonts}?} \item{text_font_size}{Base text font size, inherits from \code{text_font_size}, or defaults to 11.} \item{title_font}{Font to use for title elements, passed to \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{title_font_use_google} is \code{TRUE}. Inherits from \code{title_font_family}. If manually specified, can be a \code{\link[=google_font]{google_font()}}.} \item{title_font_use_google}{Is \code{title_font} available on \href{https://fonts.google.com}{Google Fonts}?} \item{title_font_size}{Base text font size, inherits from \code{title_font_size}, or defaults to 14.} \item{use_showtext}{If \code{TRUE} the \pkg{showtext} package will be used to register Google fonts. Set to \code{FALSE} to disable this feature entirely, which may result in errors during plotting if the fonts used are not available locally. The default is \code{TRUE} when the \pkg{showtext} package is installed.} } \value{ A ggplot2 theme } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}} Creates \pkg{ggplot2} themes to match the xaringanthemer theme used in the \pkg{xaringan} slides that seamlessly matches the "normal" slide colors and styles. See \code{vignette("ggplot2-themes")} for more information and examples. } \examples{ # Requires ggplot2 has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) if (has_ggplot2) { # Because this is an example, we'll save the CSS to a temp file path_to_css_file <- tempfile(fileext = ".css") # Create the xaringan theme: dark blue background with teal green accents style_duo( primary_color = "#002b36", secondary_color = "#31b09e", # Using basic fonts for this example, but the plot theme will # automatically use your theme font if you use Google fonts text_font_family = "sans", header_font_family = "serif", outfile = path_to_css_file ) library(ggplot2) ggplot(mpg) + aes(cty, hwy) + geom_point() + ggtitle("Fuel Efficiency of Various Cars") + theme_xaringan() } } \seealso{ Other xaringanthemer ggplot2 themes: \code{\link{theme_xaringan_base}()}, \code{\link{theme_xaringan_inverse}()}, \code{\link{theme_xaringan_set_defaults}()} } \concept{xaringanthemer ggplot2 themes} ================================================ FILE: man/theme_xaringan_base.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot2.R \name{theme_xaringan_base} \alias{theme_xaringan_base} \title{The ggplot2 xaringanthemer base plot theme} \usage{ theme_xaringan_base( text_color, background_color, ..., set_ggplot_defaults = TRUE, accent_color = NULL, accent_secondary_color = NULL, text_font = NULL, text_font_use_google = NULL, text_font_size = NULL, title_font = NULL, title_font_use_google = NULL, title_font_size = NULL, use_showtext = NULL ) } \arguments{ \item{text_color}{Color for text and foreground} \item{background_color}{Color for background} \item{...}{Ignored} \item{set_ggplot_defaults}{Should defaults be set for \pkg{ggplot2} \emph{geoms}? Defaults to TRUE. To restore ggplot's defaults, or the previously set geom defaults, see \code{\link[=theme_xaringan_restore_defaults]{theme_xaringan_restore_defaults()}}.} \item{accent_color}{Color for titles and accents, inherits from \code{header_color} or \code{text_color}. Used for the \code{title} base setting in \code{\link[ggplot2:theme]{ggplot2::theme()}}, and additionally for setting the \code{color} or \code{fill} of \pkg{ggplot2} geom defaults.} \item{accent_secondary_color}{Color for secondary accents, inherits from \code{text_bold_color} or \code{accent_color}. Used only when setting \pkg{ggplot2} geom defaults.} \item{text_font}{Font to use for text elements, passed to \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{text_font_use_google} is \code{TRUE}. Inherits from \code{text_font_family}. If manually specified, can be a \code{\link[=google_font]{google_font()}}.} \item{text_font_use_google}{Is \code{text_font} available on \href{https://fonts.google.com}{Google Fonts}?} \item{text_font_size}{Base text font size, inherits from \code{text_font_size}, or defaults to 11.} \item{title_font}{Font to use for title elements, passed to \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{title_font_use_google} is \code{TRUE}. Inherits from \code{title_font_family}. If manually specified, can be a \code{\link[=google_font]{google_font()}}.} \item{title_font_use_google}{Is \code{title_font} available on \href{https://fonts.google.com}{Google Fonts}?} \item{title_font_size}{Base text font size, inherits from \code{title_font_size}, or defaults to 14.} \item{use_showtext}{If \code{TRUE} the \pkg{showtext} package will be used to register Google fonts. Set to \code{FALSE} to disable this feature entirely, which may result in errors during plotting if the fonts used are not available locally. The default is \code{TRUE} when the \pkg{showtext} package is installed.} } \value{ A ggplot2 theme } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}} Provides a base plot theme for \pkg{ggplot2} to match the \pkg{xaringan} slide theme created by \link{xaringanthemer}. The theme is designed to create a general plot style from two colors, a \code{background_color} and a \code{text_color} (or foreground color). Also accepts an \code{accent_color} and an \code{accent_secondary_color} that are \link{xaringanthemer} is not required for the base theme. Use \code{\link[=theme_xaringan]{theme_xaringan()}} or \code{\link[=theme_xaringan_inverse]{theme_xaringan_inverse()}} in xaringan slides styled by xaringanthemer for a plot theme that matches the slide style. See \code{vignette("ggplot2-themes")} for more information and examples. } \examples{ # Requires ggplot2 has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) if (has_ggplot2) { library(ggplot2) plot1 <- ggplot(mpg) + aes(cty, hwy) + geom_point() + theme_xaringan_base( text_color = "#602f6b", # imperial background_color = "#f8f8f8", # light gray accent_color = "#317873", # myrtle green title_font = "sans", text_font = "serif", set_ggplot_defaults = TRUE ) + labs( title = "Fuel Efficiency of Various Cars", subtitle = "+ theme_xaringan_base()", caption = "xaringanthemer" ) print(plot1) plot2 <- ggplot(mpg) + aes(hwy) + geom_histogram(binwidth = 2) + theme_xaringan_base( text_color = "#a8a9c8", # light purple background_color = "#303163", # deep slate purple accent_color = "#ffff99", # canary yellow title_font = "sans", text_font = "serif", set_ggplot_defaults = TRUE ) + labs( title = "Highway Fuel Efficiency", subtitle = "+ theme_xaringan_base()", caption = "xaringanthemer" ) print(plot2) } } \seealso{ Other xaringanthemer ggplot2 themes: \code{\link{theme_xaringan}()}, \code{\link{theme_xaringan_inverse}()}, \code{\link{theme_xaringan_set_defaults}()} } \concept{xaringanthemer ggplot2 themes} ================================================ FILE: man/theme_xaringan_get_value.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot2.R \name{theme_xaringan_get_value} \alias{theme_xaringan_get_value} \title{Get the Value of xaringanthemer Style Setting} \usage{ theme_xaringan_get_value(setting, css_file = NULL) } \arguments{ \item{setting}{A xaringanthemer style setting} \item{css_file}{Path to a \pkg{xaringanthemer} CSS file, from which the theme variables and values will be inferred. In general, if you use the \pkg{xaringathemer} defaults, you will not need to set this. This feature lets you create a \pkg{ggplot2} theme for your \pkg{xaringan} slides, even if you have only saved your theme CSS file and you aren't creating your CSS theme with \pkg{xaringanthemer} in your slides' source file.} } \value{ The value of the xaringanthemer style parameter. } \description{ A helper function to retrieve the value of style settings as set by a xaringanthemer style function, for use in plotting and other circumstances. } \section{Style Settings}{ Style settings used by xaringanthemer include: \itemize{ \item \code{background_color} \item \code{background_image} \item \code{background_position} \item \code{background_size} \item \code{blockquote_left_border_color} \item \code{code_font_family} \item \code{code_font_family_fallback} \item \code{code_font_google} \item \code{code_font_is_google} \item \code{code_font_size} \item \code{code_font_url} \item \code{code_highlight_color} \item \code{code_inline_background_color} \item \code{code_inline_color} \item \code{code_inline_font_size} \item \code{extra_css} \item \code{extra_fonts} \item \code{footnote_color} \item \code{footnote_font_size} \item \code{footnote_position_bottom} \item \code{header_background_auto} \item \code{header_background_color} \item \code{header_background_content_padding_top} \item \code{header_background_ignore_classes} \item \code{header_background_padding} \item \code{header_background_text_color} \item \code{header_color} \item \code{header_font_family} \item \code{header_font_google} \item \code{header_font_is_google} \item \code{header_font_url} \item \code{header_font_weight} \item \code{header_h1_font_size} \item \code{header_h2_font_size} \item \code{header_h3_font_size} \item \code{inverse_background_color} \item \code{inverse_header_color} \item \code{inverse_text_color} \item \code{inverse_text_shadow} \item \code{left_column_selected_color} \item \code{left_column_subtle_color} \item \code{link_color} \item \code{padding} \item \code{table_border_color} \item \code{table_row_border_color} \item \code{table_row_even_background_color} \item \code{text_bold_color} \item \code{text_color} \item \code{text_font_base} \item \code{text_font_family} \item \code{text_font_family_fallback} \item \code{text_font_google} \item \code{text_font_is_google} \item \code{text_font_size} \item \code{text_font_url} \item \code{text_font_weight} \item \code{text_slide_number_color} \item \code{text_slide_number_font_size} \item \code{title_slide_background_color} \item \code{title_slide_background_image} \item \code{title_slide_background_position} \item \code{title_slide_background_size} \item \code{title_slide_text_color} } } \examples{ # Create a xaringanthemer style in a temporary file for this example xaringan_themer_css <- tempfile("xaringan-themer", fileext = ".css") style_solarized_light(outfile = xaringan_themer_css) theme_xaringan_get_value("text_color") theme_xaringan_get_value("background_color") theme_xaringan_get_value("header_color") theme_xaringan_get_value("text_bold_color") } ================================================ FILE: man/theme_xaringan_inverse.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot2.R \name{theme_xaringan_inverse} \alias{theme_xaringan_inverse} \title{An Inverse Plot Theme for ggplot2 by xaringanthemer} \usage{ theme_xaringan_inverse( text_color = NULL, background_color = NULL, accent_color = NULL, accent_secondary_color = NULL, css_file = NULL, set_ggplot_defaults = TRUE, text_font = NULL, text_font_use_google = NULL, text_font_size = NULL, title_font = NULL, title_font_use_google = NULL, title_font_size = NULL, use_showtext = NULL ) } \arguments{ \item{text_color}{Color for text and foreground, inherits from \code{text_color}} \item{background_color}{Color for background, inherits from \code{background_color}} \item{accent_color}{Color for titles and accents, inherits from \code{header_color}} \item{accent_secondary_color}{Color for secondary accents, inherits from \code{text_bold_color}} \item{css_file}{Path to a \pkg{xaringanthemer} CSS file, from which the theme variables and values will be inferred. In general, if you use the \pkg{xaringathemer} defaults, you will not need to set this. This feature lets you create a \pkg{ggplot2} theme for your \pkg{xaringan} slides, even if you have only saved your theme CSS file and you aren't creating your CSS theme with \pkg{xaringanthemer} in your slides' source file.} \item{set_ggplot_defaults}{Should defaults be set for \pkg{ggplot2} \emph{geoms}? Defaults to TRUE. To restore ggplot's defaults, or the previously set geom defaults, see \code{\link[=theme_xaringan_restore_defaults]{theme_xaringan_restore_defaults()}}.} \item{text_font}{Font to use for text elements, passed to \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{text_font_use_google} is \code{TRUE}. Inherits from \code{text_font_family}. If manually specified, can be a \code{\link[=google_font]{google_font()}}.} \item{text_font_use_google}{Is \code{text_font} available on \href{https://fonts.google.com}{Google Fonts}?} \item{text_font_size}{Base text font size, inherits from \code{text_font_size}, or defaults to 11.} \item{title_font}{Font to use for title elements, passed to \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{title_font_use_google} is \code{TRUE}. Inherits from \code{title_font_family}. If manually specified, can be a \code{\link[=google_font]{google_font()}}.} \item{title_font_use_google}{Is \code{title_font} available on \href{https://fonts.google.com}{Google Fonts}?} \item{title_font_size}{Base text font size, inherits from \code{title_font_size}, or defaults to 14.} \item{use_showtext}{If \code{TRUE} the \pkg{showtext} package will be used to register Google fonts. Set to \code{FALSE} to disable this feature entirely, which may result in errors during plotting if the fonts used are not available locally. The default is \code{TRUE} when the \pkg{showtext} package is installed.} } \value{ A ggplot2 theme } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}} A \pkg{ggplot2} xaringanthemer plot theme to seamlessly match the "inverse" \pkg{xaringan} slide colors and styles as styled by \link{xaringanthemer}. See \code{vignette("ggplot2-themes")} for more information and examples. } \examples{ # Requires ggplot2 has_ggplot2 <- requireNamespace("ggplot2", quietly = TRUE) if (has_ggplot2) { # Because this is an example, we'll save the CSS to a temp file path_to_css_file <- tempfile(fileext = ".css") # Create the xaringan theme: dark blue background with teal green accents style_duo( primary_color = "#002b36", secondary_color = "#31b09e", # Using basic fonts for this example, but the plot theme will # automatically use your theme font if you use Google fonts text_font_family = "sans", header_font_family = "serif", outfile = path_to_css_file ) library(ggplot2) ggplot(mpg) + aes(cty, hwy) + geom_point() + ggtitle("Fuel Efficiency of Various Cars") + # themed to match the inverse slides: teal background with dark blue text theme_xaringan_inverse() } } \seealso{ Other xaringanthemer ggplot2 themes: \code{\link{theme_xaringan}()}, \code{\link{theme_xaringan_base}()}, \code{\link{theme_xaringan_set_defaults}()} } \concept{xaringanthemer ggplot2 themes} ================================================ FILE: man/theme_xaringan_set_defaults.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot2.R \name{theme_xaringan_set_defaults} \alias{theme_xaringan_set_defaults} \alias{theme_xaringan_restore_defaults} \title{Set and Restore ggplot2 geom Defaults} \usage{ theme_xaringan_set_defaults( text_color = NULL, background_color = NULL, accent_color = text_color, accent_secondary_color = accent_color, text_font = NULL ) theme_xaringan_restore_defaults() } \arguments{ \item{text_color}{Color for text and foreground, inherits from \code{text_color}} \item{background_color}{Color for background, inherits from \code{background_color}} \item{accent_color}{Color for titles and accents, inherits from \code{header_color}} \item{accent_secondary_color}{Color for secondary accents, inherits from \code{text_bold_color}} \item{text_font}{Font to use for text elements, passed to \code{\link[sysfonts:font_add_google]{sysfonts::font_add_google()}}, if available and \code{text_font_use_google} is \code{TRUE}. Inherits from \code{text_font_family}. Must be a length-one character.} } \value{ Invisibly returns a list of the current ggplot2 geom defaults Invisibly returns a list of the current ggplot2 geom defaults } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#maturing}{\figure{lifecycle-maturing.svg}{options: alt='[Maturing]'}}}{\strong{[Maturing]}} Set \pkg{ggplot2} \emph{geom} defaults to match \code{\link[=theme_xaringan]{theme_xaringan()}} with \code{theme_xaringan_set_defaults()} and restore the standard or previously-set defaults with \code{theme_xaringan_restore_defaults()}. By default, \code{theme_xaringan_set_defaults()} is run with \code{\link[=theme_xaringan]{theme_xaringan()}} or \code{\link[=theme_xaringan_inverse]{theme_xaringan_inverse()}}. } \section{Functions}{ \itemize{ \item \code{theme_xaringan_restore_defaults()}: Restore previous or standard \pkg{ggplot2} \emph{geom} defaults. }} \seealso{ Other xaringanthemer ggplot2 themes: \code{\link{theme_xaringan}()}, \code{\link{theme_xaringan_base}()}, \code{\link{theme_xaringan_inverse}()} } \concept{xaringanthemer ggplot2 themes} ================================================ FILE: man/xaringanthemer-deprecated.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/xaringanthemer-deprecated.R \name{xaringanthemer-deprecated} \alias{xaringanthemer-deprecated} \alias{write_xaringan_theme} \alias{write_extra_css} \alias{mono_light} \alias{mono_dark} \alias{mono_accent} \alias{mono_accent_inverse} \alias{duo} \alias{duo_accent} \alias{duo_accent_inverse} \alias{solarized_light} \alias{solarized_dark} \title{Deprecated or renamed functions} \usage{ write_xaringan_theme(...) write_extra_css(...) mono_light(...) mono_dark(...) mono_accent(...) mono_accent_inverse(...) duo(...) duo_accent(...) duo_accent_inverse(...) solarized_light(...) solarized_dark(...) } \arguments{ \item{...}{Argumets passed to the new or renamed functions.} } \value{ The result of the new or renamed function. } \description{ These functions in xaringanthemer have been deprecated or renamed. Use \code{\link[=style_xaringan]{style_xaringan()}} instead of \code{write_xaringan_theme()}. Use \code{\link[=style_extra_css]{style_extra_css()}} instead of \code{write_extra_css()}. Use \code{\link[=style_mono_light]{style_mono_light()}} instead of \code{mono_light()}. Use \code{\link[=style_mono_dark]{style_mono_dark()}} instead of \code{mono_dark()}. Use \code{\link[=style_mono_accent]{style_mono_accent()}} instead of \code{mono_accent()}. Use \code{\link[=style_mono_accent_inverse]{style_mono_accent_inverse()}} instead of \code{mono_accent_inverse()}. Use \code{\link[=style_duo]{style_duo()}} instead of \code{duo()}. Use \code{\link[=style_duo_accent]{style_duo_accent()}} instead of \code{duo_accent()}. Use \code{\link[=style_duo_accent_inverse]{style_duo_accent_inverse()}} instead of \code{duo_accent_inverse()}. Use \code{\link[=style_solarized_light]{style_solarized_light()}} instead of \code{solarized_light()}. Use \code{\link[=style_solarized_dark]{style_solarized_dark()}} instead of \code{solarized_dark()}. } \keyword{internal} ================================================ FILE: man/xaringanthemer-package.Rd ================================================ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/xaringanthemer-package.R \docType{package} \name{xaringanthemer-package} \alias{xaringanthemer} \alias{xaringanthemer-package} \title{xaringanthemer: Custom 'xaringan' CSS Themes} \description{ \if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} Create beautifully color-coordinated and customized themes for your 'xaringan' slides, without writing any CSS. Complete your slide theme with 'ggplot2' themes that match the font and colors used in your slides. Customized styles can be created directly in your slides' 'R Markdown' source file or in a separate external script. } \seealso{ Useful links: \itemize{ \item \url{https://pkg.garrickadenbuie.com/xaringanthemer/} \item \url{https://github.com/gadenbuie/xaringanthemer} \item Report bugs at \url{https://github.com/gadenbuie/xaringanthemer/issues} } } \author{ \strong{Maintainer}: Garrick Aden-Buie \email{garrick@adenbuie.com} (\href{https://orcid.org/0000-0002-7111-0077}{ORCID}) } \keyword{internal} ================================================ FILE: man-roxygen/style-usage.R ================================================ #' @section Usage: To use the styles created by this theme function, make sure #' that you use `xaringan-themer.css` as your CSS file in your slides' YAML #' header. If you change the name of the output file using the `outfile` #' argument, use that name instead of the default file name. #' #' ```yaml #' output: #' xaringan::moon_reader: #' css: xaringan-themer.css #' ```` #' #' @return The CSS styles are written to the file path provided in `outfile` #' (by default to `xaringan-themer.css`). If `outfile` is `NULL`, the CSS is #' returned directly as a character string. #' ================================================ FILE: man-roxygen/style_duo.R ================================================ #' @title Duotone Theme #' @description A duotone theme designed to work well with two complementary #' colors. #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_duo( #' primary_color = "#1f4257", #' secondary_color = "#f97b64", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_duo_accent.R ================================================ #' @title Duotone Accent Theme #' @description An default xaringan theme with a two colors used for color #' accents on select elements (headers, bold text, etc.). #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_duo_accent( #' primary_color = "#006747", #' secondary_color = "#cfc493", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_duo_accent_inverse.R ================================================ #' @title Duotone Accent Inverse Theme #' @description An "inverted" default xaringan theme with a two colors used #' for color accents on select elements (headers, bold text, etc.). #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_duo_accent_inverse( #' primary_color = "#006747", #' secondary_color = "#cfc493", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_mono_accent.R ================================================ #' @title Monotone Accent Theme #' @description The default xaringan theme with a single color used for color #' accents on select elements (headers, bold text, etc.). #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_mono_accent( #' base_color = "#43418A", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_mono_accent_inverse.R ================================================ #' @title Monotone Accent Inverse Theme #' @description An "inverted" default xaringan theme with a single color used #' for color accents on select elements (headers, bold text, etc.). #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_mono_accent_inverse( #' base_color = "#3c989e", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_mono_dark.R ================================================ #' @title Monotone Dark Theme #' @description A dark monotone theme based around a single color. #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_mono_dark( #' base_color = "#cbf7ed", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_mono_light.R ================================================ #' @title Monotone Light Theme #' @description A light monotone theme based around a single color. #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_mono_light( #' base_color = "#23395b", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_solarized_dark.R ================================================ #' @title Solarized Dark Theme #' @description A dark theme based around on the solarized color scheme. #' Works well with "\code{highlightStyle: solarized-dark}" or #' "\code{highlighStyle: solarized-light}". #' @references \url{https://ethanschoonover.com/solarized/} #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_solarized_dark( #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_solarized_light.R ================================================ #' @title Solarized Light Theme #' @description A light theme based around on the solarized color scheme. #' Works well with "\code{highlightStyle: solarized-dark}" or #' "\code{highlighStyle: solarized-light}". #' @references \url{https://ethanschoonover.com/solarized/} #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_solarized_light( #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/style_xaringan.R ================================================ #' @title Write A Customized Xaringan Theme #' @description Creates a customized Xaringan theme CSS file. #' @examples #' # Create a xaringan style in a temporary file #' xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css") #' #' style_xaringan( #' text_color = "#002b3", #' inverse_background_color = "#31b09e", #' inverse_text_color = "#002b3", #' outfile = xaringan_themer_css # omit in your slides to write the #' # styles to xaringan-themer.css #' ) #' #' # View the CSS: #' # file.edit(xaringan_themer_css) ================================================ FILE: man-roxygen/theme_params.R ================================================ #' @param extra_css A named list of CSS definitions each containing a named list #' of CSS property-value pairs, i.e. #' \code{list(".class-id" = list("css-property" = "value"))}. #' @param extra_fonts A list of additional fonts to import, each list element #' can be either a URL as a character string or a call to #' \code{\link{google_font}()}. To use a font imported in `extra_fonts`, you #' will need to write custom CSS rules that apply the font to an element or #' class with the `font-family` property. See the **Fonts** section of #' `vignette("xaringanthemer")` for an example. #' @param colors A named vector of custom colors. The names of the colors #' become CSS variables and classes that can be used within your slides. #' For example, `colors = c(blue = "#bad4ed")` adds a CSS variable #' `--blue`, a `.blue` CSS class that applies the color to the text or #' foreground color, and a `.bg-blue` CSS class that applies the color #' to the background. #' @param outfile Customized xaringan CSS output file name, default is "xaringan-themer.css" #' @family themes ================================================ FILE: pkgdown/_pkgdown.yml ================================================ authors: Garrick Aden-Buie: href: https://www.garrickadenbuie.com url: https://pkg.garrickadenbuie.com/xaringanthemer/ home: description: | Give your xaringan slides some style with xaringanthemer. Easy slide and plot themes for xaringan slides. development: mode: auto template: package: grkgdown navbar: type: light left: - text: Features href: articles/xaringanthemer.html - text: Reference href: reference/index.html - text: Themes menu: - text: Themes - text: Slide Themes href: articles/themes.html - text: ggplot2 Themes href: articles/ggplot2-themes.html - text: ------- - text: More Customization - text: Fonts href: articles/fonts.html - text: Template Variables href: articles/template-variables.html right: news: icon: far fa-newspaper fa-lg text: "" menu: - text: "xaringanthemer 0.3.0" href: https://garrickadenbuie.com/blog/xaringanthemer-v0-3-0/ - text: ------- - text: "Changelog" href: news/index.html github: icon: fab fa-github fa-lg href: https://github.com/gadenbuie/xaringanthemer twitter: icon: fab fa-twitter fa-lg href: https://twitter.com/grrrck home: icon: fas fa-home fa-lg href: https://www.garrickadenbuie.com reference: - title: Writing CSS desc: Functions that write CSS from inside a xaringan R markdown document. contents: - style_xaringan - style_extra_css - title: xaringan Themes desc: | Parameterized styles for xaringan slides using one (mono) or two (duo) base colors. Bonus: slide styles based on the solarized color palette. contents: - starts_with("style_mono") - starts_with("style_duo") - starts_with("style_solarized") - title: Google Fonts desc: Helper functions for using Google Fonts in your slide styles. contents: - starts_with("google_") - title: ggplot2 Themes desc: Plot themes for ggplot2 to match your xaringanthemer slide styles. contents: - theme_xaringan - theme_xaringan_inverse - theme_xaringan_base - theme_xaringan_set_defaults - starts_with("scale_xaringan") - title: Helper functions desc: Helpers for Google fonts and color adjustments. contents: - theme_xaringan_get_value - ends_with("color") - apply_alpha - choose_dark_or_light ================================================ FILE: pkgdown/extra.css ================================================ :root { --bs-light-rgb: 249, 250, 250; } .bg-light { --bs-bg-opacity: 0.95; } pre { border: none; border-left: 2px solid #cfd5d8; border-radius: 0; background-color: var(--bs-body-bg); line-height: 1.33; } main pre a { text-decoration: none; } main pre a:hover { text-decoration: underline; } @media (max-width: 575.98px) { .container main pre { margin-left: calc(var(--bs-gutter-x) * -.5); margin-right: calc(var(--bs-gutter-x) * -.5 - 1px); border-radius: 0; padding-left: 1rem; padding-right: 1rem; } } ================================================ FILE: tests/testthat/_snaps/utils.md ================================================ # printing google_font works Code google_font("Josefin Sans", "400", "400i", "600i", "700") Output Family: Josefin Sans Weights: 400,400i,600i,700 URL: https://fonts.googleapis.com/css?family=Josefin+Sans:400,400i,600i,700&display=swap ================================================ FILE: tests/testthat/css/duo-header_bg.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #FEFDFD; --header-color: #F97B64; --background-color: #1F4257; --link-color: #F97B64; --text-bold-color: #F97B64; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #1F4257; --inverse-background-color: #F97B64; --inverse-header-color: #1F4257; --inverse-link-color: #F97B64; --title-slide-background-color: #1F4257; --title-slide-text-color: #F97B64; --header-background-color: #F97B64; --header-background-text-color: #1F4257; --primary: #1F4257; --secondary: #F97B64; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #F97B64; } .remark-slide-number { color: #FEFDFD; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #F97B6499; } .left-column h2:last-of-type, .left-column h3:last-child { color: #F97B64; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #F97B6480; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #E8ECEE; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #E8ECEE; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1, .remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background, .remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .primary { color: var(--primary); } .bg-primary { background-color: var(--primary); } .secondary { color: var(--secondary); } .bg-secondary { background-color: var(--secondary); } ================================================ FILE: tests/testthat/css/duo.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #FEFDFD; --header-color: #F97B64; --background-color: #1F4257; --link-color: #F97B64; --text-bold-color: #F97B64; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #1F4257; --inverse-background-color: #F97B64; --inverse-header-color: #1F4257; --inverse-link-color: #F97B64; --title-slide-background-color: #1F4257; --title-slide-text-color: #F97B64; --header-background-color: #F97B64; --header-background-text-color: #1F4257; --primary: #1F4257; --secondary: #F97B64; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #F97B64; } .remark-slide-number { color: #FEFDFD; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #F97B6499; } .left-column h2:last-of-type, .left-column h3:last-child { color: #F97B64; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #F97B6480; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #E8ECEE; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #E8ECEE; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .primary { color: var(--primary); } .bg-primary { background-color: var(--primary); } .secondary { color: var(--secondary); } .bg-secondary { background-color: var(--secondary); } ================================================ FILE: tests/testthat/css/duo_accent.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #000000; --header-color: #035AA6; --background-color: #FFFFFF; --link-color: #035AA6; --text-bold-color: #035AA6; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #000000; --inverse-background-color: #03A696; --inverse-header-color: #000000; --inverse-link-color: #035AA6; --title-slide-background-color: #035AA6; --title-slide-text-color: #FFFFFF; --header-background-color: #035AA6; --header-background-text-color: #FFFFFF; --primary: #035AA6; --secondary: #03A696; --white: #FFFFFF; --black: #000000; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #035AA6; } .remark-slide-number { color: #035AA6; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #035AA699; } .left-column h2:last-of-type, .left-column h3:last-child { color: #035AA6; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #03A69680; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #CCEDEA; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #CCEDEA; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .primary { color: var(--primary); } .bg-primary { background-color: var(--primary); } .secondary { color: var(--secondary); } .bg-secondary { background-color: var(--secondary); } .white { color: var(--white); } .bg-white { background-color: var(--white); } .black { color: var(--black); } .bg-black { background-color: var(--black); } ================================================ FILE: tests/testthat/css/duo_accent_inverse.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #FFFFFF; --header-color: #035AA6; --background-color: #000000; --link-color: #03A696; --text-bold-color: #03A696; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #000000; --inverse-background-color: #03A696; --inverse-header-color: #000000; --inverse-link-color: #03A696; --title-slide-background-color: #035AA6; --title-slide-text-color: #FFFFFF; --header-background-color: #035AA6; --header-background-text-color: #000000; --primary: #035AA6; --secondary: #03A696; --white: #FFFFFF; --black: #000000; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #03A696; } .remark-slide-number { color: #035AA6; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #035AA699; } .left-column h2:last-of-type, .left-column h3:last-child { color: #035AA6; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #03A69680; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #024884; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #024884; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .primary { color: var(--primary); } .bg-primary { background-color: var(--primary); } .secondary { color: var(--secondary); } .bg-secondary { background-color: var(--secondary); } .white { color: var(--white); } .bg-white { background-color: var(--white); } .black { color: var(--black); } .bg-black { background-color: var(--black); } ================================================ FILE: tests/testthat/css/google_fonts.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=IBM+Plex+Serif:700&display=swap); @import url(https://fonts.googleapis.com/css?family=IBM+Plex+Mono&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: 'IBM Plex Serif'; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'IBM Plex Mono'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #000; --header-color: #000; --background-color: #FFF; --link-color: rgb(249, 38, 114); --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #d6d6d6; --inverse-background-color: #272822; --inverse-header-color: #f3f3f3; --inverse-link-color: rgb(249, 38, 114); --title-slide-background-color: #272822; --title-slide-text-color: #d6d6d6; --header-background-color: #000; --header-background-text-color: #FFF; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #000; } .remark-slide-number { color: #272822; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #777; } .left-column h2:last-of-type, .left-column h3:last-child { color: #000; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px lightgray; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #eee; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #eee; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } ================================================ FILE: tests/testthat/css/mono_accent.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #272822; --header-color: #43418A; --background-color: #FFFFFF; --link-color: #43418A; --text-bold-color: #43418A; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #FFFFFF; --inverse-background-color: #43418A; --inverse-header-color: #FFFFFF; --inverse-link-color: #43418A; --title-slide-background-color: #43418A; --title-slide-text-color: #FFFFFF; --header-background-color: #43418A; --header-background-text-color: #FFFFFF; --base: #43418A; --white: #FFFFFF; --black: #272822; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #43418A; } .remark-slide-number { color: #43418A; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #43418A99; } .left-column h2:last-of-type, .left-column h3:last-child { color: #43418A; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #43418A80; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #D9D9E7; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #D9D9E7; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .base { color: var(--base); } .bg-base { background-color: var(--base); } .white { color: var(--white); } .bg-white { background-color: var(--white); } .black { color: var(--black); } .bg-black { background-color: var(--black); } ================================================ FILE: tests/testthat/css/mono_accent_inverse.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #FFFFFF; --header-color: #3C989E; --background-color: #050F0F; --link-color: #3C989E; --text-bold-color: #3C989E; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #050F0F; --inverse-background-color: #3C989E; --inverse-header-color: #050F0F; --inverse-link-color: #3C989E; --title-slide-background-color: #3C989E; --title-slide-text-color: #050F0F; --header-background-color: #3C989E; --header-background-text-color: #050F0F; --base: #3C989E; --white: #FFFFFF; --black: #050F0F; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #3C989E; } .remark-slide-number { color: #3C989E; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #3C989E99; } .left-column h2:last-of-type, .left-column h3:last-child { color: #3C989E; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #3C989E80; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #0B1E1F; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #0B1E1F; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .base { color: var(--base); } .bg-base { background-color: var(--base); } .white { color: var(--white); } .bg-white { background-color: var(--white); } .black { color: var(--black); } .bg-black { background-color: var(--black); } ================================================ FILE: tests/testthat/css/mono_dark.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #F4FDFB; --header-color: #cbf7ed; --background-color: #1E2523; --link-color: #cbf7ed; --text-bold-color: #cbf7ed; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #1E2523; --inverse-background-color: #cbf7ed; --inverse-header-color: #1E2523; --inverse-link-color: #cbf7ed; --title-slide-background-color: #cbf7ed; --title-slide-text-color: #1E2523; --header-background-color: #cbf7ed; --header-background-text-color: #1E2523; --base: #cbf7ed; --white: #F4FDFB; --black: #1E2523; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #cbf7ed; } .remark-slide-number { color: #cbf7ed; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #cbf7ed99; } .left-column h2:last-of-type, .left-column h3:last-child { color: #cbf7ed; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #cbf7ed80; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #3C4A47; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #3C4A47; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .base { color: var(--base); } .bg-base { background-color: var(--base); } .white { color: var(--white); } .bg-white { background-color: var(--white); } .black { color: var(--black); } .bg-black { background-color: var(--black); } ================================================ FILE: tests/testthat/css/mono_light-header_bg.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #18273F; --header-color: #23395b; --background-color: #E9EBEE; --link-color: #23395b; --text-bold-color: #23395b; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #E9EBEE; --inverse-background-color: #23395b; --inverse-header-color: #E9EBEE; --inverse-link-color: #23395b; --title-slide-background-color: #23395b; --title-slide-text-color: #E9EBEE; --header-background-color: #23395b; --header-background-text-color: #E9EBEE; --base: #23395b; --white: #E9EBEE; --black: #18273F; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #23395b; } .remark-slide-number { color: #23395b; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #23395b99; } .left-column h2:last-of-type, .left-column h3:last-child { color: #23395b; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #23395b80; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #D3D7DE; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #D3D7DE; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1, .remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background, .remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .base { color: var(--base); } .bg-base { background-color: var(--base); } .white { color: var(--white); } .bg-white { background-color: var(--white); } .black { color: var(--black); } .bg-black { background-color: var(--black); } ================================================ FILE: tests/testthat/css/mono_light.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #18273F; --header-color: #23395b; --background-color: #E9EBEE; --link-color: #23395b; --text-bold-color: #23395b; --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #E9EBEE; --inverse-background-color: #23395b; --inverse-header-color: #E9EBEE; --inverse-link-color: #23395b; --title-slide-background-color: #23395b; --title-slide-text-color: #E9EBEE; --header-background-color: #23395b; --header-background-text-color: #E9EBEE; --base: #23395b; --white: #E9EBEE; --black: #18273F; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #23395b; } .remark-slide-number { color: #23395b; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #23395b99; } .left-column h2:last-of-type, .left-column h3:last-child { color: #23395b; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #23395b80; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #D3D7DE; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #D3D7DE; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .base { color: var(--base); } .bg-base { background-color: var(--base); } .white { color: var(--white); } .bg-white { background-color: var(--white); } .black { color: var(--black); } .bg-black { background-color: var(--black); } ================================================ FILE: tests/testthat/css/solarized_dark-header_bg.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #839496; --header-color: #dc322f; --background-color: #002b36; --link-color: #b58900; --text-bold-color: #d33682; --code-highlight-color: #268bd240; --inverse-text-color: #002b36; --inverse-background-color: #fdf6e3; --inverse-header-color: #002b36; --inverse-link-color: #b58900; --title-slide-background-color: #fdf6e3; --title-slide-text-color: #002b36; --header-background-color: #dc322f; --header-background-text-color: #002b36; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #6c71c4; } .remark-slide-number { color: #586e75; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #586e75; } .left-column h2:last-of-type, .left-column h3:last-child { color: #93a1a1; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #cb4b16; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #657b83; border-bottom: 1px solid #657b83; } .remark-slide table thead th { border-bottom: 1px solid #657b83; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #073642; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #073642; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1, .remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background, .remark-slide-content:not(.normal):not(.inverse):not(.title):not(.middle):not(.bottom) { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } ================================================ FILE: tests/testthat/css/solarized_dark.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #839496; --header-color: #dc322f; --background-color: #002b36; --link-color: #b58900; --text-bold-color: #d33682; --code-highlight-color: #268bd240; --inverse-text-color: #002b36; --inverse-background-color: #fdf6e3; --inverse-header-color: #002b36; --inverse-link-color: #b58900; --title-slide-background-color: #fdf6e3; --title-slide-text-color: #002b36; --header-background-color: #dc322f; --header-background-text-color: #002b36; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #6c71c4; } .remark-slide-number { color: #586e75; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #586e75; } .left-column h2:last-of-type, .left-column h3:last-child { color: #93a1a1; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #cb4b16; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #657b83; border-bottom: 1px solid #657b83; } .remark-slide table thead th { border-bottom: 1px solid #657b83; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #073642; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #073642; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } ================================================ FILE: tests/testthat/css/solarized_light.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #657b83; --header-color: #dc322f; --background-color: #fdf6e3; --link-color: #b58900; --text-bold-color: #d33682; --code-highlight-color: #268bd240; --inverse-text-color: #fdf6e3; --inverse-background-color: #002b36; --inverse-header-color: #fdf6e3; --inverse-link-color: #b58900; --title-slide-background-color: #002b36; --title-slide-text-color: #fdf6e3; --header-background-color: #dc322f; --header-background-text-color: #fdf6e3; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #6c71c4; } .remark-slide-number { color: #93a1a1; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; color: var(--text-bold-color); } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #93a1a1; } .left-column h2:last-of-type, .left-column h3:last-child { color: #586e75; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px #cb4b16; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #839496; border-bottom: 1px solid #839496; } .remark-slide table thead th { border-bottom: 1px solid #839496; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #eee8d5; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #eee8d5; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } ================================================ FILE: tests/testthat/css/xaringan.css ================================================ /* ------------------------------------------------------- * * !! This file was generated by xaringanthemer !! * * Changes made to this file directly will be overwritten * if you used xaringanthemer in your xaringan slides Rmd * * Issues or likes? * - https://github.com/gadenbuie/xaringanthemer * - https://www.garrickadenbuie.com * * Need help? Try: * - vignette(package = "xaringanthemer") * - ?xaringanthemer::style_xaringan * - xaringan wiki: https://github.com/yihui/xaringan/wiki * - remarkjs wiki: https://github.com/gnab/remark/wiki * * Version: a.b.c.d.eeee * * ------------------------------------------------------- */ @import url(https://fonts.googleapis.com/css?family=Noto+Serif&display=swap); @import url(https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap); @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap); :root { /* Fonts */ --text-font-family: 'Noto Serif'; --text-font-is-google: 1; --text-font-family-fallback: -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial; --text-font-base: sans-serif; --header-font-family: Cabin; --header-font-is-google: 1; --header-font-family-fallback: Georgia, serif; --code-font-family: 'Source Code Pro'; --code-font-is-google: 1; --base-font-size: 20px; --text-font-size: 1rem; --code-font-size: 0.9rem; --code-inline-font-size: 1em; --header-h1-font-size: 2.75rem; --header-h2-font-size: 2.25rem; --header-h3-font-size: 1.75rem; /* Colors */ --text-color: #000; --header-color: #000; --background-color: #FFF; --link-color: rgb(249, 38, 114); --code-highlight-color: rgba(255,255,0,0.5); --inverse-text-color: #d6d6d6; --inverse-background-color: #272822; --inverse-header-color: #f3f3f3; --inverse-link-color: rgb(249, 38, 114); --title-slide-background-color: #272822; --title-slide-text-color: #d6d6d6; --header-background-color: #000; --header-background-text-color: #FFF; --light-blue: #bad4ed; } html { font-size: var(--base-font-size); } body { font-family: var(--text-font-family), var(--text-font-family-fallback), var(--text-font-base); font-weight: normal; color: var(--text-color); } h1, h2, h3 { font-family: var(--header-font-family), var(--header-font-family-fallback); font-weight: 600; color: var(--header-color); } .remark-slide-content { background-color: var(--background-color); font-size: 1rem; padding: 16px 64px 16px 64px; width: 100%; height: 100%; } .remark-slide-content h1 { font-size: var(--header-h1-font-size); } .remark-slide-content h2 { font-size: var(--header-h2-font-size); } .remark-slide-content h3 { font-size: var(--header-h3-font-size); } .remark-code, .remark-inline-code { font-family: var(--code-font-family), Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace; } .remark-code { font-size: var(--code-font-size); } .remark-inline-code { font-size: var(--code-inline-font-size); color: #000; } .remark-slide-number { color: #272822; opacity: 1; font-size: 0.9rem; } strong { font-weight: bold; } a, a > code { color: var(--link-color); text-decoration: none; } .footnote { position: absolute; bottom: 60px; padding-right: 4em; font-size: 0.9em; } .remark-code-line-highlighted { background-color: var(--code-highlight-color); } .inverse { background-color: var(--inverse-background-color); color: var(--inverse-text-color); } .inverse h1, .inverse h2, .inverse h3 { color: var(--inverse-header-color); } .inverse a, .inverse a > code { color: var(--inverse-link-color); } .title-slide, .title-slide h1, .title-slide h2, .title-slide h3 { color: var(--title-slide-text-color); } .title-slide { background-color: var(--title-slide-background-color); } .title-slide .remark-slide-number { display: none; } /* Two-column layout */ .left-column { width: 20%; height: 92%; float: left; } .left-column h2, .left-column h3 { color: #777; } .left-column h2:last-of-type, .left-column h3:last-child { color: #000; } .right-column { width: 75%; float: right; padding-top: 1em; } .pull-left { float: left; width: 47%; } .pull-right { float: right; width: 47%; } .pull-right + * { clear: both; } img, video, iframe { max-width: 100%; } blockquote { border-left: solid 5px lightgray; padding-left: 1em; } .remark-slide table { margin: auto; border-top: 1px solid #666; border-bottom: 1px solid #666; } .remark-slide table thead th { border-bottom: 1px solid #ddd; } th, td { padding: 5px; } .remark-slide table:not(.table-unshaded) thead, .remark-slide table:not(.table-unshaded) tfoot, .remark-slide table:not(.table-unshaded) tr:nth-child(even) { background: #eee; } table.dataTable tbody { background-color: var(--background-color); color: var(--text-color); } table.dataTable.display tbody tr.odd { background-color: var(--background-color); } table.dataTable.display tbody tr.even { background-color: #eee; } table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { background-color: rgba(255, 255, 255, 0.5); } .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate { color: var(--text-color); } .dataTables_wrapper .dataTables_paginate .paginate_button { color: var(--text-color) !important; } /* Horizontal alignment of code blocks */ .remark-slide-content.left pre, .remark-slide-content.center pre, .remark-slide-content.right pre { text-align: start; width: max-content; max-width: 100%; } .remark-slide-content.left pre, .remark-slide-content.right pre { min-width: 50%; min-width: min(40ch, 100%); } .remark-slide-content.center pre { min-width: 66%; min-width: min(50ch, 100%); } .remark-slide-content.left pre { margin-left: unset; margin-right: auto; } .remark-slide-content.center pre { margin-left: auto; margin-right: auto; } .remark-slide-content.right pre { margin-left: auto; margin-right: unset; } /* Slide Header Background for h1 elements */ .remark-slide-content.header_background > h1 { display: block; position: absolute; top: 0; left: 0; width: 100%; background: var(--header-background-color); color: var(--header-background-text-color); padding: 2rem 64px 1.5rem 64px; margin-top: 0; box-sizing: border-box; } .remark-slide-content.header_background { padding-top: 7rem; } @page { margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } .light-blue { color: var(--light-blue); } .bg-light-blue { background-color: var(--light-blue); } ================================================ FILE: tests/testthat/helper-session.R ================================================ with_clean_session <- function(.f, args = list()) { empty_wd <- tempfile() dir.create(empty_wd) owd <- setwd(empty_wd) on.exit({setwd(owd); unlink(empty_wd, TRUE)}) args$.f <- .f res <- callr::r_safe(function(.f, ...) { tryCatch( list(result = .f(...), error = NULL), error = function(e) list(result = NULL, error = e$message) ) }, args) if (!is.null(res$error)) { stop(res$error) } else { res$result } } ================================================ FILE: tests/testthat/test-color.R ================================================ # test_that() describe("prepare_colors()", { it("returns NULL if NULL or missing", { expect_null(prepare_colors()) expect_null(prepare_colors(NULL)) expect_null(prepare_colors(list())) }) it("requires a named vector or list", { expect_error(prepare_colors("#00FF00")) }) it("requires valid CSS names", { expect_error(prepare_colors(c("light blue" = "#88f"))) expect_warning(prepare_colors(c("light/blue" = "#88f")), "light/blue") expect_warning(prepare_colors(c("-lightblue" = "#88f")), "-lightblue") expect_warning(prepare_colors(c("_lightblue" = "#88f")), "_lightblue") colors <- c("light_blue" = "#88f", "light-blue" = "#88f") expect_silent( expect_equal( prepare_colors(colors), list( list(color_name = "light_blue", value = "#88f"), list(color_name = "light-blue", value = "#88f") ) ) ) }) it("returns list with color_name and value for each color", { colors <- c('test' = "#4ed4ed") prepared <- prepare_colors(colors) expect_equal(names(prepared[[1]]), c("color_name", "value")) expect_equal(prepared[[1]]$color_name, names(colors)[[1]]) expect_equal(prepared[[1]]$value, colors[[1]]) }) }) describe("full_length_hex()", { it("makes 3-length hex to 6-length", { expect_equal(full_length_hex("#123"), "#112233") }) it("keeps length 6 hex", { expect_equal(full_length_hex("#123456"), "#123456") }) it("errors if not a hex color", { expect_error(full_length_hex("123abc")) expect_error(full_length_hex("#1234567")) expect_error(full_length_hex("#00000Z")) }) }) describe("check_color_is_hex", { it("returns TRUE when color is valid hex", { expect_true(check_color_is_hex("#123456")) expect_true(check_color_is_hex("#abc123")) expect_true(check_color_is_hex("#abc")) expect_true(check_color_is_hex("#123")) }) it("returns FALSE and warns if requested", { expect_false(check_color_is_hex("123456", throw = NULL)) expect_false(check_color_is_hex("123", throw = NULL)) expect_false(check_color_is_hex("apple", throw = NULL)) expect_warning(check_color_is_hex("123456")) expect_warning(check_color_is_hex("123", msg = "{color} is bad"), "123 is bad") expect_warning(check_color_is_hex("apple")) }) it("errors if throw = stop", { expect_error(check_color_is_hex("123", throw = stop), "123 is not") }) }) describe("lighten_color() and darken_color()", { it("errors if strength not in [0, 1]", { expect_error(lighten_color("#123", 9)) expect_error(darken_color("#123", 9)) }) it("returns original color if strength = 0", { expect_equal(lighten_color("#808080", 0), "#808080") expect_equal(darken_color("#808080", 0), "#808080") }) it("returns entire blend color if strength = 0", { expect_equal(lighten_color("#808080", 1), "#FFFFFF") expect_equal(darken_color("#808080", 1), "#000000") }) it("returns midpoint if strength = 0.5", { expect_equal(lighten_color("#000000", 0.5), "#7F7F7F") expect_equal(darken_color("#FFFFFF", 0.5), "#7F7F7F") }) }) ================================================ FILE: tests/testthat/test-css.R ================================================ test_that("read theme settings from css variables", { expected_vars <- list( background_color = "#E9EBEE", text_color = "#18273F", header_color = "#23395b", text_bold_color = "#23395b", inverse_background_color = "#23395b", inverse_text_color = "#E9EBEE", inverse_header_color = "#E9EBEE", base_font_size = "20px", text_font_size = "1rem", header_h3_font_size = "1.75rem", text_font_family = "'Noto Serif'", text_font_is_google = TRUE, header_font_family = "Cabin", header_font_is_google = TRUE, header_background_color = "#23395b", header_background_text_color = "#E9EBEE", code_font_family = "'Source Code Pro'", code_font_is_google = TRUE ) css_vars <- read_css_vars(testthat::test_path("css/mono_light.css")) for (var in names(expected_vars)) { expect_equal(!!css_vars[[var]], !!expected_vars[[var]]) } }) describe("find and choose xaringan themer files", { tmpdir <- tempfile() dir.create(tmpdir) mono_light_css <- normalizePath(test_path("css/mono_light.css")) xaringan_css <- normalizePath(test_path("css/xaringan.css")) owd <- setwd(tmpdir) on.exit(setwd(owd)) file.copy(mono_light_css, tmpdir) it("finds xaringan themer files with non-standard names", { candidates <- find_xaringan_themer_css() picked <- choose_xaringan_themer_css(candidates) expect_equal(candidates, "./mono_light.css") expect_equal(picked, "./mono_light.css") }) it("finds xaringan themer files in presence of other .css files", { writeLines(c( "html {", " color: red;", "}" ), "styles.css") expect_equal(find_xaringan_themer_css(), "./mono_light.css") expect_equal(read_css_vars()$text_color, "#18273F") }) it("finds all xaringan themer files", { file.copy(xaringan_css, "xaringan-themer.css") candidates <- find_xaringan_themer_css() picked <- choose_xaringan_themer_css(candidates) expect_equal(candidates, c("./mono_light.css", "./xaringan-themer.css")) expect_equal(picked, "./xaringan-themer.css") expect_equal(read_css_vars()$text_color, "#000") }) it("chooses the first from the list if ambiguous", { file.rename("xaringan-themer.css", "xaringan.css") candidates <- find_xaringan_themer_css() expect_message(picked <- choose_xaringan_themer_css(candidates)) expect_equal(candidates, c("./mono_light.css", "./xaringan.css")) expect_equal(picked, "./mono_light.css") expect_message(expect_equal(read_css_vars()$text_color, "#18273F")) }) it("throws error if no xaringan themer css files", { file.remove("xaringan.css") file.remove("mono_light.css") candidates <- find_xaringan_themer_css() expect_equal(candidates, character()) expect_error(choose_xaringan_themer_css(candidates)) }) }) test_that("css_get_root() returns null if no :root exists", { tmpfile <- tempfile("style", fileext = ".css") writeLines(c( "html {", " color: red;", "}" ), tmpfile) expect_null(css_get_root(tmpfile)) unlink(tmpfile) }) describe("css_get_padding()", { it("processes 1 element padding", { p <- css_get_padding("1em") expect_equal(p$top, "1em") expect_equal(p$right, "1em") expect_equal(p$bottom, "1em") expect_equal(p$left, "1em") }) it("processes 2 element padding", { p <- css_get_padding("1em 2em") expect_equal(p$top, "1em") expect_equal(p$right, "2em") expect_equal(p$bottom, "1em") expect_equal(p$left, "2em") }) it("processes 4 element padding", { p <- css_get_padding("1em 2em 3em 4em") expect_equal(p$top, "1em") expect_equal(p$right, "2em") expect_equal(p$bottom, "3em") expect_equal(p$left, "4em") }) it("throws an error if padding is a vector", { expect_error(css_get_padding(c("1em", "2em"))) }) it("throws an error if result is not 1, 2, 4 element", { expect_error(css_get_padding("1em 2em 3em")) expect_error(css_get_padding("1em 2em 3em 4em 5em")) }) }) ================================================ FILE: tests/testthat/test-ggplot2.R ================================================ test_that("requires_xaringanthemer_env() errors if no style function called", { expect_error( with_clean_session(function() { xaringanthemer::requires_xaringanthemer_env(NULL, FALSE) }) ) }) describe("theme_xaringan()", { it("errors if no css file or style_xaringan theme called", { expect_error( with_clean_session(function() { xaringanthemer::theme_xaringan() }) ) }) it("returns a theme using the style_xaringan colors", { theme <- with_clean_session(function() { xaringanthemer::style_xaringan( text_color = "#000001", background_color = "#000002", header_color = "#000003", text_bold_color = "#000004", text_font_family = "Damogran", text_font_google = NULL, header_font_family = "Magrathea", header_font_google = NULL ) xaringanthemer::theme_xaringan( text_font_use_google = FALSE, title_font_use_google = FALSE ) }) expect_equal(theme$text$family, "Damogran") expect_equal(theme$title$family, "Magrathea") expect_equal(theme$title$colour, "#000003") expect_equal(theme$plot.background$colour, "#000002") expect_equal(theme$plot.background$fill, "#000002") }) it("returns correct theme reading from a css file", { css <- xaringanthemer::style_xaringan( text_color = "#000001", background_color = "#000002", header_color = "#000003", text_bold_color = "#000004", text_font_family = "Damogran", text_font_google = NULL, header_font_family = "Magrathea", header_font_google = NULL, outfile = NULL ) theme <- with_clean_session(function(css) { writeLines(css, "xaringan-themer.css") xaringanthemer::theme_xaringan( text_font_use_google = FALSE, title_font_use_google = FALSE ) }, list(css = css)) expect_equal(theme$text$family, "Damogran") expect_equal(theme$title$family, "Magrathea") expect_equal(theme$title$colour, "#000003") expect_equal(theme$plot.background$colour, "#000002") expect_equal(theme$plot.background$fill, "#000002") }) it("works with 3-digit hex colors", { theme <- with_clean_session(function() { xaringanthemer::style_xaringan( text_color = "#001", background_color = "#002", header_color = "#003", text_bold_color = "#004" ) xaringanthemer::theme_xaringan( text_font_use_google = FALSE, title_font_use_google = FALSE ) }) expect_equal(theme$title$colour, "#000033") expect_equal(theme$plot.background$colour, "#000022") expect_equal(theme$plot.background$fill, "#000022") }) it("throws error for non-hex color functions", { expect_error( with_clean_session(function() { xaringanthemer::style_xaringan( text_color = "rgb(0, 0, 0)", outfile = NULL ) xaringanthemer::theme_xaringan( text_font_use_google = FALSE, title_font_use_google = FALSE ) }) ) }) it("correctly overwrites geom default values", { fonts <- with_clean_session(function() { style <- xaringanthemer::style_xaringan(outfile = NULL) g <- ggplot2::ggplot(mtcars, ggplot2::aes(x = cyl, y = disp, label = carb)) fonts <- list() plot1 <- g + ggplot2::geom_text() + xaringanthemer::theme_xaringan() fonts[[1]] <- plot1$layers[[1]]$geom$default_aes$family plot2 <- g + ggplot2::geom_text() + xaringanthemer::theme_xaringan(text_font = "Ranga", text_font_use_google = TRUE) fonts[[2]] <- plot2$layers[[1]]$geom$default_aes$family fonts }) expect_equal(fonts[[1]], "Noto Sans") expect_equal(fonts[[2]], "Ranga") }) }) describe("theme_xaringan_inverse()", { it("errors if no css file or style_xaringan theme called", { expect_error( with_clean_session(function() { xaringanthemer::theme_xaringan_inverse() }) ) }) it("returns a theme using the style_xaringan colors", { theme <- with_clean_session(function() { xaringanthemer::style_xaringan( text_color = "#000001", inverse_text_color = "#100000", background_color = "#000002", inverse_background_color = "#200000", header_color = "#000003", inverse_header_color = "#300000", text_bold_color = "#000004", text_font_family = "Damogran", text_font_google = NULL, header_font_family = "Magrathea", header_font_google = NULL ) xaringanthemer::theme_xaringan_inverse( text_font_use_google = FALSE, title_font_use_google = FALSE ) }) expect_equal(theme$text$family, "Damogran") expect_equal(theme$title$family, "Magrathea") expect_equal(theme$title$colour, "#300000") expect_equal(theme$plot.background$colour, "#200000") expect_equal(theme$plot.background$fill, "#200000") }) it("returns correct colors pulling from css file", { css <- xaringanthemer::style_xaringan( text_color = "#000001", inverse_text_color = "#100000", background_color = "#000002", inverse_background_color = "#200000", header_color = "#000003", inverse_header_color = "#300000", text_bold_color = "#000004", text_font_family = "Damogran", text_font_google = NULL, header_font_family = "Magrathea", header_font_google = NULL, outfile = NULL ) theme <- with_clean_session(function(css) { writeLines(css, "basic.css") xaringanthemer::theme_xaringan_inverse( text_font_use_google = FALSE, title_font_use_google = FALSE ) }, list(css = css)) expect_equal(theme$text$family, "Damogran") expect_equal(theme$title$family, "Magrathea") expect_equal(theme$title$colour, "#300000") expect_equal(theme$plot.background$colour, "#200000") expect_equal(theme$plot.background$fill, "#200000") }) it("works with 3-digit hex colors", { theme <- with_clean_session(function() { xaringanthemer::style_xaringan( text_color = "#001", background_color = "#002", header_color = "#003", inverse_text_color = "#100", inverse_background_color = "#200", inverse_header_color = "#300", text_bold_color = "#004" ) xaringanthemer::theme_xaringan_inverse( text_font_use_google = FALSE, title_font_use_google = FALSE ) }) expect_equal(theme$title$colour, "#330000") expect_equal(theme$plot.background$colour, "#220000") expect_equal(theme$plot.background$fill, "#220000") }) }) describe("theme_xaringan_base()", { it("accepts a regular text_font or title_font", { theme <- with_clean_session(function() { xaringanthemer::theme_xaringan_base( text_color = "#000", accent_color = "#1a2b3c", background_color = "#FFF", text_font = "sans", title_font = "serif", text_font_use_google = FALSE, title_font_use_google = FALSE ) }) expect_equal(theme$title$colour, "#1a2b3c") expect_equal(theme$title$family, "serif") expect_equal(theme$plot.background$colour, "#FFFFFF") expect_equal(theme$text$colour, "#1A1A1A") expect_equal(theme$text$family, "sans") }) }) test_that("theme_xaringan_restore_defaults() restores defaults", { res <- with_clean_session(function() { res <- list() res$nothing <- list(xaringanthemer::theme_xaringan_restore_defaults()) res$original <- list( colour = ggplot2::geom_line()$geom$default_aes$colour, fill = ggplot2::geom_bar()$geom$default_aes$fill ) old_defaults <- xaringanthemer::theme_xaringan_set_defaults( text_color = "#0088ff", background_color = "#88ff00", accent_color = "#FF8800" ) res$after_set <- list( line_colour = ggplot2::geom_line()$geom$default_aes$colour, bar_fill = ggplot2::geom_bar()$geom$default_aes$fill ) xaringanthemer::theme_xaringan_restore_defaults() res$after_restore <- list( line_colour = ggplot2::geom_line()$geom$default_aes$colour, bar_fill = ggplot2::geom_bar()$geom$default_aes$fill ) res }) expect_equal(res$nothing, list(NULL)) expect_equal(res$after_set$line_colour, "#0088ff") expect_equal(res$after_set$bar_fill, "#FF8800") expect_equal(res$after_restore$line_colour, res$original$colour) expect_equal(res$after_restore$bar_fill, res$original$fill) }) describe("theme_xaringan_get_value()", { it("errors if no css file or style_xaringan theme called", { expect_error( with_clean_session(function() { xaringanthemer::theme_xaringan_get_value("text_font_family") }) ) }) it("returns theme values", { theme <- with_clean_session(function() { xaringanthemer::style_xaringan( base_font_size = "33px", text_font_size = "23px", text_color = "#000001", inverse_text_color = "#100000", background_color = "#000002", inverse_background_color = "#200000", header_color = "#000003", inverse_header_color = "#300000", text_bold_color = "#000004", text_font_family = "Damogran", text_font_google = NULL, header_font_family = "Magrathea", header_font_google = NULL, outfile = NULL ) list( text = xaringanthemer::theme_xaringan_get_value(c("text_font_family", "text_font_is_google", "text_color", "text_bold_color")), code_font_is_google = xaringanthemer::theme_xaringan_get_value("code_font_is_google"), inverse_text_color = xaringanthemer::theme_xaringan_get_value("inverse_text_color"), background_color = xaringanthemer::theme_xaringan_get_value("background_color"), header_color = xaringanthemer::theme_xaringan_get_value("header_color"), inverse_header_color = xaringanthemer::theme_xaringan_get_value("inverse_header_color"), base_font_size = xaringanthemer:::get_base_font_size(), accent_color = xaringanthemer:::get_theme_accent_color(), accent_color_inverse = xaringanthemer:::get_theme_accent_color(inverse = TRUE) ) }) expect_equal(theme$text$text_font_family, "Damogran") expect_equal(theme$text$text_color, "#000001") expect_false(theme$text$text_font_is_google) expect_true(theme$code_font_is_google) expect_equal(theme$text$text_bold_color, "#000004") expect_equal(theme$inverse_text_color, "#100000") expect_equal(theme$background_color, "#000002") expect_equal(theme$header_color, "#000003") expect_equal(theme$inverse_header_color, "#300000") expect_equal(theme$base_font_size, 33) expect_equal(theme$accent_color, "#000003") expect_equal(theme$accent_color_inverse, "#300000") }) it("returns theme values from the css file", { expect_warning( css <- xaringanthemer::style_xaringan( base_font_size = "1em", text_color = "#000001", inverse_text_color = "#100000", background_color = "#000002", inverse_background_color = "#200000", header_color = "#000003", inverse_header_color = "#300000", text_bold_color = "#000004", text_font_family = "Damogran", text_font_google = NULL, header_font_family = "Magrathea", header_font_google = NULL, outfile = NULL ) ) theme <- with_clean_session(function(css) { writeLines(css, "xaringan-themer.css") list( text = xaringanthemer::theme_xaringan_get_value(c("text_font_family", "text_font_is_google", "text_color", "text_bold_color")), code_font_is_google = xaringanthemer::theme_xaringan_get_value("code_font_is_google"), inverse_text_color = xaringanthemer::theme_xaringan_get_value("inverse_text_color"), background_color = xaringanthemer::theme_xaringan_get_value("background_color"), header_color = xaringanthemer::theme_xaringan_get_value("header_color"), inverse_header_color = xaringanthemer::theme_xaringan_get_value("inverse_header_color"), base_font_size = xaringanthemer:::get_base_font_size(), accent_color = xaringanthemer:::get_theme_accent_color(), accent_color_inverse = xaringanthemer:::get_theme_accent_color(inverse = TRUE) ) }, list(css = css)) expect_equal(theme$text$text_font_family, "Damogran") expect_equal(theme$text$text_color, "#000001") expect_false(theme$text$text_font_is_google) expect_true(theme$code_font_is_google) expect_equal(theme$text$text_bold_color, "#000004") expect_equal(theme$inverse_text_color, "#100000") expect_equal(theme$background_color, "#000002") expect_equal(theme$header_color, "#000003") expect_equal(theme$inverse_header_color, "#300000") expect_equal(theme$base_font_size, 16) expect_equal(theme$accent_color, "#000003") expect_equal(theme$accent_color_inverse, "#300000") }) }) describe("web_to_point()", { it("is invariant when x is pt", { expect_equal(web_to_point("24pt", 11), 24) expect_equal(web_to_point("24pt", 11), 24) expect_equal(web_to_point("24pt", 11, scale = 3), 24) }) it("scales px", { expect_equal(web_to_point("24px", 10, 1), 24) expect_equal(web_to_point("24px", 10, 0.5), 12) }) it("scales r/em", { expect_equal(web_to_point("2.4em", 10, 1), 24) expect_equal(web_to_point("2.4rem", 10, 1), 24) expect_equal(web_to_point("2.4em", 10, 0.5), 12) expect_equal(web_to_point("2.4rem", 10, 0.5), 12) }) it("returns NULL if input is NULL or poorly defined", { expect_null(web_to_point(NULL)) expect_null(web_to_point("NULL", 1)) }) }) describe("get_theme_accent_color()", { it("errors if no color or default available", { expect_error( with_clean_session(function() { xaringanthemer:::get_theme_accent_color() }) ) }) }) describe("scale_xaringan_*", { scales <- with_clean_session(function() { xaringanthemer::style_xaringan( background_color = "#00FF00", inverse_background_color = "#FF00FF", header_color = "#FF0000", inverse_header_color = "#0000FF", outfile = NULL ) list( discrete = list( fill = xaringanthemer::scale_xaringan_fill_discrete(), fill_inverse = xaringanthemer::scale_xaringan_fill_discrete(inverse = TRUE), fill_reverse = xaringanthemer::scale_xaringan_fill_discrete(direction = -1), color = xaringanthemer::scale_xaringan_color_discrete(), color_inverse = xaringanthemer::scale_xaringan_color_discrete(inverse = TRUE), color_reverse = xaringanthemer::scale_xaringan_color_discrete(direction = -1), colour = xaringanthemer::scale_xaringan_colour_discrete(), colour_inverse = xaringanthemer::scale_xaringan_colour_discrete(inverse = TRUE), colour_reverse = xaringanthemer::scale_xaringan_colour_discrete(direction = -1) ), continuous = list( fill = xaringanthemer::scale_xaringan_fill_continuous(), fill_inverse = xaringanthemer::scale_xaringan_fill_continuous(inverse = TRUE), fill_reverse = xaringanthemer::scale_xaringan_fill_continuous(begin = 1, end = 0), color = xaringanthemer::scale_xaringan_color_continuous(), color_inverse = xaringanthemer::scale_xaringan_color_continuous(inverse = TRUE), color_reverse = xaringanthemer::scale_xaringan_color_continuous(begin = 1, end = 0), colour = xaringanthemer::scale_xaringan_colour_continuous(), colour_inverse = xaringanthemer::scale_xaringan_colour_continuous(inverse = TRUE), colour_reverse = xaringanthemer::scale_xaringan_colour_continuous(begin = 1, end = 0) ) ) }) it("discrete scales create ScaleDiscrete ggproto objects", { for (s in scales$discrete) { expect_s3_class(s, "ScaleDiscrete") expect_s3_class(s, "ggproto") } }) it("discrete scales use accent color as starting point", { expect_equal(scales$discrete$fill$palette(n = 1), "#FF0000") expect_equal(scales$discrete$color$palette(n = 1), "#FF0000") expect_equal(scales$discrete$colour$palette(n = 1), "#FF0000") expect_equal(scales$discrete$fill_reverse$palette(n = 1), "#FF0000") expect_equal(scales$discrete$color_reverse$palette(n = 1), "#FF0000") expect_equal(scales$discrete$colour_reverse$palette(n = 1), "#FF0000") }) it("discrete scales use inverse accent color as starting point", { expect_equal(scales$discrete$fill_inverse$palette(n = 1), "#0000FF") expect_equal(scales$discrete$color_inverse$palette(n = 1), "#0000FF") expect_equal(scales$discrete$colour_inverse$palette(n = 1), "#0000FF") }) it("continuous scales create ScaleContinuous ggproto objects", { for (s in scales$continuous) { expect_s3_class(s, "ScaleContinuous") expect_s3_class(s, "ggproto") } }) it("continuous scales use accent color as starting point", { expect_equal(scales$continuous$fill$palette(x = 1), "#FF0000") expect_equal(scales$continuous$color$palette(x = 1), "#FF0000") expect_equal(scales$continuous$colour$palette(x = 1), "#FF0000") expect_equal(scales$continuous$fill_reverse$palette(x = 1), "#FF0000") expect_equal(scales$continuous$color_reverse$palette(x = 1), "#FF0000") expect_equal(scales$continuous$colour_reverse$palette(x = 1), "#FF0000") }) it("continuous scales use inverse accent color as starting point", { expect_equal(scales$continuous$fill_inverse$palette(x = 1), "#0000FF") expect_equal(scales$continuous$color_inverse$palette(x = 1), "#0000FF") expect_equal(scales$continuous$colour_inverse$palette(x = 1), "#0000FF") }) it("continuous scales rescale low to high when begin = 0, end = 1", { expect_equal(scales$continuous$fill$rescaler(1:3), 0:2 / 2) expect_equal(scales$continuous$color$rescaler(1:3), 0:2 / 2) expect_equal(scales$continuous$colour$rescaler(1:3), 0:2 / 2) }) it("continuous scales rescale high to low when begin = 1, end = 0", { expect_equal(scales$continuous$fill_reverse$rescaler(1:3), 2:0 / 2) expect_equal(scales$continuous$color_reverse$rescaler(1:3), 2:0 / 2) expect_equal(scales$continuous$colour_reverse$rescaler(1:3), 2:0 / 2) }) }) test_that("register_font() returns the name of the font family if {showtext} is missing", { text_font_family <- xaringanthemer_font_default("text_font_family") # Pretend like {showtext} is missing mockery::stub(register_font, "requires_package", function(pkg, ...) pkg != "showtext") family_showtext_missing <- register_font(text_font_family, google = TRUE) expect_equal(family_showtext_missing, text_font_family) }) test_that("register_font() returns the name of the font family if {sysfonts} is missing", { skip_if_not_installed("showtext") text_font_family <- xaringanthemer_font_default("text_font_family") # Pretend like {sysfonts} is missing mockery::stub(register_font, "requires_package", function(pkg, ...) pkg != "sysfonts") family_sysfonts_missing <- register_font(text_font_family, google = TRUE) expect_equal(family_sysfonts_missing, text_font_family) }) ================================================ FILE: tests/testthat/test-helpers.R ================================================ test_that("element_description", { text_in <- c("multiple", NA, "", ".remark-slide-content", "h1", "pre, code") text_out <- c( "Used in multiple CSS rules.", "", "", "Modifies the `.remark-slide-content` class.", "Modifies the `h1` element.", "Modifies the `pre, code` elements." ) expect_equal(element_description(text_in), text_out) }) ================================================ FILE: tests/testthat/test-style_extra_css.R ================================================ # test_that() # style_extra_css() ------------------------------------------------------- describe("style_extra_css", { css <- list(body = list(color = "#123")) it("returns text if outfile is NULL", { expect_equal( style_extra_css(css, NULL), "\n\n/* Extra CSS */\nbody {\n color: #123;\n}" ) expect_equal( style_extra_css(css, NULL, heading = NULL), "\nbody {\n color: #123;\n}" ) expect_equal( style_extra_css(css, NULL, append = FALSE, heading = NULL), "body {\n color: #123;\n}" ) expect_equal( style_extra_css(css, NULL, append = FALSE, heading = "TEST TEST"), "/* TEST TEST */\nbody {\n color: #123;\n}" ) }) tmpfile <- tempfile(fileext = ".css") first <- style_extra_css( css = list(.first = list(color = "#123")), outfile = tmpfile, append = FALSE, heading = "First CSS" ) first_exp <- "/* First CSS */\n.first {\n color: #123;\n}" it("writes text to the outfile", { expect_equal(first, first_exp) expect_equal( readLines(tmpfile, warn = FALSE), strsplit(first_exp, "\n")[[1]] ) }) second <- style_extra_css( css = list(.second = list(color = "#321")), outfile = tmpfile, append = TRUE, heading = "Second CSS" ) second_exp <- "\n\n/* Second CSS */\n.second {\n color: #321;\n}" it("appends to existing outfile", { expect_equal(second, second_exp) expect_equal( readLines(tmpfile, warn = FALSE), strsplit(paste0(first_exp, "\n", second_exp), "\n")[[1]] ) }) third <- style_extra_css( css = list(.third = list(color = "#333")), outfile = tmpfile, append = FALSE, heading = "Third CSS" ) third_exp <- "/* Third CSS */\n.third {\n color: #333;\n}" it("over writes text in the outfile if append=FALSE", { expect_equal(third, third_exp) expect_equal( readLines(tmpfile, warn = FALSE), strsplit(third_exp, "\n")[[1]] ) }) it("only adds prepends `heading` once", { css <- list(b = list(color = "red"), i = list(color = "blue")) out <- style_extra_css(css, outfile = NULL, heading = "Extra CSS") expect_equal(length(out), 1L) expect_equal(sum(grepl("Extra CSS", out)), 1L) }) }) # list2css() -------------------------------------------------------------- describe("list2css()", { it("converts lists to css", { css <- list( ".remark-slide" = list( "color" = "#FFF", "font-size" = "30px" ) ) expected <- ".remark-slide { color: #FFF; font-size: 30px; }" expect_equal(list2css(css), expected) css[[".new-class"]] <- list("background-color" = "#000") expected <- c(expected, ".new-class {\n background-color: #000;\n}") expect_equal(list2css(css), expected) }) it("errors if css list is not named", { css <- list(list( "color" = "#FFF", "font-size" = "30px" )) expect_error(list2css(css)) }) it("errors if css list has unnamed elements", { css <- list( list( "color" = "#FFF", "font-size" = "30px" ), ".test" = list(color = "red") ) expect_error(list2css(css)) }) it("errors if css list has unnamed properties", { css <- list( ".class" = list( color = "#FFF", "font-size" = "30px" ), ".test" = list("red") ) expect_error(list2css(css)) css <- list( ".class" = list( "#FFF", "font-size" = "30px" ), ".test" = list("red") ) expect_error(list2css(css)) }) it("errors if not list within list", { css <- list( ".class" = list( list(color = "red"), "font-size" = "30px" ), ".test" = list("red") ) expect_error(list2css(css)) }) it("errors if css contains unnamed elements", { expect_error(list2css(list(list(color = "#bad")))) expect_error( list2css(list(.a = list(color = "#bad"), list(`background-color` = "#bad"))), "elements.+must be named.+2 is" ) expect_error( list2css(list(.a = list(color = "#bad"), list(`background-color` = "#bad"), list(`border-color` = "#bad"))), "elements.+must be named.+2, 3 are" ) expect_error( list2css(list(body = list("#bad"))), "elements.+must be named.+body.+has" ) expect_error( list2css(list(body = list("#bad"), thing = list("#bad"))), "elements.+must be named.+body.+thing.+have" ) }) it("is okay for multiple entries with the same name", { expect_equal( list2css(list("a" = list(color = "red"), a = list(color = "blue"))), c("a {\n color: red;\n}", "a {\n color: blue;\n}") ) expect_equal( list2css(list("a" = list(color = "red", color = "blue"))), c("a {\n color: red;\n color: blue;\n}") ) }) }) # list2fonts() ------------------------------------------------------------ import <- function(x) paste0("@import url(", x, ");") describe("list2fonts()", { lato_url <- "https://fonts.googleapis.com/css?family=Lato&display=swap" worksans_url <- "https://fonts.googleapis.com/css?family=Work+Sans&display=swap" it("handles a list or c() of font urls", { expect_equal( list2fonts(list(lato_url, worksans_url)), import(c(lato_url, worksans_url)) ) expect_equal(list2fonts(c(lato_url, lato_url)), rep(import(lato_url), 2)) }) it("handles single character font name", { expect_equal(list2fonts(lato_url), import(lato_url)) }) it("handles list of google fonts", { expect_equal( list2fonts(list(google_font("Lato"), google_font("Work Sans"))), import(c(lato_url, worksans_url)) ) }) it("handles mix of google_font() and bare string", { expect_equal( list2fonts(list(google_font("Lato"), worksans_url)), import(c(lato_url, worksans_url)) ) }) it("handles bare google_font()", { expect_equal( list2fonts(google_font("Lato")), import(lato_url) ) }) it("throws an error when c() used to combine string and google_font()", { expect_error( list2fonts(c(lato_url, google_font("Lato"), google_font("Work Sans"))), "Multiple fonts" ) expect_error( list2fonts(c(google_font("Lato"), google_font("Work Sans"))), "Multiple fonts" ) }) }) ================================================ FILE: tests/testthat/test-style_xaringan.R ================================================ test_that("style_xaringan() writes to specified outfile", { tmpfile <- tempfile(fileext = ".css") expect_equal(style_xaringan(outfile = tmpfile), tmpfile) expect_true(file.exists(tmpfile)) expect_true(grepl("xaringanthemer", readLines(tmpfile)[3])) }) test_that("style_xaringan() warns if base_font_size is not absolute", { tmpfile <- tempfile(fileext = ".css") expect_warning( style_xaringan(outfile = tmpfile, base_font_size = "1em"), "absolute units" ) }) ================================================ FILE: tests/testthat/test-themes.R ================================================ test_theme_file <- function(theme = "duo", theme_file = paste0(theme, ".css"), ...) { local_edition(2) on.exit(local_edition(3)) theme_fun <- switch( theme, "duo" = style_duo, "duo_accent" = style_duo_accent, "duo_accent_inverse" = style_duo_accent_inverse, "mono_accent" = style_mono_accent, "mono_accent_inverse" = style_mono_accent_inverse, "mono_dark" = style_mono_dark, "mono_light" = style_mono_light, "solarized_dark" = style_solarized_dark, "solarized_light" = style_solarized_light, style_xaringan ) tmpfile <- tempfile() on.exit(unlink(tmpfile), add = TRUE) theme_fun(outfile = tmpfile, ..., text_font_google = google_font("Noto Serif")) theme_css <- readLines(tmpfile) # Mask package version in test files theme_css <- sub("( \\* Version: )[\\d.-]+", "\\1a.b.c.d.eeee", theme_css, perl = TRUE) theme_css <- paste(theme_css, collapse = "\n") expect_known_output(cat(theme_css), test_path("css", theme_file)) } test_that("style_duo()", { test_theme_file("duo") }) test_that("style_duo_accent()", { test_theme_file("duo_accent") }) test_that("style_duo_accent_inverse()", { test_theme_file("duo_accent_inverse") }) test_that("style_mono_accent()", { test_theme_file("mono_accent") }) test_that("style_mono_accent_inverse()", { test_theme_file("mono_accent_inverse") }) test_that("style_mono_dark()", { test_theme_file("mono_dark") }) test_that("style_mono_light()", { test_theme_file("mono_light") }) test_that("style_solarized_dark()", { test_theme_file("solarized_dark") }) test_that("style_solarized_light()", { test_theme_file("solarized_light") }) test_that("google fonts in theme", { test_theme_file( "google_fonts", header_font_google = google_font("IBM Plex Serif", "700"), code_font_google = google_font("IBM Plex Mono") ) }) test_that("header_background_auto = TRUE", { test_theme_file("duo", "duo-header_bg.css", header_background_auto = TRUE) test_theme_file("mono_light", "mono_light-header_bg.css", header_background_auto = TRUE) test_theme_file("solarized_dark", "solarized_dark-header_bg.css", header_background_auto = TRUE) }) test_that("style colors are added to themes", { test_theme_file("xaringan", colors = c('light-blue' = "#bad4ed")) }) test_that("setting google font overrides individual font", { theme_vars <- with_clean_session(function() { xf <- xaringanthemer::style_xaringan( text_font_family = "Damogran", header_font_family = "Magrathea", code_font_google = xaringanthemer::google_font("IBM Plex Mono") ) xaringanthemer:::read_css_vars(xf) }) expect_equal(theme_vars$text_font_family, "Damogran") expect_false(theme_vars$text_font_is_google) expect_equal(theme_vars$header_font_family, "Magrathea") expect_false(theme_vars$header_font_is_google) expect_equal(theme_vars$code_font_family, "'IBM Plex Mono'") expect_true(theme_vars$code_font_is_google) }) test_that("default fonts are correctly identified as google font", { theme_vars <- with_clean_session(function() { xf <- xaringanthemer::style_xaringan() xaringanthemer:::read_css_vars(xf) }) expect_equal(theme_vars$text_font_family, quote_elements_w_spaces(xaringanthemer_font_default("text_font_family"))) expect_true(theme_vars$text_font_is_google) expect_equal(theme_vars$header_font_family, quote_elements_w_spaces(xaringanthemer_font_default("header_font_family"))) expect_true(theme_vars$header_font_is_google) }) test_that("NULL output returns CSS as text", { expect_false( with_clean_session(function() { xaringanthemer::style_xaringan(outfile = NULL) file.exists("xaringan-themer.css") }) ) xt <- with_clean_session(function() { xaringanthemer::style_xaringan(outfile = NULL) }) expect_type(xt, "character") expect_true(any(grepl("generated by xaringanthemer", xt))) }) test_that("style_xaringan() warns about non-hex colors used by theme_xaringan()", { expect_error( with_clean_session(function() { options(warn = 2) xaringanthemer::style_xaringan(text_color = "rgb(100, 100, 100)", background_color = "white", outfile = NULL) }), regexp = "Colors.+used by.+theme_xaringan" ) }) ================================================ FILE: tests/testthat/test-utils.R ================================================ test_that("printing google_font works", { expect_snapshot( google_font("Josefin Sans", "400", "400i", "600i", "700") ) }) test_that("requires_package()", { expect_true(requires_package("purrr")) expect_error(requires_package("notapackage", "myFunction"), "myFunction") expect_warning(expect_false(requires_package("notapackage", required = FALSE))) }) ================================================ FILE: tests/testthat/test-xaringanthemer-deprecated.R ================================================ test_that("deprecation warnings", { expect_warning(write_xaringan_theme(outfile = NULL)) expect_warning(write_extra_css(list(.test = list(prop = 'value')), outfile = NULL)) expect_warning(mono_light(outfile = NULL)) expect_warning(mono_dark(outfile = NULL)) expect_warning(mono_accent(outfile = NULL)) expect_warning(mono_accent_inverse(outfile = NULL)) expect_warning(duo(outfile = NULL)) expect_warning(duo_accent(outfile = NULL)) expect_warning(duo_accent_inverse(outfile = NULL)) expect_warning(solarized_light(outfile = NULL)) expect_warning(solarized_dark(outfile = NULL)) }) ================================================ FILE: tests/testthat.R ================================================ library(testthat) library(xaringanthemer) test_check("xaringanthemer") ================================================ FILE: vignettes/.gitignore ================================================ *.html *.R /.quarto/ ================================================ FILE: vignettes/fonts.Rmd ================================================ --- title: Fonts --- [adding-custom-css]: xaringanthemer.html#adding-custom-css ```{r, results='asis', echo=FALSE} tvv <- xaringanthemer:::template_variables$variable ``` ```{r child="../man/fragments/_fonts.Rmd"} ``` ================================================ FILE: vignettes/ggplot2-themes.Rmd ================================================ --- title: "ggplot2 Themes" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{ggplot2 Themes} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, warning = FALSE, comment = "#>", fig.width = 6, fig.height = 4 ) ``` ```{css echo=FALSE} img { max-width: 100%; border: none; } ``` **xaringanthemer** provides two [ggplot2] themes for your [xaringan] slides to help your data visualizations blend seamlessly into your slides. Use `theme_xaringan()` to create plots that match your primary slide style or `theme_xaringan_inverse()` to match the style of your inverse slides. Examples slides with ggplot2 plots that match the xaringanthemer theme ### Key Features - The ggplot2 themes [uses the colors and themes](#setup-your-theme) from the **xaringanthemer** style functions, if you set your theme inside your slides. Otherwise, it [draws from the `xaringan-themer.css` file](#using-xaringan-themer-css). - The themes [pick appropriate colors](#colors) for titles, grid lines, and axis text, and also sets the default colors of geoms like `ggplot2::geom_point()` and `ggplot2::geom_text()`. There are also monotone [color and fill scales](#scale-xaringan) based around the primary accent color used in your xaringan theme. - If you use Google Fonts in your slides, the ggplot2 themes use the showtext package to [automatically match the title and axis text fonts](#fonts) of your plots to the heading and text fonts in your xaringan theme. - I've done my best to set up everything so that _it just works_, but sometimes the showtext package adds a bit of complication to the routine data visualization workflow. At the end of this vignette I include [a few tips](#tips) for working with showtext. ## Setup Your Theme `theme_xaringan()` is designed to automatically use the fonts and colors you used for your slides' style theme. Here I'm going to use a moderately customized color theme based on `style_mono_accent()`, that results in the xaringan theme previewed in the slides above. I've also picked out a few fonts from [Google Fonts][google-fonts] that I would probably never use in a real presentation, but they're flashy enough to make it easy to see that we're not using the standard default fonts. ````markdown ```{r xaringan-themer, include=FALSE, warning=FALSE}`r ''` library(xaringanthemer) style_mono_accent( base_color = "#DC322F", # bright red inverse_background_color = "#002B36", # dark dark blue inverse_header_color = "#31b09e", # light aqua green inverse_text_color = "#FFFFFF", # white title_slide_background_color = "var(--base)", text_font_google = google_font("Kelly Slab"), header_font_google = google_font("Oleo Script") ) ``` ```` ```{r setup, include=FALSE} library(xaringanthemer) style_mono_accent( base_color = "#DC322F", inverse_background_color = "#002B36", inverse_header_color = "#31b09e", inverse_text_color = "#FFFFFF", title_slide_background_color = "var(--base)", text_font_google = google_font("Kelly Slab"), header_font_google = google_font("Oleo Script"), outfile = NULL ) ``` If you use a hidden chunk like this one inside your slides' R Markdown source file, `theme_xaringan()` will know which colors and fonts you've picked. Adding `theme_xaringan()` to a ggplot, like this demonstration plot using the `mpg` dataset from ggplot2, changes the colors and fonts of your plot theme. ```{r ggplot2-demo-1, out.width = "48%", fig.show="hide"} library(ggplot2) g_base <- ggplot(mpg) + aes(hwy, cty) + geom_point() + labs(x = "Highway MPG", y = "City MPG", title = "Fuel Efficiency") # Basic plot with default theme g_base ``` ```{r ggplot2-demo-2, fig.show="hide"} # Fancy slide-matching themed plot g_base + theme_xaringan() ``` With `theme_xaringan()` the fonts and colors match the slide theme. The default colors of points (like other geometries) has been changed as well to match the slide colors. To restore the previous default colors of ggplot2 geoms, call ```{r eval=FALSE} theme_xaringan_restore_defaults() ``` Add `theme_xaringan_inverse()` to automatically create a plot that matches the inverse slide style. ```{r ggplot2-demo-inverse, fig.show="hide"} # theme_xaringan() on the left, theme_xaringan_inverse() on the right g_base + theme_xaringan_inverse() ``` ## Using `theme_xaringan()` without calling a style function {#using-xaringan-themer-css} Once you've set up your custom xaringan theme, you might want to use the theme's CSS file for new presentations instead of rebuilding your theme with every new slide deck. In these cases, `theme_xaringan()` will look for a CSS file written by **xaringanthemer** in your slides' directory or in a sub-folder under the same directory that it can use to determine the colors and fonts used in your slides. If you happen to have multiple slide themes written by **xaringanthemer** in the same directory, the one named `xaringan-themer.css` will be used. If xaringanthemer picks the wrong file, you can use the `css_file` in `theme_xaringan()` to specify exactly which CSS file to use. ```{r eval=FALSE} theme_xaringan(css_file = "my-slide-style.css") ``` Note that you can use `theme_xaringan()` anywhere you want, not just in xaringan slides! (For example, `theme_xaringan()` is working great in these vignettes!) This means that you can use your plot theme in reports and websites while maintaining a consistent look and feel or brand. Finally, you don't even need a xaringanthemer CSS file. You can specify the key ingredients for the theme as arguments to `theme_xaringan()`, namely text, background, and accent colors as well as text and title fonts. The R chunk below replicated the demonstrated theme, but doesn't require a slide style to be set or stored in a CSS file. ```{r eval=FALSE} theme_xaringan( text_color = "#3D3E38", background_color = "#FFFFFF", accent_color = "#DC322F", text_font = "Kelly Slab", text_font_use_google = TRUE, title_font = "Oleo Script", title_font_use_google = TRUE ) ``` ## Colors As demonstrated above, `theme_xaringan()` and `theme_xaringan_inverse()` modify the default colors and fonts of geometries. This means that `geom_point()`, `geom_bar()`, `geom_text()` and other geoms used in your plots will reasonably match your slide themes with no extra work. ```{r demo-geom-defaults, fig.width = 10} g_diamonds <- ggplot(diamonds, aes(x = cut)) + geom_bar() + labs(x = NULL, y = NULL, title = "Diamond Cut Quality") + ylim(0, 25000) g_diamonds + theme_xaringan() ``` Whenever `theme_xaringan()` or `theme_xaringan_inverse()` are called, the default values of many of ggplot2 geoms are set by default. You can opt out of this by setting `set_ggplot_defaults = FALSE` when using either theme. You can also restore the geom aesthetic defaults to their original values before the first time `theme_xaringan()` or `theme_xaringan_inverse()` were used by running ```{r eval=FALSE} theme_xaringan_restore_defaults() ``` ### Custom Color and Fill Scales {#scale-xaringan} xaringanthemer includes monotone color and fill scales to match your ggplot2 theme. The scale functions all follow the naming pattern `scale_xaringan__()`, where `` is replaced with either `color` or `fill` and `` is one of `discrete` or `continuous`. These scales use `colorspace::sequential_hcl()` to create a sequential, monotone color scale based on the primary accent color in your slides. Color scales matching the inverse slides are possible by setting the argument `inverse = TRUE`. ```{r scale-xaringan, fig.width = 9, fig.height = 5, out.width="48%", fig.show="hold", echo = TRUE} ggplot(diamonds, aes(x = cut)) + geom_bar(aes(fill = after_stat(count)), show.legend = FALSE) + labs(x = NULL, y = "Count", title = "Diamond Cut Quality") + theme_xaringan() + scale_xaringan_fill_continuous() ggplot(mpg, aes(x = hwy, y = cty)) + geom_count(aes(color = after_stat(n)), show.legend = FALSE) + labs(x = "Highway MPG", y = "City MPG", title = "Fuel Efficiency") + theme_xaringan_inverse() + scale_xaringan_color_continuous(breaks = seq(3, 12, 2), inverse = TRUE, begin = 1, end = 0) ``` In general, these color scales aren't great at representing the underlying data. In both examples above, the color and fill scales duplicate information displayed via other aesthetics (the height of the bar or the size of the point). I recommend using these scales primarily for style, although the scales can be more or less effective depending on your color scheme. The scales come with a few more options: - Choose a different primary color using the `color` argument. - Use the inverse color slide theme color with `inverse = TRUE` (only applies when `color` is not supplied). - Invert the direction of the discrete scales with `direction = -1`. - Control the range of the continuous color scale used with `begin` and `end`. You can also invert the direction of the continuous color scale by setting `begin = 1` and `end = 0`. ## Fonts ### Automatically match slide and plot fonts xaringanthemer uses the [showtext] and [sysfonts] packages by Yixuan Qiu to automatically download and register [Google Fonts][google-fonts] for use with your ggplot2 plots. In your slide theme, use the `_font_google` argument with the `google_font("")` helper (or the default xaringanthemer fonts) and `theme_xaringan()` will handle the rest. In our demo theme, we used `style_mono_accent()` with - `text_font_google = google_font("Kelley Slab")` and - `header_font_google = google_font("Oleo Script")`. ```{r text demo, fig.width = 10} g_diamonds_with_text <- g_diamonds + geom_text(aes(y = after_stat(count), label = format(after_stat(count), big.mark = ",")), vjust = -0.30, size = 8, stat = "count") + labs(x = "Cut", y = "Count") g_diamonds_with_text + theme_xaringan() ``` `theme_xaringan()` applies the header font to the plot and axis titles and the text font to the axis ticks labels and any text geoms or annotations. ### Manually specify plot fonts You can also specify specific fonts for your plot theme. Both `text_font` and `title_font` in `theme_xaringan()` and `theme_xaringan_inverse()` accept `google_font()`s directly. ```{r text-demo-2, fig.width = 10} g_diamonds_with_text + theme_xaringan( text_font = google_font("Ranga"), title_font = google_font("Holtwood One SC") ) ``` ### Using fonts not in Google Fonts If you want to use a font that isn't in the Google Fonts collection, you need to manually register the font with sysfonts so that it can be used in your plots. I found a nice open source font called **Glacial Indifference** by Alfredo Marco Pradil available at [fontlibrary.org](https://fontlibrary.org). In my theme style function, I would use ``` style_mono_accent( text_font_family = "GlacialIndifferenceRegular", text_font_url = "https://fontlibrary.org/face/glacial-indifference" ) ``` but sysfonts won't know where to find the TTF font files for this font. To register the font with sysfonts, we use `sysfonts::font_add()`, but first we need to download the font file — the `sysfonts::font_add()` function requires the font file to be local. By inspecting the CSS file at the link I used in `text_font_url`, I found a direct URL for the `.ttf` files for _GlacialIndifferenceRegular_. I've included _Glacial Indifference_ in the xaringanthemer package. ```{r sysfonts-custom-font, fig.width = 10} # Path to the local custom font file font_temp <- system.file( "fonts/GlacialIndifferenceRegular.ttf", package = "xaringanthemer" ) # Register the font with sysfonts/showtext sysfonts::font_add(family = "GlacialIndifferenceRegular", regular = font_temp) # Now it's available for use! g_diamonds_with_text + theme_xaringan( text_font = "GlacialIndifferenceRegular", title_font = "GlacialIndifferenceRegular" ) ``` ## Tips for using the showtext package {#tips} Working with fonts is notoriously frustrating, but [showtext] and [sysfonts] do a great job ensuring that Google Fonts and custom fonts work on all platforms. As you've seen in the examples above, the process is mostly seamless, but there are a few caveats and places where the methods used by these packages may interrupt a typical ggplot2 workflow. ### R Markdown To use the showtext package in R Markdown, knitr requires that the `fig.showtext` chunk option be set to `TRUE`, either in the chunk producing the figure or globally in the document. xaringanthemer tries to set this chunk option for you, but in some circumstances it's possible to call `theme_xaringan()` in a way that xaringanthemer can't set this option for you. When this happens, xaringanthemer will produce an error: ``` Error in verify_fig_showtext(fn) : To use theme_xaringan_base() with knitr, you need to set the chunk option `fig.showtext = TRUE` for this chunk. Or you can set this option globally with `knitr::opts_chunk$set(fig.showtext = TRUE)`. ``` If you find yourself facing this error, follow the instructions and choose one of the two suggestions: 1. Add `fig.showtext = TRUE` to the chunk producing the figure 2. Or set the option globally in your `setup` chunk with `knitr::opts_chunk$set(fig.showtext = TRUE)`. ### MacOS On MacOS, you'll need to have `xquartz` installed for `sysfonts` to work properly. If you use [homebrew](https://brew.sh/), you can install `xquartz` with ```bash brew cask install xquartz ``` ### In RStudio showtext and RStudio's graphic device don't always work well together. Depending on your version of RStudio, if you try to preview plots that use `theme_xaringan()`, the fonts in the preview will still be the default sans font or you may not see a plot at all. To work around this, open a new `quartz()` (MacOS) or `x11()` (Windows/Unix) plot device. The plots will then render in a separate window. I usually create a `quartz()` device with a similar size ratio to my slides. ```{r eval=FALSE} ## On Windows # x11(width = 16 * 2/3, height = 9 * 2/3) ## On MacOS quartz(width = 16 * 2/3, height = 9 * 2/3) ## run plot code to preview in separate window dev.off() # call when done to close the device ``` [ggplot2]: https://ggplot2.tidyverse.org [xaringan]: https://github.com/yihui/xaringan [google-fonts]: https://fonts.google.com [showtext]: https://github.com/yixuan/showtext [sysfonts]: https://github.com/yixuan/sysfonts ================================================ FILE: vignettes/template-variables.Rmd ================================================ --- title: "Template Variables" output: rmarkdown::html_vignette: default vignette: > %\VignetteIndexEntry{Template Variables} %\VignetteEncoding{UTF-8} %\VignetteEngine{knitr::rmarkdown} --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` The following table shows the template variables, their default values in the standard `xaringanthemer` theme, the primary element to which the property is applied, and a brief description of the template variable. For example, `background_color` by default sets the `background-color` CSS property of the `.remark-slide-content` class to `#FFF`. Use this table to find the template variable you would like to modify. You can also use this table to find the CSS class or element associated with a particular template item. Note that some theme functions, like `style_mono_accent()`, have additional parameters and a specific set of default values unique to the theme. However, with any theme function you can override the theme's defaults by directly setting any of the arguments listed below when calling the theme function. To be concrete, `style_mono_accent()` has three additional arguments: `base_color` (the accent color), `white_color`, and `black_color`. In this theme, the background slide color defaults to `white_color`, but you can choose a different slide background color by setting `background_color`, for example `background_color = "#EAEAEA"`. ```{r table, results = "asis", echo=FALSE} tv <- xaringanthemer:::template_variables tv$variable <- glue::glue_data(tv, "`{variable}`") tv[!is.na(tv$css_variable), "css_variable"] <- glue::glue("`{tv$css_variable[!is.na(tv$css_variable)]}`") tv[is.na(tv$css_variable), "css_variable"] <- "" tv[is.na(tv$css_property), "css_property"] <- "" tv$default <- gsub("[{}]", "", tv$default) tv <- tv[, c( "variable", "description", "element", "css_property", "default", "css_variable" )] knitr::kable( tv, col.names = c("Variable", "Description", "Element", "CSS Property", "Default", "CSS Variable") ) ``` ================================================ FILE: vignettes/themes.Rmd ================================================ --- title: Themes --- ```{r include=FALSE} library(xaringanthemer) knitr::opts_chunk$set(results = "asis", echo=FALSE) ``` ```{r child="../man/fragments/_themes.Rmd"} ``` ## Colors ```{r child="../man/fragments/_colors.Rmd"} ``` ================================================ FILE: vignettes/xaringanthemer.Rmd ================================================ --- title: "Xaringan CSS Theme Generator" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Overview of xaringanthemer} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, results = "asis", echo = FALSE, comment = "#>", out.width = "100%" ) library(xaringanthemer) ``` ```{css echo=FALSE} img { max-width: 100%; } ``` [xaringan]: https://github.com/yihui/xaringan [remarkjs]: https://github.com/gnab/remark Jump to: [Quick Intro](#quick-intro), [Themes](#themes), [Theme Settings](#theme-settings), [Fonts](#fonts), [Colors](#colors), [Adding Custom CSS](#adding-custom-css) ## Quick Intro [theme-functions]: #themes [theme-settings]: #theme-settings [template-variables]: template-variables.html ```{r child="../man/fragments/_quick-intro.Rmd"} ``` ## Themes ```{r child="../man/fragments/_themes.Rmd"} ``` ## Theme Settings The theme functions listed above are just wrappers around the central function of this package, `style_xaringan()`. If you want to start from the default **xaringan** theme and make a few modifications, start there. All of the theme template variables are repeated in each of the theme functions (instead of relying on `...`) so that you can use autocompletion to find and change the defaults for any theme function. To override the default value of any theme functions, set the appropriate argument in the theme function. A table of all template variables is included in [`vignette("template-variables", "xaringanthemer")`](template-variables.html). As an example, try loading `xaringanthemer`, type out `style_duo_theme(` and then press Tab to see all of the theme options. All of the theme options are named so that you first think of the element you want to change, then the property of that element. Here are some of the `text_` theme options: ```{r, results='asis', echo=FALSE} tvv <- xaringanthemer:::template_variables$variable cat(paste0("- `", tvv[grepl("^text_", tvv)][1:5], "`"), sep = "\n") cat("- *and more ...*") ``` And here are the title slide theme options: ```{r results='asis', echo=FALSE} cat(paste0("- `", tvv[grepl("^title_slide_", tvv)], "`"), sep = "\n") ``` ## Fonts [adding-custom-css]: #adding-custom-css ```{r child="../man/fragments/_fonts.Rmd"} ``` ## Colors ```{r child="../man/fragments/_colors.Rmd"} ``` ## Adding Custom CSS You can also add custom CSS classes using the `extra_css` argument in the theme functions. This argument takes a named list of CSS definitions each containing a named list of CSS property-value pairs. ```r extra_css <- list( ".small" = list("font-size" = "90%"), ".full-width" = list( display = "flex", width = "100%", flex = "1 1 auto" ) ) ``` If you would rather keep your additional css definitions in a separate file, you can call `style_extra_css()` separately. Just be sure to include your new CSS file in the list of applied files in your YAML header. ```r style_extra_css(css = extra_css, outfile = "custom.css") ``` ```{r results='asis', echo=FALSE} extra_css <- list( ".small" = list("font-size" = "90%"), ".full-width" = list( display = "flex", width = "100%", flex = "1 1 auto" ) ) cat( "\n```css", "/* Extra CSS */", xaringanthemer:::list2css(extra_css), "```", sep = "\n" ) ``` This is most helpful when wanting to define helper classes to work with the [remark.js][remarkjs] `.class[]` syntax. Using the above example, we could add slide text `.small[in smaller font size]`. ```{r child="../man/fragments/_thanks.Rmd"} ``` ================================================ FILE: xaringanthemer.Rproj ================================================ Version: 1.0 RestoreWorkspace: Default SaveWorkspace: Default AlwaysSaveHistory: Default EnableCodeIndexing: Yes UseSpacesForTab: Yes NumSpacesForTab: 2 Encoding: UTF-8 RnwWeave: Sweave LaTeX: XeLaTeX AutoAppendNewline: Yes StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source PackageRoxygenize: rd,collate,namespace