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

feat: Add header_font_family_fallback

Fixes #41
tags/v0.3.3
Garrick Aden-Buie 5 лет назад
Родитель
Сommit
2c068446e6
38 измененных файлов: 163 добавлений и 15 удалений
  1. +2
    -0
      NEWS.md
  2. +6
    -0
      R/style_duo.R
  3. +6
    -0
      R/style_duo_accent.R
  4. +6
    -0
      R/style_duo_accent_inverse.R
  5. +6
    -0
      R/style_mono_accent.R
  6. +6
    -0
      R/style_mono_accent_inverse.R
  7. +6
    -0
      R/style_mono_dark.R
  8. +6
    -0
      R/style_mono_light.R
  9. +6
    -0
      R/style_solarized_dark.R
  10. +6
    -0
      R/style_solarized_light.R
  11. +6
    -0
      R/style_xaringan.R
  12. Двоичные данные
      R/sysdata.rda
  13. +1
    -0
      data-raw/theme_template_variables.R
  14. +2
    -1
      inst/resources/template.css
  15. +7
    -0
      man/style_duo.Rd
  16. +7
    -0
      man/style_duo_accent.Rd
  17. +7
    -0
      man/style_duo_accent_inverse.Rd
  18. +7
    -0
      man/style_mono_accent.Rd
  19. +7
    -0
      man/style_mono_accent_inverse.Rd
  20. +7
    -0
      man/style_mono_dark.Rd
  21. +7
    -0
      man/style_mono_light.Rd
  22. +7
    -0
      man/style_solarized_dark.Rd
  23. +7
    -0
      man/style_solarized_light.Rd
  24. +7
    -0
      man/style_xaringan.Rd
  25. +2
    -1
      tests/testthat/css/duo-header_bg.css
  26. +2
    -1
      tests/testthat/css/duo.css
  27. +2
    -1
      tests/testthat/css/duo_accent.css
  28. +2
    -1
      tests/testthat/css/duo_accent_inverse.css
  29. +2
    -1
      tests/testthat/css/google_fonts.css
  30. +2
    -1
      tests/testthat/css/mono_accent.css
  31. +2
    -1
      tests/testthat/css/mono_accent_inverse.css
  32. +2
    -1
      tests/testthat/css/mono_dark.css
  33. +2
    -1
      tests/testthat/css/mono_light-header_bg.css
  34. +2
    -1
      tests/testthat/css/mono_light.css
  35. +2
    -1
      tests/testthat/css/solarized_dark-header_bg.css
  36. +2
    -1
      tests/testthat/css/solarized_dark.css
  37. +2
    -1
      tests/testthat/css/solarized_light.css
  38. +2
    -1
      tests/testthat/css/xaringan.css

+ 2
- 0
NEWS.md Просмотреть файл

@@ -4,6 +4,8 @@

- .pull-right[] now clears floats just for its immediate sibling

- Add `header_font_family_fallback` to control fallback fonts for headings (thanks @mattwarkentin, #41)

# xaringanthemer 0.3.0

* Adds `theme_xaringan()`, a ggplot2 theme that automatically uses the colors

+ 6
- 0
R/style_duo.R Просмотреть файл

@@ -236,6 +236,11 @@
#' `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.
@@ -321,6 +326,7 @@ style_duo <- function(
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"),

+ 6
- 0
R/style_duo_accent.R Просмотреть файл

@@ -248,6 +248,11 @@
#' `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.
@@ -335,6 +340,7 @@ style_duo_accent <- function(
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"),

+ 6
- 0
R/style_duo_accent_inverse.R Просмотреть файл

@@ -249,6 +249,11 @@
#' `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.
@@ -336,6 +341,7 @@ style_duo_accent_inverse <- function(
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"),

+ 6
- 0
R/style_mono_accent.R Просмотреть файл

@@ -239,6 +239,11 @@
#' `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.
@@ -325,6 +330,7 @@ style_mono_accent <- function(
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"),

+ 6
- 0
R/style_mono_accent_inverse.R Просмотреть файл

@@ -240,6 +240,11 @@
#' `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.
@@ -326,6 +331,7 @@ style_mono_accent_inverse <- function(
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"),

+ 6
- 0
R/style_mono_dark.R Просмотреть файл

@@ -241,6 +241,11 @@
#' `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.
@@ -327,6 +332,7 @@ style_mono_dark <- function(
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"),

+ 6
- 0
R/style_mono_light.R Просмотреть файл

@@ -241,6 +241,11 @@
#' `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.
@@ -327,6 +332,7 @@ style_mono_light <- function(
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"),

+ 6
- 0
R/style_solarized_dark.R Просмотреть файл

@@ -226,6 +226,11 @@
#' `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.
@@ -309,6 +314,7 @@ style_solarized_dark <- function(
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"),

+ 6
- 0
R/style_solarized_light.R Просмотреть файл

@@ -226,6 +226,11 @@
#' `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.
@@ -309,6 +314,7 @@ style_solarized_light <- function(
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"),

+ 6
- 0
R/style_xaringan.R Просмотреть файл

@@ -226,6 +226,11 @@
#' `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.
@@ -308,6 +313,7 @@ style_xaringan <- function(
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"),

Двоичные данные
R/sysdata.rda Просмотреть файл


+ 1
- 0
data-raw/theme_template_variables.R Просмотреть файл

@@ -55,6 +55,7 @@ template_variables <- tibble::tribble(
, "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"

+ 2
- 1
inst/resources/template.css Просмотреть файл

@@ -31,6 +31,7 @@
--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}};
@@ -69,7 +70,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: {{header_font_weight}};
color: var(--header-color);
}

+ 7
- 0
man/style_duo.Rd Просмотреть файл

@@ -63,6 +63,7 @@ style_duo(
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"),
@@ -368,6 +369,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_duo_accent.Rd Просмотреть файл

@@ -68,6 +68,7 @@ style_duo_accent(
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"),
@@ -387,6 +388,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_duo_accent_inverse.Rd Просмотреть файл

@@ -69,6 +69,7 @@ style_duo_accent_inverse(
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"),
@@ -389,6 +390,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_mono_accent.Rd Просмотреть файл

@@ -63,6 +63,7 @@ style_mono_accent(
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"),
@@ -372,6 +373,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_mono_accent_inverse.Rd Просмотреть файл

@@ -63,6 +63,7 @@ style_mono_accent_inverse(
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"),
@@ -373,6 +374,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_mono_dark.Rd Просмотреть файл

@@ -63,6 +63,7 @@ style_mono_dark(
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"),
@@ -374,6 +375,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_mono_light.Rd Просмотреть файл

@@ -63,6 +63,7 @@ style_mono_light(
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"),
@@ -374,6 +375,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_solarized_dark.Rd Просмотреть файл

@@ -60,6 +60,7 @@ style_solarized_dark(
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"),
@@ -353,6 +354,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_solarized_light.Rd Просмотреть файл

@@ -60,6 +60,7 @@ style_solarized_light(
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"),
@@ -353,6 +354,12 @@ argument of a style function or in custom 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.}

+ 7
- 0
man/style_xaringan.Rd Просмотреть файл

@@ -63,6 +63,7 @@ style_xaringan(
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"),
@@ -359,6 +360,12 @@ argument of a style function or in custom 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.}

+ 2
- 1
tests/testthat/css/duo-header_bg.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -70,7 +71,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/duo.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -70,7 +71,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/duo_accent.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -72,7 +73,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/duo_accent_inverse.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -72,7 +73,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/google_fonts.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -67,7 +68,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/mono_accent.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -71,7 +72,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/mono_accent_inverse.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -71,7 +72,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/mono_dark.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -71,7 +72,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/mono_light-header_bg.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -71,7 +72,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/mono_light.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -71,7 +72,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/solarized_dark-header_bg.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -68,7 +69,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/solarized_dark.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -68,7 +69,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/solarized_light.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -68,7 +69,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

+ 2
- 1
tests/testthat/css/xaringan.css Просмотреть файл

@@ -31,6 +31,7 @@
--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;
@@ -68,7 +69,7 @@ body {
color: var(--text-color);
}
h1, h2, h3 {
font-family: var(--header-font-family);
font-family: var(--header-font-family), var(--header-font-family-fallback);
font-weight: 600;
color: var(--header-color);
}

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