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

469 lines
21KB

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