😎 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.

432 lines
19KB

  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 = "Noto Sans",
  57. text_font_weight = "normal",
  58. text_font_url = "https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap",
  59. text_font_family_fallback = "-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial",
  60. text_font_base = "sans-serif",
  61. header_font_google = NULL,
  62. header_font_family = "Cabin",
  63. header_font_weight = "600",
  64. header_font_url = "https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap",
  65. code_font_google = NULL,
  66. code_font_family = "Source Code Pro",
  67. code_font_size = "0.9rem",
  68. code_font_url = "https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap",
  69. code_font_family_fallback = "Menlo, Consolas, Monaco, Liberation Mono, Lucida Console",
  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. \item{background_image}{Background image applied to each \emph{and every} slide.
  116. Set \code{title_slide_background_image = "none"} to remove the background image
  117. from the title slide. Defaults to \code{NULL}. Modifies the
  118. \code{.remark-slide-content} class.}
  119. \item{background_size}{Background image size, requires \code{background_image} to
  120. be set. If \code{background_image} is set, \code{background_size} will default to
  121. \code{cover} so the backround fills the screen. If both \code{background_image} and
  122. \code{background_position} are set, will default to 100 percent. Defaults to
  123. \code{NULL}. Modifies the \code{.remark-slide-content} class.}
  124. \item{background_position}{Background image position, requires
  125. \code{background_image} to be set, and it is recommended to adjust
  126. \code{background_size}. Defaults to \code{NULL}. Modifies the
  127. \code{.remark-slide-content} class.}
  128. \item{code_highlight_color}{Code Line Highlight. Defaults to
  129. rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class.
  130. The value of this variable is also stored as a CSS variable that can be
  131. referenced with \code{var(--code-highlight-color)} in any argument of a style
  132. function or in custom CSS.}
  133. \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}.
  134. Modifies the \code{.remark-inline-code} class.}
  135. \item{code_inline_background_color}{Inline Code Background Color. Defaults
  136. to \code{NULL}. Modifies the \code{.remark-inline-code} class.}
  137. \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em.
  138. Modifies the \code{.remark-inline-code} class. The value of this variable is
  139. also stored as a CSS variable that can be referenced with
  140. \code{var(--code-inline-font-size)} in any argument of a style function or in
  141. custom CSS.}
  142. \item{inverse_background_color}{Inverse Background Color. Defaults to
  143. \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is
  144. also stored as a CSS variable that can be referenced with
  145. \code{var(--inverse-background-color)} in any argument of a style function or
  146. in custom CSS.}
  147. \item{inverse_text_color}{Inverse Text Color. Defaults to \code{black_color}.
  148. Modifies the \code{.inverse} class. The value of this variable is also stored
  149. as a CSS variable that can be referenced with \code{var(--inverse-text-color)}
  150. in any argument of a style function or in custom CSS.}
  151. \item{inverse_text_shadow}{Enables Shadow on text of inverse slides.
  152. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.}
  153. \item{inverse_header_color}{Inverse Header Color. Defaults to \code{black_color}.
  154. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of
  155. this variable is also stored as a CSS variable that can be referenced with
  156. \code{var(--inverse-header-color)} in any argument of a style function or in
  157. custom CSS.}
  158. \item{title_slide_text_color}{Title Slide Text Color. Defaults to
  159. \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this
  160. variable is also stored as a CSS variable that can be referenced with
  161. \code{var(--title-slide-text-color)} in any argument of a style function or in
  162. custom CSS.}
  163. \item{title_slide_background_color}{Title Slide Background Color. Defaults
  164. to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The
  165. value of this variable is also stored as a CSS variable that can be
  166. referenced with \code{var(--title-slide-background-color)} in any argument of a
  167. style function or in custom CSS.}
  168. \item{title_slide_background_image}{Title Slide Background Image URL.
  169. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  170. \item{title_slide_background_size}{Title Slide Background Image Size,
  171. defaults to "cover" if background image is set. Defaults to \code{NULL}.
  172. Modifies the \code{.title-slide} class.}
  173. \item{title_slide_background_position}{Title Slide Background Image
  174. Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  175. \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same
  176. color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote}
  177. class.}
  178. \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies
  179. the \code{.footnote} class.}
  180. \item{footnote_position_bottom}{Footnote location from bottom of screen.
  181. Defaults to 60px. Modifies the \code{.footnote} class.}
  182. \item{left_column_subtle_color}{Left Column Text (not last). Defaults to
  183. \code{apply_alpha(base_color, 0.6)}. Modifies the
  184. \verb{.left-column h2, .left-column h3} classes.}
  185. \item{left_column_selected_color}{Left Column Current Selection. Defaults to
  186. \code{base_color}. Modifies the
  187. \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.}
  188. \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults
  189. to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.}
  190. \item{table_border_color}{Table top/bottom border. Defaults to #666.
  191. Modifies the \verb{table: border-top, border-bottom} elements.}
  192. \item{table_row_border_color}{Table row inner bottom border. Defaults to
  193. #ddd. Modifies the \verb{table thead th: border-bottom} elements.}
  194. \item{table_row_even_background_color}{Table Even Row Background Color.
  195. Defaults to \code{darken_color(base_color, 0.8)}. Modifies the
  196. \verb{thead, tfoot, tr:nth-child(even)} elements.}
  197. \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}).
  198. Defaults to 20px. Modifies the \code{html} element. The value of this variable
  199. is also stored as a CSS variable that can be referenced with
  200. \code{var(--base-font-size)} in any argument of a style function or in custom
  201. CSS.}
  202. \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies
  203. the \code{.remark-slide-content} class. The value of this variable is also
  204. stored as a CSS variable that can be referenced with
  205. \code{var(--text-font-size)} in any argument of a style function or in custom
  206. CSS.}
  207. \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem.
  208. Modifies the \verb{.remark-slide-content h1} class. The value of this variable
  209. is also stored as a CSS variable that can be referenced with
  210. \code{var(--header-h1-font-size)} in any argument of a style function or in
  211. custom CSS.}
  212. \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem.
  213. Modifies the \verb{.remark-slide-content h2} class. The value of this variable
  214. is also stored as a CSS variable that can be referenced with
  215. \code{var(--header-h2-font-size)} in any argument of a style function or in
  216. custom CSS.}
  217. \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem.
  218. Modifies the \verb{.remark-slide-content h3} class. The value of this variable
  219. is also stored as a CSS variable that can be referenced with
  220. \code{var(--header-h3-font-size)} in any argument of a style function or in
  221. custom CSS.}
  222. \item{header_background_auto}{Add background under slide title automatically
  223. for h1 header elements. If not enabled, use \code{class: header_background} to
  224. enable. Defaults to \code{FALSE}.}
  225. \item{header_background_color}{Background Color for h1 Header with
  226. Background. Defaults to \code{header_color}. Modifies the
  227. \verb{.remark-slide-content h1} class. The value of this variable is also
  228. stored as a CSS variable that can be referenced with
  229. \code{var(--header-background-color)} in any argument of a style function or in
  230. custom CSS.}
  231. \item{header_background_text_color}{Text Color for h1 Header with
  232. Background. Defaults to \code{background_color}. Modifies the
  233. \verb{.remark-slide-content h1} class. The value of this variable is also
  234. stored as a CSS variable that can be referenced with
  235. \code{var(--header-background-text-color)} in any argument of a style function
  236. or in custom CSS.}
  237. \item{header_background_padding}{Padding for h1 Header with Background.
  238. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class.}
  239. \item{header_background_content_padding_top}{Top Padding for Content in
  240. Slide with Header with Background. Defaults to 7rem. Modifies the
  241. \code{.remark-slide-content} class.}
  242. \item{header_background_ignore_classes}{Slide Classes Where Header with
  243. Background will not be Applied. Defaults to
  244. \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the
  245. \code{.remark-slide-content} class.}
  246. \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to
  247. 0.9em. Modifies the \code{.remark-slide-number} class.}
  248. \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults
  249. to \code{NULL}. Modifies the \code{body} element.}
  250. \item{text_font_family}{Body Text Font Family (xaringan default is
  251. \code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
  252. value of this variable is also stored as a CSS variable that can be
  253. referenced with \code{var(--text-font-family)} in any argument of a style
  254. function or in custom CSS.}
  255. \item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
  256. the \code{body} element.}
  257. \item{text_font_url}{Body Text Font URL(s). Defaults to
  258. https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
  259. Modifies the \verb{@import url()} elements.}
  260. \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
  261. -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
  262. helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
  263. element. The value of this variable is also stored as a CSS variable that
  264. can be referenced with \code{var(--text-font-family-fallback)} in any argument
  265. of a style function or in custom CSS.}
  266. \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
  267. to sans-serif. Modifies the \code{body} element. The value of this variable is
  268. also stored as a CSS variable that can be referenced with
  269. \code{var(--text-font-base)} in any argument of a style function or in custom
  270. CSS.}
  271. \item{header_font_google}{Use \code{google_font()} to specify header font.
  272. Defaults to \code{NULL}. Modifies the \code{body} element.}
  273. \item{header_font_family}{Header Font Family (xaringan default is
  274. \code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
  275. elements. The value of this variable is also stored as a CSS variable that
  276. can be referenced with \code{var(--header-font-family)} in any argument of a
  277. style function or in custom CSS.}
  278. \item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
  279. \verb{h1, h2, h3} elements.}
  280. \item{header_font_url}{Header Font URL. Defaults to
  281. https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
  282. Modifies the \verb{@import url} elements.}
  283. \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
  284. to \code{NULL}. Modifies the \code{body} element.}
  285. \item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
  286. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
  287. this variable is also stored as a CSS variable that can be referenced with
  288. \code{var(--code-font-family)} in any argument of a style function or in custom
  289. CSS.}
  290. \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the
  291. \code{.remark-inline} class. The value of this variable is also stored as a CSS
  292. variable that can be referenced with \code{var(--code-font-size)} in any
  293. argument of a style function or in custom CSS.}
  294. \item{code_font_url}{Code Font URL. Defaults to
  295. https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
  296. Modifies the \verb{@import url} elements.}
  297. \item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
  298. Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
  299. \verb{.remark-code, .remark-inline-code} classes.}
  300. \item{colors}{A named vector of custom colors. The names of the colors
  301. become CSS variables and classes that can be used within your slides.
  302. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable
  303. \code{--blue}, a \code{.blue} CSS class that applies the color to the text or
  304. foreground color, and a \code{.bg-blue} CSS class that applies the color
  305. to the background.}
  306. \item{extra_css}{A named list of CSS definitions each containing a named list
  307. of CSS property-value pairs, i.e.
  308. \code{list(".class-id" = list("css-property" = "value"))}.}
  309. \item{extra_fonts}{A list of additional fonts to import, each list element
  310. can be either a URL as a character string or a call to
  311. \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you
  312. will need to write custom CSS rules that apply the font to an element or
  313. class with the \code{font-family} property. See the \strong{Fonts} section of
  314. \code{vignette("xaringanthemer")} for an example.}
  315. \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
  316. }
  317. \description{
  318. An "inverted" default xaringan theme with a single color used
  319. for color accents on select elements (headers, bold text, etc.).
  320. }
  321. \section{Usage}{
  322. To use the styles created by this theme function, make sure
  323. that you use \code{xaringan-themer.css} as your CSS file in your slides' YAML
  324. header. If you change the name of the output file using the \code{outfile}
  325. argument, use that name instead of the default file name.\if{html}{\out{<div class="yaml">}}\preformatted{output:
  326. xaringan::moon_reader:
  327. css: xaringan-themer.css`
  328. }\if{html}{\out{</div>}}
  329. }
  330. \examples{
  331. # Create a xaringan style in a temporary file
  332. xaringan_themer_css <- tempfile("xaringan-themer-", fileext = ".css")
  333. style_mono_accent_inverse(
  334. base_color = "#3c989e",
  335. outfile = xaringan_themer_css # omit in your slides to write the
  336. # styles to xaringan-themer.css
  337. )
  338. # View the CSS:
  339. # file.edit(xaringan_themer_css)
  340. }
  341. \seealso{
  342. Other themes:
  343. \code{\link{style_duo_accent_inverse}()},
  344. \code{\link{style_duo_accent}()},
  345. \code{\link{style_duo}()},
  346. \code{\link{style_mono_accent}()},
  347. \code{\link{style_mono_dark}()},
  348. \code{\link{style_mono_light}()},
  349. \code{\link{style_solarized_dark}()},
  350. \code{\link{style_solarized_light}()},
  351. \code{\link{style_xaringan}()}
  352. Other Monotone themes:
  353. \code{\link{style_mono_accent}()},
  354. \code{\link{style_mono_dark}()},
  355. \code{\link{style_mono_light}()}
  356. }
  357. \concept{Monotone themes}
  358. \concept{themes}