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

612 lines
43KB

  1. <!DOCTYPE html>
  2. <!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><meta name="description" content="An default xaringan theme with a two colors used for color
  3. accents on select elements (headers, bold text, etc.)."><title>Duotone Accent Theme — style_duo_accent • xaringanthemer</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.1.0/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.0/bootstrap.bundle.min.js"></script><link href="../deps/_IBM%20Plex%20Mono-0.4.0/font.css" rel="stylesheet"><link href="../deps/_Poppins-0.4.0/font.css" rel="stylesheet"><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><meta property="og:title" content="Duotone Accent Theme — style_duo_accent"><meta property="og:description" content="An default xaringan theme with a two colors used for color
  4. accents on select elements (headers, bold text, etc.)."><meta property="og:image" content="https://pkg.garrickadenbuie.com/xaringanthemer/logo.png"><meta name="twitter:card" content="summary"><meta name="twitter:creator" content="@grrrck"><meta name="twitter:site" content="@grrrck"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
  5. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  6. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  7. <![endif]--></head><body>
  8. <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
  9. <nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
  10. <a class="navbar-brand me-2" href="../index.html">xaringanthemer</a>
  11. <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Released version">0.4.1</small>
  12. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
  13. <span class="navbar-toggler-icon"></span>
  14. </button>
  15. <div id="navbar" class="collapse navbar-collapse ms-2">
  16. <ul class="navbar-nav me-auto"><li class="nav-item">
  17. <a class="nav-link" href="../articles/xaringanthemer.html">Features</a>
  18. </li>
  19. <li class="active nav-item">
  20. <a class="nav-link" href="../reference/index.html">Reference</a>
  21. </li>
  22. <li class="nav-item dropdown">
  23. <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-themes">Themes</a>
  24. <div class="dropdown-menu" aria-labelledby="dropdown-themes">
  25. <h6 class="dropdown-header" data-toc-skip>Themes</h6>
  26. <a class="dropdown-item" href="../articles/themes.html">Slide Themes</a>
  27. <a class="dropdown-item" href="../articles/ggplot2-themes.html">ggplot2 Themes</a>
  28. <div class="dropdown-divider"></div>
  29. <h6 class="dropdown-header" data-toc-skip>More Customization</h6>
  30. <a class="dropdown-item" href="../articles/fonts.html">Fonts</a>
  31. <a class="dropdown-item" href="../articles/template-variables.html">Template Variables</a>
  32. </div>
  33. </li>
  34. </ul><form class="form-inline my-2 my-lg-0" role="search">
  35. <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
  36. <ul class="navbar-nav"><li class="nav-item dropdown">
  37. <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown--">
  38. <span class="far fa far fa-newspaper fa-lg"></span>
  39. </a>
  40. <div class="dropdown-menu" aria-labelledby="dropdown--">
  41. <a class="external-link dropdown-item" href="https://garrickadenbuie.com/blog/xaringanthemer-v0-3-0/">xaringanthemer 0.3.0</a>
  42. <div class="dropdown-divider"></div>
  43. <a class="dropdown-item" href="../news/index.html">Changelog</a>
  44. </div>
  45. </li>
  46. <li class="nav-item">
  47. <a class="external-link nav-link" href="https://github.com/gadenbuie/xaringanthemer">
  48. <span class="fab fa fab fa-github fa-lg"></span>
  49. </a>
  50. </li>
  51. <li class="nav-item">
  52. <a class="external-link nav-link" href="https://twitter.com/grrrck">
  53. <span class="fab fa fab fa-twitter fa-lg"></span>
  54. </a>
  55. </li>
  56. <li class="nav-item">
  57. <a class="external-link nav-link" href="https://www.garrickadenbuie.com">
  58. <span class="fas fa fas fa-home fa-lg"></span>
  59. </a>
  60. </li>
  61. </ul></div>
  62. </div>
  63. </nav><div class="container template-reference-topic">
  64. <div class="row">
  65. <main id="main" class="col-md-9"><div class="page-header">
  66. <img src="../logo.png" class="logo" alt=""><h1>Duotone Accent Theme</h1>
  67. <small class="dont-index">Source: <a href="https://github.com/gadenbuie/xaringanthemer/blob/HEAD/R/style_duo_accent.R" class="external-link"><code>R/style_duo_accent.R</code></a></small>
  68. <div class="d-none name"><code>style_duo_accent.Rd</code></div>
  69. </div>
  70. <div class="ref-description section level2">
  71. <p>An default xaringan theme with a two colors used for color
  72. accents on select elements (headers, bold text, etc.).</p>
  73. </div>
  74. <div class="section level2">
  75. <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
  76. <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">style_duo_accent</span><span class="op">(</span>
  77. primary_color <span class="op">=</span> <span class="st">"#035AA6"</span>,
  78. secondary_color <span class="op">=</span> <span class="st">"#03A696"</span>,
  79. white_color <span class="op">=</span> <span class="st">"#FFFFFF"</span>,
  80. black_color <span class="op">=</span> <span class="st">"#000000"</span>,
  81. text_color <span class="op">=</span> <span class="va">black_color</span>,
  82. header_color <span class="op">=</span> <span class="va">primary_color</span>,
  83. background_color <span class="op">=</span> <span class="va">white_color</span>,
  84. link_color <span class="op">=</span> <span class="fu"><a href="choose_dark_or_light.html">choose_dark_or_light</a></span><span class="op">(</span><span class="va">secondary_color</span>, <span class="va">primary_color</span>, <span class="va">secondary_color</span><span class="op">)</span>,
  85. text_bold_color <span class="op">=</span> <span class="fu"><a href="choose_dark_or_light.html">choose_dark_or_light</a></span><span class="op">(</span><span class="va">secondary_color</span>, <span class="va">primary_color</span>,
  86. <span class="va">secondary_color</span><span class="op">)</span>,
  87. text_slide_number_color <span class="op">=</span> <span class="va">primary_color</span>,
  88. padding <span class="op">=</span> <span class="st">"16px 64px 16px 64px"</span>,
  89. background_image <span class="op">=</span> <span class="cn">NULL</span>,
  90. background_size <span class="op">=</span> <span class="cn">NULL</span>,
  91. background_position <span class="op">=</span> <span class="cn">NULL</span>,
  92. code_highlight_color <span class="op">=</span> <span class="st">"rgba(255,255,0,0.5)"</span>,
  93. code_inline_color <span class="op">=</span> <span class="fu"><a href="choose_dark_or_light.html">choose_dark_or_light</a></span><span class="op">(</span><span class="va">secondary_color</span>, <span class="va">primary_color</span>,
  94. <span class="va">secondary_color</span><span class="op">)</span>,
  95. code_inline_background_color <span class="op">=</span> <span class="cn">NULL</span>,
  96. code_inline_font_size <span class="op">=</span> <span class="st">"1em"</span>,
  97. inverse_background_color <span class="op">=</span> <span class="va">secondary_color</span>,
  98. inverse_text_color <span class="op">=</span> <span class="fu"><a href="choose_dark_or_light.html">choose_dark_or_light</a></span><span class="op">(</span><span class="va">secondary_color</span>, <span class="va">black_color</span>, <span class="va">white_color</span><span class="op">)</span>,
  99. inverse_text_shadow <span class="op">=</span> <span class="cn">FALSE</span>,
  100. inverse_header_color <span class="op">=</span> <span class="fu"><a href="choose_dark_or_light.html">choose_dark_or_light</a></span><span class="op">(</span><span class="va">secondary_color</span>, <span class="va">black_color</span>,
  101. <span class="va">white_color</span><span class="op">)</span>,
  102. inverse_link_color <span class="op">=</span> <span class="va">link_color</span>,
  103. title_slide_text_color <span class="op">=</span> <span class="fu"><a href="choose_dark_or_light.html">choose_dark_or_light</a></span><span class="op">(</span><span class="va">primary_color</span>, <span class="va">black_color</span>,
  104. <span class="va">white_color</span><span class="op">)</span>,
  105. title_slide_background_color <span class="op">=</span> <span class="va">primary_color</span>,
  106. title_slide_background_image <span class="op">=</span> <span class="cn">NULL</span>,
  107. title_slide_background_size <span class="op">=</span> <span class="cn">NULL</span>,
  108. title_slide_background_position <span class="op">=</span> <span class="cn">NULL</span>,
  109. footnote_color <span class="op">=</span> <span class="cn">NULL</span>,
  110. footnote_font_size <span class="op">=</span> <span class="st">"0.9em"</span>,
  111. footnote_position_bottom <span class="op">=</span> <span class="st">"60px"</span>,
  112. left_column_subtle_color <span class="op">=</span> <span class="fu"><a href="apply_alpha.html">apply_alpha</a></span><span class="op">(</span><span class="va">primary_color</span>, <span class="fl">0.6</span><span class="op">)</span>,
  113. left_column_selected_color <span class="op">=</span> <span class="va">primary_color</span>,
  114. blockquote_left_border_color <span class="op">=</span> <span class="fu"><a href="apply_alpha.html">apply_alpha</a></span><span class="op">(</span><span class="va">secondary_color</span>, <span class="fl">0.5</span><span class="op">)</span>,
  115. table_border_color <span class="op">=</span> <span class="st">"#666"</span>,
  116. table_row_border_color <span class="op">=</span> <span class="st">"#ddd"</span>,
  117. table_row_even_background_color <span class="op">=</span> <span class="fu"><a href="lighten_darken_color.html">lighten_color</a></span><span class="op">(</span><span class="va">secondary_color</span>, <span class="fl">0.8</span><span class="op">)</span>,
  118. base_font_size <span class="op">=</span> <span class="st">"20px"</span>,
  119. text_font_size <span class="op">=</span> <span class="st">"1rem"</span>,
  120. header_h1_font_size <span class="op">=</span> <span class="st">"2.75rem"</span>,
  121. header_h2_font_size <span class="op">=</span> <span class="st">"2.25rem"</span>,
  122. header_h3_font_size <span class="op">=</span> <span class="st">"1.75rem"</span>,
  123. header_background_auto <span class="op">=</span> <span class="cn">FALSE</span>,
  124. header_background_color <span class="op">=</span> <span class="va">header_color</span>,
  125. header_background_text_color <span class="op">=</span> <span class="va">background_color</span>,
  126. header_background_padding <span class="op">=</span> <span class="cn">NULL</span>,
  127. header_background_content_padding_top <span class="op">=</span> <span class="st">"7rem"</span>,
  128. header_background_ignore_classes <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"normal"</span>, <span class="st">"inverse"</span>, <span class="st">"title"</span>, <span class="st">"middle"</span>,
  129. <span class="st">"bottom"</span><span class="op">)</span>,
  130. text_slide_number_font_size <span class="op">=</span> <span class="st">"0.9rem"</span>,
  131. text_font_google <span class="op">=</span> <span class="cn">NULL</span>,
  132. text_font_family <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"text_font_family"</span><span class="op">)</span>,
  133. text_font_weight <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"text_font_weight"</span><span class="op">)</span>,
  134. text_bold_font_weight <span class="op">=</span> <span class="st">"bold"</span>,
  135. text_font_url <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"text_font_url"</span><span class="op">)</span>,
  136. text_font_family_fallback <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"text_font_family_fallback"</span><span class="op">)</span>,
  137. text_font_base <span class="op">=</span> <span class="st">"sans-serif"</span>,
  138. header_font_google <span class="op">=</span> <span class="cn">NULL</span>,
  139. header_font_family <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"header_font_family"</span><span class="op">)</span>,
  140. header_font_weight <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"header_font_weight"</span><span class="op">)</span>,
  141. header_font_family_fallback <span class="op">=</span> <span class="st">"Georgia, serif"</span>,
  142. header_font_url <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"header_font_url"</span><span class="op">)</span>,
  143. code_font_google <span class="op">=</span> <span class="cn">NULL</span>,
  144. code_font_family <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"code_font_family"</span><span class="op">)</span>,
  145. code_font_size <span class="op">=</span> <span class="st">"0.9rem"</span>,
  146. code_font_url <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"code_font_url"</span><span class="op">)</span>,
  147. code_font_family_fallback <span class="op">=</span> <span class="fu"><a href="style_xaringan.html">xaringanthemer_font_default</a></span><span class="op">(</span><span class="st">"code_font_family_fallback"</span><span class="op">)</span>,
  148. link_decoration <span class="op">=</span> <span class="st">"none"</span>,
  149. colors <span class="op">=</span> <span class="cn">NULL</span>,
  150. extra_css <span class="op">=</span> <span class="cn">NULL</span>,
  151. extra_fonts <span class="op">=</span> <span class="cn">NULL</span>,
  152. outfile <span class="op">=</span> <span class="st">"xaringan-themer.css"</span>
  153. <span class="op">)</span></code></pre></div>
  154. </div>
  155. <div class="section level2">
  156. <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
  157. <dl><dt>primary_color</dt>
  158. <dd><p>Duotone Primary Color. Defaults to #035AA6. Used in
  159. multiple CSS rules. The value of this variable is also stored as a CSS
  160. variable that can be referenced with <code>var(--primary)</code> in any argument of a
  161. style function or in custom CSS.</p></dd>
  162. <dt>secondary_color</dt>
  163. <dd><p>Duotone Secondary Color. Defaults to #03A696. Used in
  164. multiple CSS rules. The value of this variable is also stored as a CSS
  165. variable that can be referenced with <code>var(--secondary)</code> in any argument of
  166. a style function or in custom CSS.</p></dd>
  167. <dt>white_color</dt>
  168. <dd><p>Brightest color used. Defaults to #FFFFFF. Used in
  169. multiple CSS rules. The value of this variable is also stored as a CSS
  170. variable that can be referenced with <code>var(--white)</code> in any argument of a
  171. style function or in custom CSS.</p></dd>
  172. <dt>black_color</dt>
  173. <dd><p>Darkest color used. Defaults to #000000. Used in multiple
  174. CSS rules. The value of this variable is also stored as a CSS variable
  175. that can be referenced with <code>var(--black)</code> in any argument of a style
  176. function or in custom CSS.</p></dd>
  177. <dt>text_color</dt>
  178. <dd><p>Text Color. Defaults to <code>black_color</code>. Modifies the <code>body</code>
  179. element. The value of this variable is also stored as a CSS variable that
  180. can be referenced with <code>var(--text_color)</code> in any argument of a style
  181. function or in custom CSS.</p></dd>
  182. <dt>header_color</dt>
  183. <dd><p>Header Color. Defaults to <code>primary_color</code>. Modifies the
  184. <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS
  185. variable that can be referenced with <code>var(--header-color)</code> in any argument
  186. of a style function or in custom CSS.</p></dd>
  187. <dt>background_color</dt>
  188. <dd><p>Slide Background Color. Defaults to <code>white_color</code>.
  189. Modifies the <code>.remark-slide-content</code> class. The value of this variable is
  190. also stored as a CSS variable that can be referenced with
  191. <code>var(--background-color)</code> in any argument of a style function or in custom
  192. CSS.</p></dd>
  193. <dt>link_color</dt>
  194. <dd><p>Link Color. Defaults to
  195. <code>choose_dark_or_light(secondary_color, primary_color, secondary_color)</code>.
  196. Modifies the <code>a, a &gt; code</code> elements. The value of this variable is also
  197. stored as a CSS variable that can be referenced with <code>var(--link-color)</code>
  198. in any argument of a style function or in custom CSS.</p></dd>
  199. <dt>text_bold_color</dt>
  200. <dd><p>Bold Text Color. Defaults to
  201. <code>choose_dark_or_light(secondary_color, primary_color, secondary_color)</code>.
  202. Modifies the <code>strong</code> element. The value of this variable is also stored
  203. as a CSS variable that can be referenced with <code>var(--text-bold-color)</code> in
  204. any argument of a style function or in custom CSS.</p></dd>
  205. <dt>text_slide_number_color</dt>
  206. <dd><p>Slide Number Color. Defaults to
  207. <code>primary_color</code>. Modifies the <code>.remark-slide-number</code> class.</p></dd>
  208. <dt>padding</dt>
  209. <dd><p>Slide Padding in <code>top right [bottom left]</code> format. Defaults
  210. to 16px 64px 16px 64px. Modifies the <code>.remark-slide-content</code> class.
  211. Accepts CSS
  212. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding" class="external-link">padding</a>
  213. property values.</p></dd>
  214. <dt>background_image</dt>
  215. <dd><p>Background image applied to each <em>and every</em> slide.
  216. Set <code>title_slide_background_image = "none"</code> to remove the background image
  217. from the title slide. Defaults to <code>NULL</code>. Modifies the
  218. <code>.remark-slide-content</code> class.</p></dd>
  219. <dt>background_size</dt>
  220. <dd><p>Background image size, requires <code>background_image</code> to
  221. be set. If <code>background_image</code> is set, <code>background_size</code> will default to
  222. <code>cover</code> so the background fills the screen. If both <code>background_image</code> and
  223. <code>background_position</code> are set, will default to 100 percent. Defaults to
  224. <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class. Accepts CSS
  225. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-size" class="external-link">background-size</a>
  226. property values.</p></dd>
  227. <dt>background_position</dt>
  228. <dd><p>Background image position, requires
  229. <code>background_image</code> to be set, and it is recommended to adjust
  230. <code>background_size</code>. Defaults to <code>NULL</code>. Modifies the
  231. <code>.remark-slide-content</code> class. Accepts CSS
  232. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-position" class="external-link">background-position</a>
  233. property values.</p></dd>
  234. <dt>code_highlight_color</dt>
  235. <dd><p>Code Line Highlight. Defaults to
  236. rgba(255,255,0,0.5). Modifies the <code>.remark-code-line-highlighted</code> class.
  237. The value of this variable is also stored as a CSS variable that can be
  238. referenced with <code>var(--code-highlight-color)</code> in any argument of a style
  239. function or in custom CSS.</p></dd>
  240. <dt>code_inline_color</dt>
  241. <dd><p>Inline Code Color. Defaults to
  242. <code>choose_dark_or_light(secondary_color, primary_color, secondary_color)</code>.
  243. Modifies the <code>.remark-inline-code</code> class.</p></dd>
  244. <dt>code_inline_background_color</dt>
  245. <dd><p>Inline Code Background Color. Defaults
  246. to <code>NULL</code>. Modifies the <code>.remark-inline-code</code> class.</p></dd>
  247. <dt>code_inline_font_size</dt>
  248. <dd><p>Inline Code Text Font Size. Defaults to 1em.
  249. Modifies the <code>.remark-inline-code</code> class. Accepts CSS
  250. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  251. property values. The value of this variable is also stored as a CSS
  252. variable that can be referenced with <code>var(--code-inline-font-size)</code> in any
  253. argument of a style function or in custom CSS.</p></dd>
  254. <dt>inverse_background_color</dt>
  255. <dd><p>Inverse Background Color. Defaults to
  256. <code>secondary_color</code>. Modifies the <code>.inverse</code> class. The value of this
  257. variable is also stored as a CSS variable that can be referenced with
  258. <code>var(--inverse-background-color)</code> in any argument of a style function or
  259. in custom CSS.</p></dd>
  260. <dt>inverse_text_color</dt>
  261. <dd><p>Inverse Text Color. Defaults to
  262. <code>choose_dark_or_light(secondary_color, black_color, white_color)</code>.
  263. Modifies the <code>.inverse</code> class. The value of this variable is also stored
  264. as a CSS variable that can be referenced with <code>var(--inverse-text-color)</code>
  265. in any argument of a style function or in custom CSS.</p></dd>
  266. <dt>inverse_text_shadow</dt>
  267. <dd><p>Enables Shadow on text of inverse slides.
  268. Defaults to <code>FALSE</code>. Modifies the <code>.inverse</code> class.</p></dd>
  269. <dt>inverse_header_color</dt>
  270. <dd><p>Inverse Header Color. Defaults to
  271. <code>choose_dark_or_light(secondary_color, black_color, white_color)</code>.
  272. Modifies the <code>.inverse h1, .inverse h2, .inverse h3</code> classes. The value of
  273. this variable is also stored as a CSS variable that can be referenced with
  274. <code>var(--inverse-header-color)</code> in any argument of a style function or in
  275. custom CSS.</p></dd>
  276. <dt>inverse_link_color</dt>
  277. <dd><p>Inverse Link Color. Defaults to <code>link_color</code>.
  278. Modifies the <code>.inverse a, .inverse a &gt; code</code> classes. The value of this
  279. variable is also stored as a CSS variable that can be referenced with
  280. <code>var(--inverse-link-color)</code> in any argument of a style function or in
  281. custom CSS.</p></dd>
  282. <dt>title_slide_text_color</dt>
  283. <dd><p>Title Slide Text Color. Defaults to
  284. <code>choose_dark_or_light(primary_color, black_color, white_color)</code>. Modifies
  285. the <code>.title-slide</code> class. The value of this variable is also stored as a
  286. CSS variable that can be referenced with <code>var(--title-slide-text-color)</code>
  287. in any argument of a style function or in custom CSS.</p></dd>
  288. <dt>title_slide_background_color</dt>
  289. <dd><p>Title Slide Background Color. Defaults
  290. to <code>primary_color</code>. Modifies the <code>.title-slide</code> class. The value of this
  291. variable is also stored as a CSS variable that can be referenced with
  292. <code>var(--title-slide-background-color)</code> in any argument of a style function
  293. or in custom CSS.</p></dd>
  294. <dt>title_slide_background_image</dt>
  295. <dd><p>Title Slide Background Image URL.
  296. Defaults to <code>NULL</code>. Modifies the <code>.title-slide</code> class.</p></dd>
  297. <dt>title_slide_background_size</dt>
  298. <dd><p>Title Slide Background Image Size,
  299. defaults to "cover" if background image is set. Defaults to <code>NULL</code>.
  300. Modifies the <code>.title-slide</code> class. Accepts CSS
  301. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-size" class="external-link">background-size</a>
  302. property values.</p></dd>
  303. <dt>title_slide_background_position</dt>
  304. <dd><p>Title Slide Background Image
  305. Position. Defaults to <code>NULL</code>. Modifies the <code>.title-slide</code> class. Accepts
  306. CSS
  307. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-position" class="external-link">background-position</a>
  308. property values.</p></dd>
  309. <dt>footnote_color</dt>
  310. <dd><p>Footnote text color (if <code>NA</code>, then it will be the same
  311. color as <code>text_color</code>). Defaults to <code>NULL</code>. Modifies the <code>.footnote</code>
  312. class.</p></dd>
  313. <dt>footnote_font_size</dt>
  314. <dd><p>Footnote font size. Defaults to 0.9em. Modifies
  315. the <code>.footnote</code> class. Accepts CSS
  316. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  317. property values.</p></dd>
  318. <dt>footnote_position_bottom</dt>
  319. <dd><p>Footnote location from bottom of screen.
  320. Defaults to 60px. Modifies the <code>.footnote</code> class. Accepts CSS
  321. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position_value" class="external-link">position</a>
  322. property values.</p></dd>
  323. <dt>left_column_subtle_color</dt>
  324. <dd><p>Left Column Text (not last). Defaults to
  325. <code>apply_alpha(primary_color, 0.6)</code>. Modifies the
  326. <code>.left-column h2, .left-column h3</code> classes.</p></dd>
  327. <dt>left_column_selected_color</dt>
  328. <dd><p>Left Column Current Selection. Defaults to
  329. <code>primary_color</code>. Modifies the
  330. <code>.left-column h2:last-of-type, .left-column h3:last-child</code> classes.</p></dd>
  331. <dt>blockquote_left_border_color</dt>
  332. <dd><p>Blockquote Left Border Color. Defaults
  333. to <code>apply_alpha(secondary_color, 0.5)</code>. Modifies the <code>blockquote</code> element.</p></dd>
  334. <dt>table_border_color</dt>
  335. <dd><p>Table top/bottom border. Defaults to #666.
  336. Modifies the <code>table: border-top, border-bottom</code> elements.</p></dd>
  337. <dt>table_row_border_color</dt>
  338. <dd><p>Table row inner bottom border. Defaults to
  339. #ddd. Modifies the <code>table thead th: border-bottom</code> elements.</p></dd>
  340. <dt>table_row_even_background_color</dt>
  341. <dd><p>Table Even Row Background Color.
  342. Defaults to <code>lighten_color(secondary_color, 0.8)</code>. Modifies the
  343. <code>thead, tfoot, tr:nth-child(even)</code> elements.</p></dd>
  344. <dt>base_font_size</dt>
  345. <dd><p>Base Font Size for All Slide Elements (must be <code>px</code>).
  346. Defaults to 20px. Modifies the <code>html</code> element. The value of this variable
  347. is also stored as a CSS variable that can be referenced with
  348. <code>var(--base-font-size)</code> in any argument of a style function or in custom
  349. CSS.</p></dd>
  350. <dt>text_font_size</dt>
  351. <dd><p>Slide Body Text Font Size. Defaults to 1rem. Modifies
  352. the <code>.remark-slide-content</code> class. Accepts CSS
  353. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  354. property values. The value of this variable is also stored as a CSS
  355. variable that can be referenced with <code>var(--text-font-size)</code> in any
  356. argument of a style function or in custom CSS.</p></dd>
  357. <dt>header_h1_font_size</dt>
  358. <dd><p>h1 Header Text Font Size. Defaults to 2.75rem.
  359. Modifies the <code>.remark-slide-content h1</code> class. Accepts CSS
  360. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  361. property values. The value of this variable is also stored as a CSS
  362. variable that can be referenced with <code>var(--header-h1-font-size)</code> in any
  363. argument of a style function or in custom CSS.</p></dd>
  364. <dt>header_h2_font_size</dt>
  365. <dd><p>h2 Header Text Font Size. Defaults to 2.25rem.
  366. Modifies the <code>.remark-slide-content h2</code> class. Accepts CSS
  367. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  368. property values. The value of this variable is also stored as a CSS
  369. variable that can be referenced with <code>var(--header-h2-font-size)</code> in any
  370. argument of a style function or in custom CSS.</p></dd>
  371. <dt>header_h3_font_size</dt>
  372. <dd><p>h3 Header Text Font Size. Defaults to 1.75rem.
  373. Modifies the <code>.remark-slide-content h3</code> class. Accepts CSS
  374. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  375. property values. The value of this variable is also stored as a CSS
  376. variable that can be referenced with <code>var(--header-h3-font-size)</code> in any
  377. argument of a style function or in custom CSS.</p></dd>
  378. <dt>header_background_auto</dt>
  379. <dd><p>Add background under slide title automatically
  380. for h1 header elements. If not enabled, use <code>class: header_background</code> to
  381. enable. Defaults to <code>FALSE</code>.</p></dd>
  382. <dt>header_background_color</dt>
  383. <dd><p>Background Color for h1 Header with
  384. Background. Defaults to <code>header_color</code>. Modifies the
  385. <code>.remark-slide-content h1</code> class. The value of this variable is also
  386. stored as a CSS variable that can be referenced with
  387. <code>var(--header-background-color)</code> in any argument of a style function or in
  388. custom CSS.</p></dd>
  389. <dt>header_background_text_color</dt>
  390. <dd><p>Text Color for h1 Header with
  391. Background. Defaults to <code>background_color</code>. Modifies the
  392. <code>.remark-slide-content h1</code> class. The value of this variable is also
  393. stored as a CSS variable that can be referenced with
  394. <code>var(--header-background-text-color)</code> in any argument of a style function
  395. or in custom CSS.</p></dd>
  396. <dt>header_background_padding</dt>
  397. <dd><p>Padding for h1 Header with Background.
  398. Defaults to <code>NULL</code>. Modifies the <code>.remark-slide-content h1</code> class. Accepts
  399. CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding" class="external-link">padding</a>
  400. property values.</p></dd>
  401. <dt>header_background_content_padding_top</dt>
  402. <dd><p>Top Padding for Content in
  403. Slide with Header with Background. Defaults to 7rem. Modifies the
  404. <code>.remark-slide-content</code> class.</p></dd>
  405. <dt>header_background_ignore_classes</dt>
  406. <dd><p>Slide Classes Where Header with
  407. Background will not be Applied. Defaults to
  408. <code>c('normal', 'inverse', 'title', 'middle', 'bottom')</code>. Modifies the
  409. <code>.remark-slide-content</code> class.</p></dd>
  410. <dt>text_slide_number_font_size</dt>
  411. <dd><p>Slide Number Text Font Size. Defaults to
  412. 0.9rem. Modifies the <code>.remark-slide-number</code> class. Accepts CSS
  413. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  414. property values.</p></dd>
  415. <dt>text_font_google</dt>
  416. <dd><p>Use <code><a href="google_font.html">google_font()</a></code> to specify body font. Defaults
  417. to <code>NULL</code>. Modifies the <code>body</code> element.</p></dd>
  418. <dt>text_font_family</dt>
  419. <dd><p>Body Text Font Family (xaringan default is
  420. <code>'Droid Serif'</code>). Defaults to
  421. <code>xaringanthemer_font_default("text_font_family")</code>. Modifies the <code>body</code>
  422. element. The value of this variable is also stored as a CSS variable that
  423. can be referenced with <code>var(--text-font-family)</code> in any argument of a
  424. style function or in custom CSS.</p></dd>
  425. <dt>text_font_weight</dt>
  426. <dd><p>Body Text Font Weight. Defaults to
  427. <code>xaringanthemer_font_default("text_font_weight")</code>. Modifies the <code>body</code>
  428. element. Accepts CSS
  429. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight" class="external-link">font-weight</a>
  430. property values.</p></dd>
  431. <dt>text_bold_font_weight</dt>
  432. <dd><p>Body Bold Text Font Weight. Defaults to bold.
  433. Modifies the <code>strong</code> element.</p></dd>
  434. <dt>text_font_url</dt>
  435. <dd><p>Body Text Font URL(s). Defaults to
  436. <code>xaringanthemer_font_default("text_font_url")</code>. Modifies the
  437. <code>@import url()</code> elements.</p></dd>
  438. <dt>text_font_family_fallback</dt>
  439. <dd><p>Body Text Font Fallbacks. Defaults to
  440. <code>xaringanthemer_font_default("text_font_family_fallback")</code>. Modifies the
  441. <code>body</code> element. The value of this variable is also stored as a CSS
  442. variable that can be referenced with <code>var(--text-font-family-fallback)</code> in
  443. any argument of a style function or in custom CSS.</p></dd>
  444. <dt>text_font_base</dt>
  445. <dd><p>Body Text Base Font (Total Failure Fallback). Defaults
  446. to sans-serif. Modifies the <code>body</code> element. The value of this variable is
  447. also stored as a CSS variable that can be referenced with
  448. <code>var(--text-font-base)</code> in any argument of a style function or in custom
  449. CSS.</p></dd>
  450. <dt>header_font_google</dt>
  451. <dd><p>Use <code><a href="google_font.html">google_font()</a></code> to specify header font.
  452. Defaults to <code>NULL</code>. Modifies the <code>body</code> element.</p></dd>
  453. <dt>header_font_family</dt>
  454. <dd><p>Header Font Family (xaringan default is
  455. <code>'Yanone Kaffeesatz'</code>). Defaults to
  456. <code>xaringanthemer_font_default("header_font_family")</code>. Modifies the
  457. <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS
  458. variable that can be referenced with <code>var(--header-font-family)</code> in any
  459. argument of a style function or in custom CSS.</p></dd>
  460. <dt>header_font_weight</dt>
  461. <dd><p>Header Font Weight. Defaults to
  462. <code>xaringanthemer_font_default("header_font_weight")</code>. Modifies the
  463. <code>h1, h2, h3</code> elements. Accepts CSS
  464. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight" class="external-link">font-weight</a>
  465. property values.</p></dd>
  466. <dt>header_font_family_fallback</dt>
  467. <dd><p>Header Font Family Fallback. Defaults to
  468. Georgia, serif. Modifies the <code>h1, h2, h3</code> elements. The value of this
  469. variable is also stored as a CSS variable that can be referenced with
  470. <code>var(--header-font-family-fallback)</code> in any argument of a style function
  471. or in custom CSS.</p></dd>
  472. <dt>header_font_url</dt>
  473. <dd><p>Header Font URL. Defaults to
  474. <code>xaringanthemer_font_default("header_font_url")</code>. Modifies the
  475. <code>@import url</code> elements.</p></dd>
  476. <dt>code_font_google</dt>
  477. <dd><p>Use <code><a href="google_font.html">google_font()</a></code> to specify code font. Defaults
  478. to <code>NULL</code>. Modifies the <code>body</code> element.</p></dd>
  479. <dt>code_font_family</dt>
  480. <dd><p>Code Font Family. Defaults to
  481. <code>xaringanthemer_font_default("code_font_family")</code>. Modifies the
  482. <code>.remark-code, .remark-inline-code</code> classes. The value of this variable is
  483. also stored as a CSS variable that can be referenced with
  484. <code>var(--code-font-family)</code> in any argument of a style function or in custom
  485. CSS.</p></dd>
  486. <dt>code_font_size</dt>
  487. <dd><p>Code Text Font Size. Defaults to 0.9rem. Modifies the
  488. <code>.remark-inline</code> class. Accepts CSS
  489. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/font-size" class="external-link">font-size</a>
  490. property values. The value of this variable is also stored as a CSS
  491. variable that can be referenced with <code>var(--code-font-size)</code> in any
  492. argument of a style function or in custom CSS.</p></dd>
  493. <dt>code_font_url</dt>
  494. <dd><p>Code Font URL. Defaults to
  495. <code>xaringanthemer_font_default("code_font_url")</code>. Modifies the <code>@import url</code>
  496. elements.</p></dd>
  497. <dt>code_font_family_fallback</dt>
  498. <dd><p>Code Font Fallback. Defaults to
  499. <code>xaringanthemer_font_default("code_font_family_fallback")</code>. Modifies the
  500. <code>.remark-code, .remark-inline-code</code> classes.</p></dd>
  501. <dt>link_decoration</dt>
  502. <dd><p>Text decoration of links. Defaults to none. Modifies
  503. the <code>a, a &gt; code</code> elements. Accepts CSS
  504. <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration" class="external-link">text-decoration</a>
  505. property values.</p></dd>
  506. <dt>colors</dt>
  507. <dd><p>A named vector of custom colors. The names of the colors
  508. become CSS variables and classes that can be used within your slides.
  509. For example, <code>colors = c(blue = "#bad4ed")</code> adds a CSS variable
  510. <code>--blue</code>, a <code>.blue</code> CSS class that applies the color to the text or
  511. foreground color, and a <code>.bg-blue</code> CSS class that applies the color
  512. to the background.</p></dd>
  513. <dt>extra_css</dt>
  514. <dd><p>A named list of CSS definitions each containing a named list
  515. of CSS property-value pairs, i.e.
  516. <code>list(".class-id" = list("css-property" = "value"))</code>.</p></dd>
  517. <dt>extra_fonts</dt>
  518. <dd><p>A list of additional fonts to import, each list element
  519. can be either a URL as a character string or a call to
  520. <code><a href="google_font.html">google_font</a>()</code>. To use a font imported in <code>extra_fonts</code>, you
  521. will need to write custom CSS rules that apply the font to an element or
  522. class with the <code>font-family</code> property. See the <strong>Fonts</strong> section of
  523. <code><a href="../articles/xaringanthemer.html">vignette("xaringanthemer")</a></code> for an example.</p></dd>
  524. <dt>outfile</dt>
  525. <dd><p>Customized xaringan CSS output file name, default is "xaringan-themer.css"</p></dd>
  526. </dl></div>
  527. <div class="section level2">
  528. <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
  529. <p>The CSS styles are written to the file path provided in <code>outfile</code>(by default to <code>xaringan-themer.css</code>). If <code>outfile</code> is <code>NULL</code>, the CSS is
  530. returned directly as a character string.</p>
  531. </div>
  532. <div class="section level2">
  533. <h2 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a></h2>
  534. <p>To use the styles created by this theme function, make sure
  535. that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML
  536. header. If you change the name of the output file using the <code>outfile</code>
  537. argument, use that name instead of the default file name.</p><div class="sourceCode yaml"><pre><code><span id="cb1-1"><a href="#cb1-1"></a><span class="fu">output</span><span class="kw">:</span></span>
  538. <span id="cb1-2"><a href="#cb1-2"></a><span class="at">xaringan:</span><span class="fu">:moon_reader</span><span class="kw">:</span></span>
  539. <span id="cb1-3"><a href="#cb1-3"></a><span class="at"> </span><span class="fu">css</span><span class="kw">:</span><span class="at"> xaringan-themer.css</span></span></code></pre><p></p></div>
  540. </div>
  541. <div class="section level2">
  542. <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
  543. <div class="dont-index"><p>Other themes:
  544. <code><a href="style_duo_accent_inverse.html">style_duo_accent_inverse</a>()</code>,
  545. <code><a href="style_duo.html">style_duo</a>()</code>,
  546. <code><a href="style_mono_accent_inverse.html">style_mono_accent_inverse</a>()</code>,
  547. <code><a href="style_mono_accent.html">style_mono_accent</a>()</code>,
  548. <code><a href="style_mono_dark.html">style_mono_dark</a>()</code>,
  549. <code><a href="style_mono_light.html">style_mono_light</a>()</code>,
  550. <code><a href="style_solarized_dark.html">style_solarized_dark</a>()</code>,
  551. <code><a href="style_solarized_light.html">style_solarized_light</a>()</code>,
  552. <code><a href="style_xaringan.html">xaringanthemer_font_default</a>()</code></p>
  553. <p>Other Duotone themes:
  554. <code><a href="style_duo_accent_inverse.html">style_duo_accent_inverse</a>()</code>,
  555. <code><a href="style_duo.html">style_duo</a>()</code></p></div>
  556. </div>
  557. <div class="section level2">
  558. <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
  559. <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="co"># Create a xaringan style in a temporary file</span></span>
  560. <span class="r-in"><span class="va">xaringan_themer_css</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempfile</a></span><span class="op">(</span><span class="st">"xaringan-themer-"</span>, fileext <span class="op">=</span> <span class="st">".css"</span><span class="op">)</span></span>
  561. <span class="r-in"></span>
  562. <span class="r-in"><span class="fu">style_duo_accent</span><span class="op">(</span></span>
  563. <span class="r-in"> primary_color <span class="op">=</span> <span class="st">"#006747"</span>,</span>
  564. <span class="r-in"> secondary_color <span class="op">=</span> <span class="st">"#cfc493"</span>,</span>
  565. <span class="r-in"> outfile <span class="op">=</span> <span class="va">xaringan_themer_css</span> <span class="co"># omit in your slides to write the</span></span>
  566. <span class="r-in"> <span class="co"># styles to xaringan-themer.css</span></span>
  567. <span class="r-in"><span class="op">)</span></span>
  568. <span class="r-in"></span>
  569. <span class="r-in"><span class="co"># View the CSS:</span></span>
  570. <span class="r-in"><span class="co"># file.edit(xaringan_themer_css)</span></span>
  571. </code></pre></div>
  572. </div>
  573. </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
  574. </nav></aside></div>
  575. <footer><div class="pkgdown-footer-left">
  576. <p></p><p>Developed by <a href="https://www.garrickadenbuie.com" class="external-link">Garrick Aden-Buie</a>.</p>
  577. </div>
  578. <div class="pkgdown-footer-right">
  579. <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.1.</p>
  580. </div>
  581. </footer></div>
  582. </body></html>