😎 Give your xaringan slides some style
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

338 行
19KB

  1. # Generated by inst/scripts/generate_theme_functions.R: do not edit by hand
  2. #' @param base_color Monotone Base Color, works best with a light color.
  3. #' Defaults to #3C989E. Used in multiple CSS rules. The value of this
  4. #' variable is also stored as a CSS variable that can be referenced with
  5. #' `var(--base)` in any argument of a style function or in custom CSS.
  6. #' @param white_color Brightest color used, default is a very light version of
  7. #' `base_color`. Defaults to #FFFFFF. Used in multiple CSS rules. The value
  8. #' of this variable is also stored as a CSS variable that can be referenced
  9. #' with `var(--white)` in any argument of a style function or in custom CSS.
  10. #' @param black_color Darkest color used, default is a very dark, version of
  11. #' `base_color`. Defaults to `darken_color(base_color, 0.9)`. Used in
  12. #' multiple CSS rules. The value of this variable is also stored as a CSS
  13. #' variable that can be referenced with `var(--black)` in any argument of a
  14. #' style function or in custom CSS.
  15. #' @param text_color Text Color. Defaults to `white_color`. Modifies the `body`
  16. #' element. The value of this variable is also stored as a CSS variable that
  17. #' can be referenced with `var(--text_color)` in any argument of a style
  18. #' function or in custom CSS.
  19. #' @param header_color Header Color. Defaults to `base_color`. Modifies the
  20. #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
  21. #' variable that can be referenced with `var(--header-color)` in any argument
  22. #' of a style function or in custom CSS.
  23. #' @param background_color Slide Background Color. Defaults to `black_color`.
  24. #' Modifies the `.remark-slide-content` class. The value of this variable is
  25. #' also stored as a CSS variable that can be referenced with
  26. #' `var(--background-color)` in any argument of a style function or in custom
  27. #' CSS.
  28. #' @param link_color Link Color. Defaults to `base_color`. Modifies the
  29. #' `a, a > code` elements. The value of this variable is also stored as a CSS
  30. #' variable that can be referenced with `var(--link-color)` in any argument
  31. #' of a style function or in custom CSS.
  32. #' @param text_bold_color Bold Text Color. Defaults to `base_color`. Modifies
  33. #' the `strong` element. The value of this variable is also stored as a CSS
  34. #' variable that can be referenced with `var(--text-bold-color)` in any
  35. #' argument of a style function or in custom CSS.
  36. #' @param text_slide_number_color Slide Number Color. Defaults to `base_color`.
  37. #' Modifies the `.remark-slide-number` class.
  38. #' @param padding Slide Padding in `top right [bottom left]` format. Defaults
  39. #' to 16px 64px 16px 64px. Modifies the `.remark-slide-content` class.
  40. #' Accepts CSS
  41. #' [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
  42. #' property values.
  43. #' @param background_image Background image applied to each *and every* slide.
  44. #' Set `title_slide_background_image = "none"` to remove the background image
  45. #' from the title slide. Defaults to `NULL`. Modifies the
  46. #' `.remark-slide-content` class.
  47. #' @param background_size Background image size, requires `background_image` to
  48. #' be set. If `background_image` is set, `background_size` will default to
  49. #' `cover` so the background fills the screen. If both `background_image` and
  50. #' `background_position` are set, will default to 100 percent. Defaults to
  51. #' `NULL`. Modifies the `.remark-slide-content` class. Accepts CSS
  52. #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
  53. #' property values.
  54. #' @param background_position Background image position, requires
  55. #' `background_image` to be set, and it is recommended to adjust
  56. #' `background_size`. Defaults to `NULL`. Modifies the
  57. #' `.remark-slide-content` class. Accepts CSS
  58. #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
  59. #' property values.
  60. #' @param code_highlight_color Code Line Highlight. Defaults to
  61. #' rgba(255,255,0,0.5). Modifies the `.remark-code-line-highlighted` class.
  62. #' The value of this variable is also stored as a CSS variable that can be
  63. #' referenced with `var(--code-highlight-color)` in any argument of a style
  64. #' function or in custom CSS.
  65. #' @param code_inline_color Inline Code Color. Defaults to `base_color`.
  66. #' Modifies the `.remark-inline-code` class.
  67. #' @param code_inline_background_color Inline Code Background Color. Defaults
  68. #' to `NULL`. Modifies the `.remark-inline-code` class.
  69. #' @param code_inline_font_size Inline Code Text Font Size. Defaults to 1em.
  70. #' Modifies the `.remark-inline-code` class. Accepts CSS
  71. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  72. #' property values. The value of this variable is also stored as a CSS
  73. #' variable that can be referenced with `var(--code-inline-font-size)` in any
  74. #' argument of a style function or in custom CSS.
  75. #' @param inverse_background_color Inverse Background Color. Defaults to
  76. #' `base_color`. Modifies the `.inverse` class. The value of this variable is
  77. #' also stored as a CSS variable that can be referenced with
  78. #' `var(--inverse-background-color)` in any argument of a style function or
  79. #' in custom CSS.
  80. #' @param inverse_text_color Inverse Text Color. Defaults to `black_color`.
  81. #' Modifies the `.inverse` class. The value of this variable is also stored
  82. #' as a CSS variable that can be referenced with `var(--inverse-text-color)`
  83. #' in any argument of a style function or in custom CSS.
  84. #' @param inverse_text_shadow Enables Shadow on text of inverse slides.
  85. #' Defaults to `FALSE`. Modifies the `.inverse` class.
  86. #' @param inverse_header_color Inverse Header Color. Defaults to `black_color`.
  87. #' Modifies the `.inverse h1, .inverse h2, .inverse h3` classes. The value of
  88. #' this variable is also stored as a CSS variable that can be referenced with
  89. #' `var(--inverse-header-color)` in any argument of a style function or in
  90. #' custom CSS.
  91. #' @param title_slide_text_color Title Slide Text Color. Defaults to
  92. #' `inverse_text_color`. Modifies the `.title-slide` class. The value of this
  93. #' variable is also stored as a CSS variable that can be referenced with
  94. #' `var(--title-slide-text-color)` in any argument of a style function or in
  95. #' custom CSS.
  96. #' @param title_slide_background_color Title Slide Background Color. Defaults
  97. #' to `inverse_background_color`. Modifies the `.title-slide` class. The
  98. #' value of this variable is also stored as a CSS variable that can be
  99. #' referenced with `var(--title-slide-background-color)` in any argument of a
  100. #' style function or in custom CSS.
  101. #' @param title_slide_background_image Title Slide Background Image URL.
  102. #' Defaults to `NULL`. Modifies the `.title-slide` class.
  103. #' @param title_slide_background_size Title Slide Background Image Size,
  104. #' defaults to "cover" if background image is set. Defaults to `NULL`.
  105. #' Modifies the `.title-slide` class. Accepts CSS
  106. #' [background-size](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)
  107. #' property values.
  108. #' @param title_slide_background_position Title Slide Background Image
  109. #' Position. Defaults to `NULL`. Modifies the `.title-slide` class. Accepts
  110. #' CSS
  111. #' [background-position](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position)
  112. #' property values.
  113. #' @param footnote_color Footnote text color (if `NA`, then it will be the same
  114. #' color as `text_color`). Defaults to `NULL`. Modifies the `.footnote`
  115. #' class.
  116. #' @param footnote_font_size Footnote font size. Defaults to 0.9em. Modifies
  117. #' the `.footnote` class. Accepts CSS
  118. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  119. #' property values.
  120. #' @param footnote_position_bottom Footnote location from bottom of screen.
  121. #' Defaults to 60px. Modifies the `.footnote` class. Accepts CSS
  122. #' [position](https://developer.mozilla.org/en-US/docs/Web/CSS/position_value)
  123. #' property values.
  124. #' @param left_column_subtle_color Left Column Text (not last). Defaults to
  125. #' `apply_alpha(base_color, 0.6)`. Modifies the
  126. #' `.left-column h2, .left-column h3` classes.
  127. #' @param left_column_selected_color Left Column Current Selection. Defaults to
  128. #' `base_color`. Modifies the
  129. #' `.left-column h2:last-of-type, .left-column h3:last-child` classes.
  130. #' @param blockquote_left_border_color Blockquote Left Border Color. Defaults
  131. #' to `apply_alpha(base_color, 0.5)`. Modifies the `blockquote` element.
  132. #' @param table_border_color Table top/bottom border. Defaults to #666.
  133. #' Modifies the `table: border-top, border-bottom` elements.
  134. #' @param table_row_border_color Table row inner bottom border. Defaults to
  135. #' #ddd. Modifies the `table thead th: border-bottom` elements.
  136. #' @param table_row_even_background_color Table Even Row Background Color.
  137. #' Defaults to `darken_color(base_color, 0.8)`. Modifies the
  138. #' `thead, tfoot, tr:nth-child(even)` elements.
  139. #' @param base_font_size Base Font Size for All Slide Elements (must be `px`).
  140. #' Defaults to 20px. Modifies the `html` element. The value of this variable
  141. #' is also stored as a CSS variable that can be referenced with
  142. #' `var(--base-font-size)` in any argument of a style function or in custom
  143. #' CSS.
  144. #' @param text_font_size Slide Body Text Font Size. Defaults to 1rem. Modifies
  145. #' the `.remark-slide-content` class. Accepts CSS
  146. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  147. #' property values. The value of this variable is also stored as a CSS
  148. #' variable that can be referenced with `var(--text-font-size)` in any
  149. #' argument of a style function or in custom CSS.
  150. #' @param header_h1_font_size h1 Header Text Font Size. Defaults to 2.75rem.
  151. #' Modifies the `.remark-slide-content h1` class. Accepts CSS
  152. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  153. #' property values. The value of this variable is also stored as a CSS
  154. #' variable that can be referenced with `var(--header-h1-font-size)` in any
  155. #' argument of a style function or in custom CSS.
  156. #' @param header_h2_font_size h2 Header Text Font Size. Defaults to 2.25rem.
  157. #' Modifies the `.remark-slide-content h2` class. Accepts CSS
  158. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  159. #' property values. The value of this variable is also stored as a CSS
  160. #' variable that can be referenced with `var(--header-h2-font-size)` in any
  161. #' argument of a style function or in custom CSS.
  162. #' @param header_h3_font_size h3 Header Text Font Size. Defaults to 1.75rem.
  163. #' Modifies the `.remark-slide-content h3` class. Accepts CSS
  164. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  165. #' property values. The value of this variable is also stored as a CSS
  166. #' variable that can be referenced with `var(--header-h3-font-size)` in any
  167. #' argument of a style function or in custom CSS.
  168. #' @param header_background_auto Add background under slide title automatically
  169. #' for h1 header elements. If not enabled, use `class: header_background` to
  170. #' enable. Defaults to `FALSE`.
  171. #' @param header_background_color Background Color for h1 Header with
  172. #' Background. Defaults to `header_color`. Modifies the
  173. #' `.remark-slide-content h1` class. The value of this variable is also
  174. #' stored as a CSS variable that can be referenced with
  175. #' `var(--header-background-color)` in any argument of a style function or in
  176. #' custom CSS.
  177. #' @param header_background_text_color Text Color for h1 Header with
  178. #' Background. Defaults to `background_color`. Modifies the
  179. #' `.remark-slide-content h1` class. The value of this variable is also
  180. #' stored as a CSS variable that can be referenced with
  181. #' `var(--header-background-text-color)` in any argument of a style function
  182. #' or in custom CSS.
  183. #' @param header_background_padding Padding for h1 Header with Background.
  184. #' Defaults to `NULL`. Modifies the `.remark-slide-content h1` class. Accepts
  185. #' CSS [padding](https://developer.mozilla.org/en-US/docs/Web/CSS/padding)
  186. #' property values.
  187. #' @param header_background_content_padding_top Top Padding for Content in
  188. #' Slide with Header with Background. Defaults to 7rem. Modifies the
  189. #' `.remark-slide-content` class.
  190. #' @param header_background_ignore_classes Slide Classes Where Header with
  191. #' Background will not be Applied. Defaults to
  192. #' `c('normal', 'inverse', 'title', 'middle', 'bottom')`. Modifies the
  193. #' `.remark-slide-content` class.
  194. #' @param text_slide_number_font_size Slide Number Text Font Size. Defaults to
  195. #' 0.9em. Modifies the `.remark-slide-number` class. Accepts CSS
  196. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  197. #' property values.
  198. #' @param text_font_google Use `google_font()` to specify body font. Defaults
  199. #' to `NULL`. Modifies the `body` element.
  200. #' @param text_font_family Body Text Font Family (xaringan default is
  201. #' `'Droid Serif'`). Defaults to
  202. #' `xaringanthemer_font_default("text_font_family")`. Modifies the `body`
  203. #' element. The value of this variable is also stored as a CSS variable that
  204. #' can be referenced with `var(--text-font-family)` in any argument of a
  205. #' style function or in custom CSS.
  206. #' @param text_font_weight Body Text Font Weight. Defaults to
  207. #' `xaringanthemer_font_default("text_font_weight")`. Modifies the `body`
  208. #' element. Accepts CSS
  209. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  210. #' property values.
  211. #' @param text_font_url Body Text Font URL(s). Defaults to
  212. #' `xaringanthemer_font_default("text_font_url")`. Modifies the
  213. #' `@import url()` elements.
  214. #' @param text_font_family_fallback Body Text Font Fallbacks. Defaults to
  215. #' `xaringanthemer_font_default("text_font_family_fallback")`. Modifies the
  216. #' `body` element. The value of this variable is also stored as a CSS
  217. #' variable that can be referenced with `var(--text-font-family-fallback)` in
  218. #' any argument of a style function or in custom CSS.
  219. #' @param text_font_base Body Text Base Font (Total Failure Fallback). Defaults
  220. #' to sans-serif. Modifies the `body` element. The value of this variable is
  221. #' also stored as a CSS variable that can be referenced with
  222. #' `var(--text-font-base)` in any argument of a style function or in custom
  223. #' CSS.
  224. #' @param header_font_google Use `google_font()` to specify header font.
  225. #' Defaults to `NULL`. Modifies the `body` element.
  226. #' @param header_font_family Header Font Family (xaringan default is
  227. #' `'Yanone Kaffeesatz'`). Defaults to
  228. #' `xaringanthemer_font_default("header_font_family")`. Modifies the
  229. #' `h1, h2, h3` elements. The value of this variable is also stored as a CSS
  230. #' variable that can be referenced with `var(--header-font-family)` in any
  231. #' argument of a style function or in custom CSS.
  232. #' @param header_font_weight Header Font Weight. Defaults to
  233. #' `xaringanthemer_font_default("header_font_weight")`. Modifies the
  234. #' `h1, h2, h3` elements. Accepts CSS
  235. #' [font-weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight)
  236. #' property values.
  237. #' @param header_font_url Header Font URL. Defaults to
  238. #' `xaringanthemer_font_default("header_font_url")`. Modifies the
  239. #' `@import url` elements.
  240. #' @param code_font_google Use `google_font()` to specify code font. Defaults
  241. #' to `NULL`. Modifies the `body` element.
  242. #' @param code_font_family Code Font Family. Defaults to
  243. #' `xaringanthemer_font_default("code_font_family")`. Modifies the
  244. #' `.remark-code, .remark-inline-code` classes. The value of this variable is
  245. #' also stored as a CSS variable that can be referenced with
  246. #' `var(--code-font-family)` in any argument of a style function or in custom
  247. #' CSS.
  248. #' @param code_font_size Code Text Font Size. Defaults to 0.9rem. Modifies the
  249. #' `.remark-inline` class. Accepts CSS
  250. #' [font-size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size)
  251. #' property values. The value of this variable is also stored as a CSS
  252. #' variable that can be referenced with `var(--code-font-size)` in any
  253. #' argument of a style function or in custom CSS.
  254. #' @param code_font_url Code Font URL. Defaults to
  255. #' `xaringanthemer_font_default("code_font_url")`. Modifies the `@import url`
  256. #' elements.
  257. #' @param code_font_family_fallback Code Font Fallback. Defaults to
  258. #' `xaringanthemer_font_default("code_font_family_fallback")`. Modifies the
  259. #' `.remark-code, .remark-inline-code` classes.
  260. #' @template theme_params
  261. #' @template style-usage
  262. #' @template style_mono_accent_inverse
  263. #' @family Monotone themes
  264. #' @export
  265. style_mono_accent_inverse <- function(
  266. base_color = "#3C989E",
  267. white_color = "#FFFFFF",
  268. black_color = darken_color(base_color, 0.9),
  269. text_color = white_color,
  270. header_color = base_color,
  271. background_color = black_color,
  272. link_color = base_color,
  273. text_bold_color = base_color,
  274. text_slide_number_color = base_color,
  275. padding = "16px 64px 16px 64px",
  276. background_image = NULL,
  277. background_size = NULL,
  278. background_position = NULL,
  279. code_highlight_color = "rgba(255,255,0,0.5)",
  280. code_inline_color = base_color,
  281. code_inline_background_color = NULL,
  282. code_inline_font_size = "1em",
  283. inverse_background_color = base_color,
  284. inverse_text_color = black_color,
  285. inverse_text_shadow = FALSE,
  286. inverse_header_color = black_color,
  287. title_slide_text_color = inverse_text_color,
  288. title_slide_background_color = inverse_background_color,
  289. title_slide_background_image = NULL,
  290. title_slide_background_size = NULL,
  291. title_slide_background_position = NULL,
  292. footnote_color = NULL,
  293. footnote_font_size = "0.9em",
  294. footnote_position_bottom = "60px",
  295. left_column_subtle_color = apply_alpha(base_color, 0.6),
  296. left_column_selected_color = base_color,
  297. blockquote_left_border_color = apply_alpha(base_color, 0.5),
  298. table_border_color = "#666",
  299. table_row_border_color = "#ddd",
  300. table_row_even_background_color = darken_color(base_color, 0.8),
  301. base_font_size = "20px",
  302. text_font_size = "1rem",
  303. header_h1_font_size = "2.75rem",
  304. header_h2_font_size = "2.25rem",
  305. header_h3_font_size = "1.75rem",
  306. header_background_auto = FALSE,
  307. header_background_color = header_color,
  308. header_background_text_color = background_color,
  309. header_background_padding = NULL,
  310. header_background_content_padding_top = "7rem",
  311. header_background_ignore_classes = c('normal', 'inverse', 'title', 'middle', 'bottom'),
  312. text_slide_number_font_size = "0.9em",
  313. text_font_google = NULL,
  314. text_font_family = xaringanthemer_font_default("text_font_family"),
  315. text_font_weight = xaringanthemer_font_default("text_font_weight"),
  316. text_font_url = xaringanthemer_font_default("text_font_url"),
  317. text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
  318. text_font_base = "sans-serif",
  319. header_font_google = NULL,
  320. header_font_family = xaringanthemer_font_default("header_font_family"),
  321. header_font_weight = xaringanthemer_font_default("header_font_weight"),
  322. header_font_url = xaringanthemer_font_default("header_font_url"),
  323. code_font_google = NULL,
  324. code_font_family = xaringanthemer_font_default("code_font_family"),
  325. code_font_size = "0.9rem",
  326. code_font_url = xaringanthemer_font_default("code_font_url"),
  327. code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
  328. colors = NULL,
  329. extra_css = NULL,
  330. extra_fonts = NULL,
  331. outfile = "xaringan-themer.css"
  332. ) {
  333. # DO NOT EDIT - Generated from inst/scripts/generate_theme_functions.R
  334. colors <- c(base = base_color, white = white_color, black = black_color, colors)
  335. eval(parse(text = call_style_xaringan()))
  336. }