😎 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_dark.R
  3. \name{style_mono_dark}
  4. \alias{style_mono_dark}
  5. \title{Monotone Dark Theme}
  6. \usage{
  7. style_mono_dark(
  8. base_color = "#cbf7ed",
  9. white_color = lighten_color(base_color, 0.8),
  10. black_color = darken_color(base_color, 0.85),
  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.7),
  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 #cbf7ed. 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 \code{lighten_color(base_color, 0.8)}. Used in
  83. multiple CSS rules. The value of this variable is also stored as a CSS
  84. variable that can be referenced with \code{var(--white)} in any argument of a
  85. style function or in custom CSS.}
  86. \item{black_color}{Darkest color used, default is a very dark, version of
  87. \code{base_color}. Defaults to \code{darken_color(base_color, 0.85)}. Used in
  88. multiple CSS rules. The value of this variable is also stored as a CSS
  89. variable that can be referenced with \code{var(--black)} in any argument of a
  90. style function or in custom CSS.}
  91. \item{text_color}{Text Color. Defaults to \code{white_color}. Modifies the \code{body}
  92. element. The value of this variable is also stored as a CSS variable that
  93. can be referenced with \code{var(--text_color)} in any argument of a style
  94. function or in custom CSS.}
  95. \item{header_color}{Header Color. Defaults to \code{base_color}. Modifies the
  96. \verb{h1, h2, h3} elements. The value of this variable is also stored as a CSS
  97. variable that can be referenced with \code{var(--header-color)} in any argument
  98. of a style function or in custom CSS.}
  99. \item{background_color}{Slide Background Color. Defaults to \code{black_color}.
  100. Modifies the \code{.remark-slide-content} class. The value of this variable is
  101. also stored as a CSS variable that can be referenced with
  102. \code{var(--background-color)} in any argument of a style function or in custom
  103. CSS.}
  104. \item{link_color}{Link Color. Defaults to \code{base_color}. Modifies the
  105. \verb{a, a > code} elements. The value of this variable is also stored as a CSS
  106. variable that can be referenced with \code{var(--link-color)} in any argument
  107. of a style function or in custom CSS.}
  108. \item{text_bold_color}{Bold Text Color. Defaults to \code{base_color}. Modifies
  109. the \code{strong} element. The value of this variable is also stored as a CSS
  110. variable that can be referenced with \code{var(--text-bold-color)} in any
  111. argument of a style function or in custom CSS.}
  112. \item{text_slide_number_color}{Slide Number Color. Defaults to \code{base_color}.
  113. Modifies the \code{.remark-slide-number} class.}
  114. \item{padding}{Slide Padding in \verb{top right [bottom left]} format. Defaults
  115. to 16px 64px 16px 64px. Modifies the \code{.remark-slide-content} class.}
  116. \item{background_image}{Background image applied to each \emph{and every} slide.
  117. Set \code{title_slide_background_image = "none"} to remove the background image
  118. from the title slide. Defaults to \code{NULL}. Modifies the
  119. \code{.remark-slide-content} class.}
  120. \item{background_size}{Background image size, requires \code{background_image} to
  121. be set. If \code{background_image} is set, \code{background_size} will default to
  122. \code{cover} so the backround fills the screen. If both \code{background_image} and
  123. \code{background_position} are set, will default to 100 percent. Defaults to
  124. \code{NULL}. Modifies the \code{.remark-slide-content} class.}
  125. \item{background_position}{Background image position, requires
  126. \code{background_image} to be set, and it is recommended to adjust
  127. \code{background_size}. Defaults to \code{NULL}. Modifies the
  128. \code{.remark-slide-content} class.}
  129. \item{code_highlight_color}{Code Line Highlight. Defaults to
  130. rgba(255,255,0,0.5). Modifies the \code{.remark-code-line-highlighted} class.
  131. The value of this variable is also stored as a CSS variable that can be
  132. referenced with \code{var(--code-highlight-color)} in any argument of a style
  133. function or in custom CSS.}
  134. \item{code_inline_color}{Inline Code Color. Defaults to \code{base_color}.
  135. Modifies the \code{.remark-inline-code} class.}
  136. \item{code_inline_background_color}{Inline Code Background Color. Defaults
  137. to \code{NULL}. Modifies the \code{.remark-inline-code} class.}
  138. \item{code_inline_font_size}{Inline Code Text Font Size. Defaults to 1em.
  139. Modifies the \code{.remark-inline-code} class. The value of this variable is
  140. also stored as a CSS variable that can be referenced with
  141. \code{var(--code-inline-font-size)} in any argument of a style function or in
  142. custom CSS.}
  143. \item{inverse_background_color}{Inverse Background Color. Defaults to
  144. \code{base_color}. Modifies the \code{.inverse} class. The value of this variable is
  145. also stored as a CSS variable that can be referenced with
  146. \code{var(--inverse-background-color)} in any argument of a style function or
  147. in custom CSS.}
  148. \item{inverse_text_color}{Inverse Text Color. Defaults to \code{black_color}.
  149. Modifies the \code{.inverse} class. The value of this variable is also stored
  150. as a CSS variable that can be referenced with \code{var(--inverse-text-color)}
  151. in any argument of a style function or in custom CSS.}
  152. \item{inverse_text_shadow}{Enables Shadow on text of inverse slides.
  153. Defaults to \code{FALSE}. Modifies the \code{.inverse} class.}
  154. \item{inverse_header_color}{Inverse Header Color. Defaults to \code{black_color}.
  155. Modifies the \verb{.inverse h1, .inverse h2, .inverse h3} classes. The value of
  156. this variable is also stored as a CSS variable that can be referenced with
  157. \code{var(--inverse-header-color)} in any argument of a style function or in
  158. custom CSS.}
  159. \item{title_slide_text_color}{Title Slide Text Color. Defaults to
  160. \code{inverse_text_color}. Modifies the \code{.title-slide} class. The value of this
  161. variable is also stored as a CSS variable that can be referenced with
  162. \code{var(--title-slide-text-color)} in any argument of a style function or in
  163. custom CSS.}
  164. \item{title_slide_background_color}{Title Slide Background Color. Defaults
  165. to \code{inverse_background_color}. Modifies the \code{.title-slide} class. The
  166. value of this variable is also stored as a CSS variable that can be
  167. referenced with \code{var(--title-slide-background-color)} in any argument of a
  168. style function or in custom CSS.}
  169. \item{title_slide_background_image}{Title Slide Background Image URL.
  170. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  171. \item{title_slide_background_size}{Title Slide Background Image Size,
  172. defaults to "cover" if background image is set. Defaults to \code{NULL}.
  173. Modifies the \code{.title-slide} class.}
  174. \item{title_slide_background_position}{Title Slide Background Image
  175. Position. Defaults to \code{NULL}. Modifies the \code{.title-slide} class.}
  176. \item{footnote_color}{Footnote text color (if \code{NA}, then it will be the same
  177. color as \code{text_color}). Defaults to \code{NULL}. Modifies the \code{.footnote}
  178. class.}
  179. \item{footnote_font_size}{Footnote font size. Defaults to 0.9em. Modifies
  180. the \code{.footnote} class.}
  181. \item{footnote_position_bottom}{Footnote location from bottom of screen.
  182. Defaults to 60px. Modifies the \code{.footnote} class.}
  183. \item{left_column_subtle_color}{Left Column Text (not last). Defaults to
  184. \code{apply_alpha(base_color, 0.6)}. Modifies the
  185. \verb{.left-column h2, .left-column h3} classes.}
  186. \item{left_column_selected_color}{Left Column Current Selection. Defaults to
  187. \code{base_color}. Modifies the
  188. \verb{.left-column h2:last-of-type, .left-column h3:last-child} classes.}
  189. \item{blockquote_left_border_color}{Blockquote Left Border Color. Defaults
  190. to \code{apply_alpha(base_color, 0.5)}. Modifies the \code{blockquote} element.}
  191. \item{table_border_color}{Table top/bottom border. Defaults to #666.
  192. Modifies the \verb{table: border-top, border-bottom} elements.}
  193. \item{table_row_border_color}{Table row inner bottom border. Defaults to
  194. #ddd. Modifies the \verb{table thead th: border-bottom} elements.}
  195. \item{table_row_even_background_color}{Table Even Row Background Color.
  196. Defaults to \code{darken_color(base_color, 0.7)}. Modifies the
  197. \verb{thead, tfoot, tr:nth-child(even)} elements.}
  198. \item{base_font_size}{Base Font Size for All Slide Elements (must be \code{px}).
  199. Defaults to 20px. Modifies the \code{html} element. The value of this variable
  200. is also stored as a CSS variable that can be referenced with
  201. \code{var(--base-font-size)} in any argument of a style function or in custom
  202. CSS.}
  203. \item{text_font_size}{Slide Body Text Font Size. Defaults to 1rem. Modifies
  204. the \code{.remark-slide-content} class. The value of this variable is also
  205. stored as a CSS variable that can be referenced with
  206. \code{var(--text-font-size)} in any argument of a style function or in custom
  207. CSS.}
  208. \item{header_h1_font_size}{h1 Header Text Font Size. Defaults to 2.75rem.
  209. Modifies the \verb{.remark-slide-content h1} class. The value of this variable
  210. is also stored as a CSS variable that can be referenced with
  211. \code{var(--header-h1-font-size)} in any argument of a style function or in
  212. custom CSS.}
  213. \item{header_h2_font_size}{h2 Header Text Font Size. Defaults to 2.25rem.
  214. Modifies the \verb{.remark-slide-content h2} class. The value of this variable
  215. is also stored as a CSS variable that can be referenced with
  216. \code{var(--header-h2-font-size)} in any argument of a style function or in
  217. custom CSS.}
  218. \item{header_h3_font_size}{h3 Header Text Font Size. Defaults to 1.75rem.
  219. Modifies the \verb{.remark-slide-content h3} class. The value of this variable
  220. is also stored as a CSS variable that can be referenced with
  221. \code{var(--header-h3-font-size)} in any argument of a style function or in
  222. custom CSS.}
  223. \item{header_background_auto}{Add background under slide title automatically
  224. for h1 header elements. If not enabled, use \code{class: header_background} to
  225. enable. Defaults to \code{FALSE}.}
  226. \item{header_background_color}{Background Color for h1 Header with
  227. Background. Defaults to \code{header_color}. Modifies the
  228. \verb{.remark-slide-content h1} class. The value of this variable is also
  229. stored as a CSS variable that can be referenced with
  230. \code{var(--header-background-color)} in any argument of a style function or in
  231. custom CSS.}
  232. \item{header_background_text_color}{Text Color for h1 Header with
  233. Background. Defaults to \code{background_color}. Modifies the
  234. \verb{.remark-slide-content h1} class. The value of this variable is also
  235. stored as a CSS variable that can be referenced with
  236. \code{var(--header-background-text-color)} in any argument of a style function
  237. or in custom CSS.}
  238. \item{header_background_padding}{Padding for h1 Header with Background.
  239. Defaults to \code{NULL}. Modifies the \verb{.remark-slide-content h1} class.}
  240. \item{header_background_content_padding_top}{Top Padding for Content in
  241. Slide with Header with Background. Defaults to 7rem. Modifies the
  242. \code{.remark-slide-content} class.}
  243. \item{header_background_ignore_classes}{Slide Classes Where Header with
  244. Background will not be Applied. Defaults to
  245. \code{c('normal', 'inverse', 'title', 'middle', 'bottom')}. Modifies the
  246. \code{.remark-slide-content} class.}
  247. \item{text_slide_number_font_size}{Slide Number Text Font Size. Defaults to
  248. 0.9em. Modifies the \code{.remark-slide-number} class.}
  249. \item{text_font_google}{Use \code{google_font()} to specify body font. Defaults
  250. to \code{NULL}. Modifies the \code{body} element.}
  251. \item{text_font_family}{Body Text Font Family (xaringan default is
  252. \code{'Droid Serif'}). Defaults to Noto Sans. Modifies the \code{body} element. The
  253. value of this variable is also stored as a CSS variable that can be
  254. referenced with \code{var(--text-font-family)} in any argument of a style
  255. function or in custom CSS.}
  256. \item{text_font_weight}{Body Text Font Weight. Defaults to normal. Modifies
  257. the \code{body} element.}
  258. \item{text_font_url}{Body Text Font URL(s). Defaults to
  259. https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap.
  260. Modifies the \verb{@import url()} elements.}
  261. \item{text_font_family_fallback}{Body Text Font Fallbacks. Defaults to
  262. -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
  263. helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the \code{body}
  264. element. The value of this variable is also stored as a CSS variable that
  265. can be referenced with \code{var(--text-font-family-fallback)} in any argument
  266. of a style function or in custom CSS.}
  267. \item{text_font_base}{Body Text Base Font (Total Failure Fallback). Defaults
  268. to sans-serif. Modifies the \code{body} element. The value of this variable is
  269. also stored as a CSS variable that can be referenced with
  270. \code{var(--text-font-base)} in any argument of a style function or in custom
  271. CSS.}
  272. \item{header_font_google}{Use \code{google_font()} to specify header font.
  273. Defaults to \code{NULL}. Modifies the \code{body} element.}
  274. \item{header_font_family}{Header Font Family (xaringan default is
  275. \code{'Yanone Kaffeesatz'}). Defaults to Cabin. Modifies the \verb{h1, h2, h3}
  276. elements. The value of this variable is also stored as a CSS variable that
  277. can be referenced with \code{var(--header-font-family)} in any argument of a
  278. style function or in custom CSS.}
  279. \item{header_font_weight}{Header Font Weight. Defaults to 600. Modifies the
  280. \verb{h1, h2, h3} elements.}
  281. \item{header_font_url}{Header Font URL. Defaults to
  282. https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap.
  283. Modifies the \verb{@import url} elements.}
  284. \item{code_font_google}{Use \code{google_font()} to specify code font. Defaults
  285. to \code{NULL}. Modifies the \code{body} element.}
  286. \item{code_font_family}{Code Font Family. Defaults to Source Code Pro.
  287. Modifies the \verb{.remark-code, .remark-inline-code} classes. The value of
  288. this variable is also stored as a CSS variable that can be referenced with
  289. \code{var(--code-font-family)} in any argument of a style function or in custom
  290. CSS.}
  291. \item{code_font_size}{Code Text Font Size. Defaults to 0.9rem. Modifies the
  292. \code{.remark-inline} class. The value of this variable is also stored as a CSS
  293. variable that can be referenced with \code{var(--code-font-size)} in any
  294. argument of a style function or in custom CSS.}
  295. \item{code_font_url}{Code Font URL. Defaults to
  296. https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap.
  297. Modifies the \verb{@import url} elements.}
  298. \item{code_font_family_fallback}{Code Font Fallback. Defaults to Menlo,
  299. Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
  300. \verb{.remark-code, .remark-inline-code} classes.}
  301. \item{colors}{A named vector of custom colors. The names of the colors
  302. become CSS variables and classes that can be used within your slides.
  303. For example, \code{colors = c(blue = "#bad4ed")} adds a CSS variable
  304. \code{--blue}, a \code{.blue} CSS class that applies the color to the text or
  305. foreground color, and a \code{.bg-blue} CSS class that applies the color
  306. to the background.}
  307. \item{extra_css}{A named list of CSS definitions each containing a named list
  308. of CSS property-value pairs, i.e.
  309. \code{list(".class-id" = list("css-property" = "value"))}.}
  310. \item{extra_fonts}{A list of additional fonts to import, each list element
  311. can be either a URL as a character string or a call to
  312. \code{\link{google_font}()}. To use a font imported in \code{extra_fonts}, you
  313. will need to write custom CSS rules that apply the font to an element or
  314. class with the \code{font-family} property. See the \strong{Fonts} section of
  315. \code{vignette("xaringanthemer")} for an example.}
  316. \item{outfile}{Customized xaringan CSS output file name, default is "xaringan-themer.css"}
  317. }
  318. \description{
  319. A dark monotone theme based around a single color.
  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_dark(
  334. base_color = "#cbf7ed",
  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_inverse}()},
  347. \code{\link{style_mono_accent}()},
  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_inverse}()},
  354. \code{\link{style_mono_accent}()},
  355. \code{\link{style_mono_light}()}
  356. }
  357. \concept{Monotone themes}
  358. \concept{themes}