😎 Give your xaringan slides some style
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

463 lines
21KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/style_mono_accent_inverse.R
  3. \name{style_mono_accent_inverse}
  4. \alias{style_mono_accent_inverse}
  5. \title{Monotone Accent Inverse Theme}
  6. \usage{
  7. style_mono_accent_inverse(
  8. base_color = "#3C989E",
  9. white_color = "#FFFFFF",
  10. black_color = darken_color(base_color, 0.9),
  11. text_color = white_color,
  12. header_color = base_color,
  13. background_color = black_color,
  14. link_color = base_color,
  15. text_bold_color = base_color,
  16. text_slide_number_color = base_color,
  17. padding = "16px 64px 16px 64px",
  18. background_image = NULL,
  19. background_size = NULL,
  20. background_position = NULL,
  21. code_highlight_color = "rgba(255,255,0,0.5)",
  22. code_inline_color = base_color,
  23. code_inline_background_color = NULL,
  24. code_inline_font_size = "1em",
  25. inverse_background_color = base_color,
  26. inverse_text_color = black_color,
  27. inverse_text_shadow = FALSE,
  28. inverse_header_color = black_color,
  29. title_slide_text_color = inverse_text_color,
  30. title_slide_background_color = inverse_background_color,
  31. title_slide_background_image = NULL,
  32. title_slide_background_size = NULL,
  33. title_slide_background_position = NULL,
  34. footnote_color = NULL,
  35. footnote_font_size = "0.9em",
  36. footnote_position_bottom = "60px",
  37. left_column_subtle_color = apply_alpha(base_color, 0.6),
  38. left_column_selected_color = base_color,
  39. blockquote_left_border_color = apply_alpha(base_color, 0.5),
  40. table_border_color = "#666",
  41. table_row_border_color = "#ddd",
  42. table_row_even_background_color = darken_color(base_color, 0.8),
  43. base_font_size = "20px",
  44. text_font_size = "1rem",
  45. header_h1_font_size = "2.75rem",
  46. header_h2_font_size = "2.25rem",
  47. header_h3_font_size = "1.75rem",
  48. header_background_auto = FALSE,
  49. header_background_color = header_color,
  50. header_background_text_color = background_color,
  51. header_background_padding = NULL,
  52. header_background_content_padding_top = "7rem",
  53. header_background_ignore_classes = c("normal", "inverse", "title", "middle", "bottom"),
  54. text_slide_number_font_size = "0.9em",
  55. text_font_google = NULL,
  56. text_font_family = xaringanthemer_font_default("text_font_family"),
  57. text_font_weight = xaringanthemer_font_default("text_font_weight"),
  58. text_font_url = xaringanthemer_font_default("text_font_url"),
  59. text_font_family_fallback = xaringanthemer_font_default("text_font_family_fallback"),
  60. text_font_base = "sans-serif",
  61. header_font_google = NULL,
  62. header_font_family = xaringanthemer_font_default("header_font_family"),
  63. header_font_weight = xaringanthemer_font_default("header_font_weight"),
  64. header_font_url = xaringanthemer_font_default("header_font_url"),
  65. code_font_google = NULL,
  66. code_font_family = xaringanthemer_font_default("code_font_family"),
  67. code_font_size = "0.9rem",
  68. code_font_url = xaringanthemer_font_default("code_font_url"),
  69. code_font_family_fallback = xaringanthemer_font_default("code_font_family_fallback"),
  70. colors = NULL,
  71. extra_css = NULL,
  72. extra_fonts = NULL,
  73. outfile = "xaringan-themer.css"
  74. )
  75. }
  76. \arguments{
  77. \item{base_color}{Monotone Base Color, works best with a light color.
  78. Defaults to #3C989E. Used in multiple CSS rules. The value of this
  79. variable is also stored as a CSS variable that can be referenced with
  80. \code{var(--base)} in any argument of a style function or in custom CSS.}
  81. \item{white_color}{Brightest color used, default is a very light version of
  82. \code{base_color}. Defaults to #FFFFFF. Used in multiple CSS rules. The value
  83. of this variable is also stored as a CSS variable that can be referenced
  84. with \code{var(--white)} in any argument of a style function or in custom CSS.}
  85. \item{black_color}{Darkest color used, default is a very dark, version of
  86. \code{base_color}. Defaults to \code{darken_color(base_color, 0.9)}. Used in
  87. multiple CSS rules. The value of this variable is also stored as a CSS
  88. variable that can be referenced with \code{var(--black)} in any argument of a
  89. style function or in custom CSS.}
  90. \item{text_color}{Text Color. Defaults to \code{white_color}. Modifies the \code{body}
  91. element. The value of this variable is also stored as a CSS variable that
  92. can be referenced with \code{var(--text_color)} in any argument of a style
  93. function or in custom CSS.}
  94. \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the
  95. \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
  96. variable that can be referenced with \code{var(--header-color)} in any argument
  97. of a style function or in custom CSS.}
  98. \item{background_color}{Slide Background Color. Defaults to \code{black_color}.
  99. Modifies the \code{.remark-slide-content} class. The value of this variable is
  100. also stored as a CSS variable that can be referenced with
  101. \code{var(--background-color)} in any argument of a style function or in custom
  102. CSS.}
  103. \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the
  104. \verb{a, a > code} elements. The value of this variable is also stored as a CSS
  105. variable that can be referenced with \code{var(--link-color)} in any argument
  106. of a style function or in custom CSS.}
  107. \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies
  108. the \code{strong} element. The value of this variable is also stored as a CSS
  109. variable that can be referenced with \code{var(--text-bold-color)} in any
  110. argument of a style function or in custom CSS.}
  111. \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}.
  112. Modifies the \code{.remark-slide-number} class.}
  113. \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults
  114. to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class.
  115. Accepts CSS
  116. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding}
  117. property values.}
  118. \item{background_image}{Background image applied to each \emph{and every} slide.
  119. Set \code{title_slide_background_image = "none"} to remove the background image
  120. from the title slide. Defaults to \code{NULL}. Modifies the
  121. \code{.remark-slide-content} class.}
  122. \item{background_size}{Background image size, requires \code{background_image} to
  123. be set. If \code{background_image} is set, \code{background_size} will default to
  124. \code{cover} so the backround fills the screen. If both \code{background_image} and
  125. \code{background_position} are set, will default to 100 percent. Defaults to
  126. \code{NULL}. Modifies the \code{.remark-slide-content} class. Accepts CSS
  127. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size}
  128. property values.}
  129. \item{background_position}{Background image position, requires
  130. \code{background_image} to be set, and it is recommended to adjust
  131. \code{background_size}. Defaults to \code{NULL}. Modifies the
  132. \code{.remark-slide-content} class. Accepts CSS
  133. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position}
  134. property values.}
  135. \item{code_highlight_color}{Code Line Highlight. Defaults to
  136. rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class.
  137. The value of this variable is also stored as a CSS variable that can be
  138. referenced with \code{var(--code-highlight-color)} in any argument of a style
  139. function or in custom CSS.}
  140. \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}.
  141. Modifies the \code{.remark-inline-code} class.}
  142. \item{code_inline_background_color}{Inline Code Background Color. Defaults
  143. to \code{NULL}. Modifies the \code{.remark-inline-code} class.}
  144. \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em.
  145. Modifies the \code{.remark-inline-code} class. Accepts CSS
  146. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  147. property values. The value of this variable is also stored as a CSS
  148. variable that can be referenced with \code{var(--code-inline-font-size)} in any
  149. argument of a style function or in custom CSS.}
  150. \item{inverse_background_color}{Inverse Background Color. Defaults to
  151. \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is
  152. also stored as a CSS variable that can be referenced with
  153. \code{var(--inverse-background-color)} in any argument of a style function or
  154. in custom CSS.}
  155. \item{inverse_text_color}{Inverse Text Color. Defaults to \code{black_color}.
  156. Modifies the \code{.inverse} class. The value of this variable is also stored
  157. as a CSS variable that can be referenced with \code{var(--inverse-text-color)}
  158. in any argument of a style function or in custom CSS.}
  159. \item{inverse_text_shadow}{Enables Shadow on text of inverse slides.
  160. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.}
  161. \item{inverse_header_color}{Inverse Header Color. Defaults to \code{black_color}.
  162. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of
  163. this variable is also stored as a CSS variable that can be referenced with
  164. \code{var(--inverse-header-color)} in any argument of a style function or in
  165. custom CSS.}
  166. \item{title_slide_text_color}{Title Slide Text Color. Defaults to
  167. \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this
  168. variable is also stored as a CSS variable that can be referenced with
  169. \code{var(--title-slide-text-color)} in any argument of a style function or in
  170. custom CSS.}
  171. \item{title_slide_background_color}{Title Slide Background Color. Defaults
  172. to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The
  173. value of this variable is also stored as a CSS variable that can be
  174. referenced with \code{var(--title-slide-background-color)} in any argument of a
  175. style function or in custom CSS.}
  176. \item{title_slide_background_image}{Title Slide Background Image URL.
  177. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  178. \item{title_slide_background_size}{Title Slide Background Image Size,
  179. defaults to "cover" if background image is set. Defaults to \code{NULL}.
  180. Modifies the \code{.title-slide} class. Accepts CSS
  181. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-size}{background-size}
  182. property values.}
  183. \item{title_slide_background_position}{Title Slide Background Image
  184. Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class. Accepts
  185. CSS
  186. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/background-position}{background-position}
  187. property values.}
  188. \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same
  189. color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote}
  190. class.}
  191. \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies
  192. the \code{.footnote} class. Accepts CSS
  193. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  194. property values.}
  195. \item{footnote_position_bottom}{Footnote location from bottom of screen.
  196. Defaults to 60px. Modifies the \code{.footnote} class. Accepts CSS
  197. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/position_value}{position}
  198. property values.}
  199. \item{left_column_subtle_color}{Left Column Text (not last). Defaults to
  200. \code{apply_alpha(base_color, 0.6)}. Modifies the
  201. \verb{.left-column h2, .left-column h3} classes.}
  202. \item{left_column_selected_color}{Left Column Current Selection. Defaults to
  203. \code{base_color}. Modifies the
  204. \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.}
  205. \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults
  206. to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.}
  207. \item{table_border_color}{Table top/bottom border. Defaults to #666.
  208. Modifies the \verb{table: border-top, border-bottom} elements.}
  209. \item{table_row_border_color}{Table row inner bottom border. Defaults to
  210. #ddd. Modifies the \verb{table thead th: border-bottom} elements.}
  211. \item{table_row_even_background_color}{Table Even Row Background Color.
  212. Defaults to \code{darken_color(base_color, 0.8)}. Modifies the
  213. \verb{thead, tfoot, tr:nth-child(even)} elements.}
  214. \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}).
  215. Defaults to 20px. Modifies the \code{html} element. The value of this variable
  216. is also stored as a CSS variable that can be referenced with
  217. \code{var(--base-font-size)} in any argument of a style function or in custom
  218. CSS.}
  219. \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies
  220. the \code{.remark-slide-content} class. Accepts CSS
  221. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  222. property values. The value of this variable is also stored as a CSS
  223. variable that can be referenced with \code{var(--text-font-size)} in any
  224. argument of a style function or in custom CSS.}
  225. \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem.
  226. Modifies the \verb{.remark-slide-content h1} class. Accepts CSS
  227. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  228. property values. The value of this variable is also stored as a CSS
  229. variable that can be referenced with \code{var(--header-h1-font-size)} in any
  230. argument of a style function or in custom CSS.}
  231. \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem.
  232. Modifies the \verb{.remark-slide-content h2} class. Accepts CSS
  233. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  234. property values. The value of this variable is also stored as a CSS
  235. variable that can be referenced with \code{var(--header-h2-font-size)} in any
  236. argument of a style function or in custom CSS.}
  237. \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem.
  238. Modifies the \verb{.remark-slide-content h3} class. Accepts CSS
  239. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  240. property values. The value of this variable is also stored as a CSS
  241. variable that can be referenced with \code{var(--header-h3-font-size)} in any
  242. argument of a style function or in custom CSS.}
  243. \item{header_background_auto}{Add background under slide title automatically
  244. for h1 header elements. If not enabled, use \code{class: header_background} to
  245. enable. Defaults to \code{FALSE}.}
  246. \item{header_background_color}{Background Color for h1 Header with
  247. Background. Defaults to \code{header_color}. Modifies the
  248. \verb{.remark-slide-content h1} class. The value of this variable is also
  249. stored as a CSS variable that can be referenced with
  250. \code{var(--header-background-color)} in any argument of a style function or in
  251. custom CSS.}
  252. \item{header_background_text_color}{Text Color for h1 Header with
  253. Background. Defaults to \code{background_color}. Modifies the
  254. \verb{.remark-slide-content h1} class. The value of this variable is also
  255. stored as a CSS variable that can be referenced with
  256. \code{var(--header-background-text-color)} in any argument of a style function
  257. or in custom CSS.}
  258. \item{header_background_padding}{Padding for h1 Header with Background.
  259. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class. Accepts
  260. CSS \href{https://developer.mozilla.org/en-US/docs/Web/CSS/padding}{padding}
  261. property values.}
  262. \item{header_background_content_padding_top}{Top Padding for Content in
  263. Slide with Header with Background. Defaults to 7rem. Modifies the
  264. \code{.remark-slide-content} class.}
  265. \item{header_background_ignore_classes}{Slide Classes Where Header with
  266. Background will not be Applied. Defaults to
  267. \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the
  268. \code{.remark-slide-content} class.}
  269. \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to
  270. 0.9em. Modifies the \code{.remark-slide-number} class. Accepts CSS
  271. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  272. property values.}
  273. \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults
  274. to \code{NULL}. Modifies the \code{body} element.}
  275. \item{text_font_family}{Body Text Font Family (xaringan default is
  276. \code{'Droid Serif'}). Defaults to
  277. \code{xaringanthemer_font_default("text_font_family")}. Modifies the \code{body}
  278. element. The value of this variable is also stored as a CSS variable that
  279. can be referenced with \code{var(--text-font-family)} in any argument of a
  280. style function or in custom CSS.}
  281. \item{text_font_weight}{Body Text Font Weight. Defaults to
  282. \code{xaringanthemer_font_default("text_font_weight")}. Modifies the \code{body}
  283. element. Accepts CSS
  284. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
  285. property values.}
  286. \item{text_font_url}{Body Text Font URL(s). Defaults to
  287. \code{xaringanthemer_font_default("text_font_url")}. Modifies the
  288. \verb{@import url()} elements.}
  289. \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
  290. \code{xaringanthemer_font_default("text_font_family_fallback")}. Modifies the
  291. \code{body} element. The value of this variable is also stored as a CSS
  292. variable that can be referenced with \code{var(--text-font-family-fallback)} in
  293. any argument of a style function or in custom CSS.}
  294. \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
  295. to sans-serif. Modifies the \code{body} element. The value of this variable is
  296. also stored as a CSS variable that can be referenced with
  297. \code{var(--text-font-base)} in any argument of a style function or in custom
  298. CSS.}
  299. \item{header_font_google}{Use \code{google_font()} to specify header font.
  300. Defaults to \code{NULL}. Modifies the \code{body} element.}
  301. \item{header_font_family}{Header Font Family (xaringan default is
  302. \code{'Yanone Kaffeesatz'}). Defaults to
  303. \code{xaringanthemer_font_default("header_font_family")}. Modifies the
  304. \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
  305. variable that can be referenced with \code{var(--header-font-family)} in any
  306. argument of a style function or in custom CSS.}
  307. \item{header_font_weight}{Header Font Weight. Defaults to
  308. \code{xaringanthemer_font_default("header_font_weight")}. Modifies the
  309. \verb{h1, h2, h3} elements. Accepts CSS
  310. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight}{font-weight}
  311. property values.}
  312. \item{header_font_url}{Header Font URL. Defaults to
  313. \code{xaringanthemer_font_default("header_font_url")}. Modifies the
  314. \verb{@import url} elements.}
  315. \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
  316. to \code{NULL}. Modifies the \code{body} element.}
  317. \item{code_font_family}{Code Font Family. Defaults to
  318. \code{xaringanthemer_font_default("code_font_family")}. Modifies the
  319. \verb{.remark-code, .remark-inline-code} classes. The value of this variable is
  320. also stored as a CSS variable that can be referenced with
  321. \code{var(--code-font-family)} in any argument of a style function or in custom
  322. CSS.}
  323. \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the
  324. \code{.remark-inline} class. Accepts CSS
  325. \href{https://developer.mozilla.org/en-US/docs/Web/CSS/font-size}{font-size}
  326. property values. The value of this variable is also stored as a CSS
  327. variable that can be referenced with \code{var(--code-font-size)} in any
  328. argument of a style function or in custom CSS.}
  329. \item{code_font_url}{Code Font URL. Defaults to
  330. \code{xaringanthemer_font_default("code_font_url")}. Modifies the \verb{@import url}
  331. elements.}
  332. \item{code_font_family_fallback}{Code Font Fallback. Defaults to
  333. \code{xaringanthemer_font_default("code_font_family_fallback")}. Modifies the
  334. \verb{.remark-code, .remark-inline-code} classes.}
  335. \item{colors}{A named vector of custom colors. The names of the colors
  336. become CSS variables and classes that can be used within your slides.
  337. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable
  338. \code{--blue}, a \code{.blue} CSS class that applies the color to the text or
  339. foreground color, and a \code{.bg-blue} CSS class that applies the color
  340. to the background.}
  341. \item{extra_css}{A named list of CSS definitions each containing a named list
  342. of CSS property-value pairs, i.e.
  343. \code{list(".class-id" = list("css-property" = "value"))}.}
  344. \item{extra_fonts}{A list of additional fonts to import, each list element
  345. can be either a URL as a character string or a call to
  346. \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you
  347. will need to write custom CSS rules that apply the font to an element or
  348. class with the \code{font-family} property. See the \strong{Fonts} section of
  349. \code{vignette("xaringanthemer")} for an example.}
  350. \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
  351. }
  352. \description{
  353. An "inverted" default xaringan theme with a single color used
  354. for color accents on select elements (headers, bold text, etc.).
  355. }
  356. \section{Usage}{
  357. To use the styles created by this theme function, make sure
  358. that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML
  359. header. If you change the name of the output file using the \code{outfile}
  360. argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output:
  361. xaringan::moon_reader:
  362. css: xaringan-themer.css
  363. }\if{html}{\out{</div>}}
  364. }
  365. \examples{
  366. # Create a xaringan style in a temporary file
  367. xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css")
  368. style_mono_accent_inverse(
  369. base_color = "#3c989e",
  370. outfile = xaringan_themer_css # omit in your slides to write the
  371. # styles to xaringan-themer.css
  372. )
  373. # View the CSS:
  374. # file.edit(xaringan_themer_css)
  375. }
  376. \seealso{
  377. Other themes:
  378. \code{\link{style_duo_accent_inverse}()},
  379. \code{\link{style_duo_accent}()},
  380. \code{\link{style_duo}()},
  381. \code{\link{style_mono_accent}()},
  382. \code{\link{style_mono_dark}()},
  383. \code{\link{style_mono_light}()},
  384. \code{\link{style_solarized_dark}()},
  385. \code{\link{style_solarized_light}()},
  386. \code{\link{xaringanthemer_font_default}()}
  387. Other Monotone themes:
  388. \code{\link{style_mono_accent}()},
  389. \code{\link{style_mono_dark}()},
  390. \code{\link{style_mono_light}()}
  391. }
  392. \concept{Monotone themes}
  393. \concept{themes}