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

700 lines
35KB

  1. <!-- Generated by pkgdown: do not edit by hand -->
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>Write A Customized Xaringan Theme — style_xaringan • xaringanthemer</title>
  9. <!-- jquery -->
  10. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
  11. <!-- Bootstrap -->
  12. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
  13. <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
  14. <!-- bootstrap-toc -->
  15. <link rel="stylesheet" href="../bootstrap-toc.css">
  16. <script src="../bootstrap-toc.js"></script>
  17. <!-- Font Awesome icons -->
  18. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
  19. <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" />
  20. <!-- clipboard.js -->
  21. <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
  22. <!-- headroom.js -->
  23. <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>
  24. <script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
  25. <!-- pkgdown -->
  26. <link href="../pkgdown.css" rel="stylesheet">
  27. <script src="../pkgdown.js"></script>
  28. <link href="../extra.css" rel="stylesheet">
  29. <meta property="og:title" content="Write A Customized Xaringan Theme — style_xaringan" />
  30. <meta property="og:description" content="Creates a customized Xaringan theme CSS file." />
  31. <meta name="robots" content="noindex">
  32. <!-- mathjax -->
  33. <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
  34. <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>
  35. <!--[if lt IE 9]>
  36. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  37. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  38. <![endif]-->
  39. </head>
  40. <body data-spy="scroll" data-target="#toc">
  41. <div class="container template-reference-topic">
  42. <header>
  43. <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  44. <div class="container">
  45. <div class="navbar-header">
  46. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
  47. <span class="sr-only">Toggle navigation</span>
  48. <span class="icon-bar"></span>
  49. <span class="icon-bar"></span>
  50. <span class="icon-bar"></span>
  51. </button>
  52. <span class="navbar-brand">
  53. <a class="navbar-link" href="../index.html">xaringanthemer</a>
  54. <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.2.0.9100</span>
  55. </span>
  56. </div>
  57. <div id="navbar" class="navbar-collapse collapse">
  58. <ul class="nav navbar-nav">
  59. <li>
  60. <a href="../articles/xaringanthemer.html">Get started</a>
  61. </li>
  62. <li>
  63. <a href="../reference/index.html">Reference</a>
  64. </li>
  65. <li>
  66. <a href="../articles/themes.html">Themes</a>
  67. </li>
  68. <li>
  69. <a href="../articles/fonts.html">Fonts</a>
  70. </li>
  71. <li>
  72. <a href="../articles/template-variables.html">Template Variables</a>
  73. </li>
  74. </ul>
  75. <ul class="nav navbar-nav navbar-right">
  76. <li>
  77. <a href="../news/index.html">
  78. <span class="fa fa fa fa-newspaper-o fa-lg"></span>
  79. </a>
  80. </li>
  81. <li>
  82. <a href="https://github.com/gadenbuie/xaringanthemer">
  83. <span class="fa fa-github fa-lg"></span>
  84. </a>
  85. </li>
  86. <li>
  87. <a href="https://twitter.com/grrrck">
  88. <span class="fa fa-twitter fa-lg"></span>
  89. </a>
  90. </li>
  91. <li>
  92. <a href="https://www.garrickadenbuie.com">
  93. <span class="fa fa-home fa-lg"></span>
  94. </a>
  95. </li>
  96. </ul>
  97. </div><!--/.nav-collapse -->
  98. </div><!--/.container -->
  99. </div><!--/.navbar -->
  100. </header>
  101. <div class="row">
  102. <div class="col-md-9 contents">
  103. <div class="page-header">
  104. <h1>Write A Customized Xaringan Theme</h1>
  105. <small class="dont-index">Source: <a href='https://github.com/gadenbuie/xaringanthemer/blob/master/R/style_xaringan.R'><code>R/style_xaringan.R</code></a></small>
  106. <div class="hidden name"><code>style_xaringan.Rd</code></div>
  107. </div>
  108. <div class="ref-description">
  109. <p>Creates a customized Xaringan theme CSS file.</p>
  110. </div>
  111. <pre class="usage"><span class='fu'>style_xaringan</span>(
  112. <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>,
  113. <span class='kw'>header_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>,
  114. <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='st'>"#FFF"</span>,
  115. <span class='kw'>link_color</span> <span class='kw'>=</span> <span class='st'>"rgb(249, 38, 114)"</span>,
  116. <span class='kw'>text_bold_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  117. <span class='kw'>text_slide_number_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>,
  118. <span class='kw'>padding</span> <span class='kw'>=</span> <span class='st'>"16px 64px 16px 64px"</span>,
  119. <span class='kw'>background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  120. <span class='kw'>background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  121. <span class='kw'>background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  122. <span class='kw'>code_highlight_color</span> <span class='kw'>=</span> <span class='st'>"rgba(255,255,0,0.5)"</span>,
  123. <span class='kw'>code_inline_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>,
  124. <span class='kw'>code_inline_background_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  125. <span class='kw'>code_inline_font_size</span> <span class='kw'>=</span> <span class='st'>"1em"</span>,
  126. <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='st'>"#272822"</span>,
  127. <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#d6d6d6"</span>,
  128. <span class='kw'>inverse_text_shadow</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
  129. <span class='kw'>inverse_header_color</span> <span class='kw'>=</span> <span class='st'>"#f3f3f3"</span>,
  130. <span class='kw'>title_slide_text_color</span> <span class='kw'>=</span> <span class='no'>inverse_text_color</span>,
  131. <span class='kw'>title_slide_background_color</span> <span class='kw'>=</span> <span class='no'>inverse_background_color</span>,
  132. <span class='kw'>title_slide_background_image</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  133. <span class='kw'>title_slide_background_size</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  134. <span class='kw'>title_slide_background_position</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  135. <span class='kw'>footnote_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  136. <span class='kw'>footnote_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>,
  137. <span class='kw'>footnote_position_bottom</span> <span class='kw'>=</span> <span class='st'>"60px"</span>,
  138. <span class='kw'>left_column_subtle_color</span> <span class='kw'>=</span> <span class='st'>"#777"</span>,
  139. <span class='kw'>left_column_selected_color</span> <span class='kw'>=</span> <span class='st'>"#000"</span>,
  140. <span class='kw'>blockquote_left_border_color</span> <span class='kw'>=</span> <span class='st'>"lightgray"</span>,
  141. <span class='kw'>table_border_color</span> <span class='kw'>=</span> <span class='st'>"#666"</span>,
  142. <span class='kw'>table_row_border_color</span> <span class='kw'>=</span> <span class='st'>"#ddd"</span>,
  143. <span class='kw'>table_row_even_background_color</span> <span class='kw'>=</span> <span class='st'>"#eee"</span>,
  144. <span class='kw'>base_font_size</span> <span class='kw'>=</span> <span class='st'>"20px"</span>,
  145. <span class='kw'>text_font_size</span> <span class='kw'>=</span> <span class='st'>"1rem"</span>,
  146. <span class='kw'>header_h1_font_size</span> <span class='kw'>=</span> <span class='st'>"2.75rem"</span>,
  147. <span class='kw'>header_h2_font_size</span> <span class='kw'>=</span> <span class='st'>"2.25rem"</span>,
  148. <span class='kw'>header_h3_font_size</span> <span class='kw'>=</span> <span class='st'>"1.75rem"</span>,
  149. <span class='kw'>header_background_auto</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
  150. <span class='kw'>header_background_color</span> <span class='kw'>=</span> <span class='no'>header_color</span>,
  151. <span class='kw'>header_background_text_color</span> <span class='kw'>=</span> <span class='no'>background_color</span>,
  152. <span class='kw'>header_background_padding</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  153. <span class='kw'>header_background_content_padding_top</span> <span class='kw'>=</span> <span class='st'>"7rem"</span>,
  154. <span class='kw'>header_background_ignore_classes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"normal"</span>, <span class='st'>"inverse"</span>, <span class='st'>"title"</span>, <span class='st'>"middle"</span>, <span class='st'>"bottom"</span>),
  155. <span class='kw'>text_slide_number_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9em"</span>,
  156. <span class='kw'>text_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  157. <span class='kw'>text_font_family</span> <span class='kw'>=</span> <span class='st'>"Noto Sans"</span>,
  158. <span class='kw'>text_font_weight</span> <span class='kw'>=</span> <span class='st'>"normal"</span>,
  159. <span class='kw'>text_font_url</span> <span class='kw'>=</span> <span class='st'>"https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&amp;display=swap"</span>,
  160. <span class='kw'>text_font_family_fallback</span> <span class='kw'>=</span> <span class='st'>"-apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial"</span>,
  161. <span class='kw'>text_font_base</span> <span class='kw'>=</span> <span class='st'>"sans-serif"</span>,
  162. <span class='kw'>header_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  163. <span class='kw'>header_font_family</span> <span class='kw'>=</span> <span class='st'>"Cabin"</span>,
  164. <span class='kw'>header_font_weight</span> <span class='kw'>=</span> <span class='st'>"600"</span>,
  165. <span class='kw'>header_font_url</span> <span class='kw'>=</span> <span class='st'>"https://fonts.googleapis.com/css?family=Cabin:600,600i&amp;display=swap"</span>,
  166. <span class='kw'>code_font_google</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  167. <span class='kw'>code_font_family</span> <span class='kw'>=</span> <span class='st'>"Source Code Pro"</span>,
  168. <span class='kw'>code_font_size</span> <span class='kw'>=</span> <span class='st'>"0.9rem"</span>,
  169. <span class='kw'>code_font_url</span> <span class='kw'>=</span> <span class='st'>"https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&amp;display=swap"</span>,
  170. <span class='kw'>code_font_family_fallback</span> <span class='kw'>=</span> <span class='st'>"Menlo, Consolas, Monaco, Liberation Mono, Lucida Console"</span>,
  171. <span class='kw'>colors</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  172. <span class='kw'>extra_css</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  173. <span class='kw'>extra_fonts</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  174. <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='st'>"xaringan-themer.css"</span>
  175. )</pre>
  176. <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
  177. <table class="ref-arguments">
  178. <colgroup><col class="name" /><col class="desc" /></colgroup>
  179. <tr>
  180. <th>text_color</th>
  181. <td><p>Text Color. Defaults to #000. Modifies the <code>body</code> element.
  182. The value of this variable is also stored as a CSS variable that can be
  183. referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text_color)</a></code> in any argument of a style function or
  184. in custom CSS.</p></td>
  185. </tr>
  186. <tr>
  187. <th>header_color</th>
  188. <td><p>Header Color. Defaults to #000. Modifies the
  189. <code>h1, h2, h3</code> elements. The value of this variable is also stored as a CSS
  190. variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-color)</a></code> in any argument
  191. of a style function or in custom CSS.</p></td>
  192. </tr>
  193. <tr>
  194. <th>background_color</th>
  195. <td><p>Slide Background Color. Defaults to #FFF. Modifies
  196. the <code>.remark-slide-content</code> class. The value of this variable is also
  197. stored as a CSS variable that can be referenced with
  198. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--background-color)</a></code> in any argument of a style function or in custom
  199. CSS.</p></td>
  200. </tr>
  201. <tr>
  202. <th>link_color</th>
  203. <td><p>Link Color. Defaults to rgb(249, 38, 114). Modifies the
  204. <code>a, a &gt; code</code> elements. The value of this variable is also stored as a CSS
  205. variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--link-color)</a></code> in any argument
  206. of a style function or in custom CSS.</p></td>
  207. </tr>
  208. <tr>
  209. <th>text_bold_color</th>
  210. <td><p>Bold Text Color. Defaults to <code>NULL</code>. Modifies the
  211. <code>strong</code> element. The value of this variable is also stored as a CSS
  212. variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-bold-color)</a></code> in any
  213. argument of a style function or in custom CSS.</p></td>
  214. </tr>
  215. <tr>
  216. <th>text_slide_number_color</th>
  217. <td><p>Slide Number Color. Defaults to
  218. <code>inverse_background_color</code>. Modifies the <code>.remark-slide-number</code> class.</p></td>
  219. </tr>
  220. <tr>
  221. <th>padding</th>
  222. <td><p>Slide Padding in <code>top right [bottom left]</code> format. Defaults
  223. to 16px 64px 16px 64px. Modifies the <code>.remark-slide-content</code> class.</p></td>
  224. </tr>
  225. <tr>
  226. <th>background_image</th>
  227. <td><p>Background image applied to each <em>and every</em> slide.
  228. Set <code>title_slide_background_image = "none"</code> to remove the background image
  229. from the title slide. Defaults to <code>NULL</code>. Modifies the
  230. <code>.remark-slide-content</code> class.</p></td>
  231. </tr>
  232. <tr>
  233. <th>background_size</th>
  234. <td><p>Background image size, requires <code>background_image</code> to
  235. be set. If <code>background_image</code> is set, <code>background_size</code> will default to
  236. <code>cover</code> so the backround fills the screen. If both <code>background_image</code> and
  237. <code>background_position</code> are set, will default to 100 percent. Defaults to
  238. <code>NULL</code>. Modifies the <code>.remark-slide-content</code> class.</p></td>
  239. </tr>
  240. <tr>
  241. <th>background_position</th>
  242. <td><p>Background image position, requires
  243. <code>background_image</code> to be set, and it is recommended to adjust
  244. <code>background_size</code>. Defaults to <code>NULL</code>. Modifies the
  245. <code>.remark-slide-content</code> class.</p></td>
  246. </tr>
  247. <tr>
  248. <th>code_highlight_color</th>
  249. <td><p>Code Line Highlight. Defaults to
  250. rgba(255,255,0,0.5). Modifies the <code>.remark-code-line-highlighted</code> class.
  251. The value of this variable is also stored as a CSS variable that can be
  252. referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-highlight-color)</a></code> in any argument of a style
  253. function or in custom CSS.</p></td>
  254. </tr>
  255. <tr>
  256. <th>code_inline_color</th>
  257. <td><p>Inline Code Color. Defaults to #000. Modifies the
  258. <code>.remark-inline-code</code> class.</p></td>
  259. </tr>
  260. <tr>
  261. <th>code_inline_background_color</th>
  262. <td><p>Inline Code Background Color. Defaults
  263. to <code>NULL</code>. Modifies the <code>.remark-inline-code</code> class.</p></td>
  264. </tr>
  265. <tr>
  266. <th>code_inline_font_size</th>
  267. <td><p>Inline Code Text Font Size. Defaults to 1em.
  268. Modifies the <code>.remark-inline-code</code> class. The value of this variable is
  269. also stored as a CSS variable that can be referenced with
  270. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-inline-font-size)</a></code> in any argument of a style function or in
  271. custom CSS.</p></td>
  272. </tr>
  273. <tr>
  274. <th>inverse_background_color</th>
  275. <td><p>Inverse Background Color. Defaults to
  276. #272822. Modifies the <code>.inverse</code> class. The value of this variable is also
  277. stored as a CSS variable that can be referenced with
  278. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--inverse-background-color)</a></code> in any argument of a style function or
  279. in custom CSS.</p></td>
  280. </tr>
  281. <tr>
  282. <th>inverse_text_color</th>
  283. <td><p>Inverse Text Color. Defaults to #d6d6d6. Modifies
  284. the <code>.inverse</code> class. The value of this variable is also stored as a CSS
  285. variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--inverse-text-color)</a></code> in any
  286. argument of a style function or in custom CSS.</p></td>
  287. </tr>
  288. <tr>
  289. <th>inverse_text_shadow</th>
  290. <td><p>Enables Shadow on text of inverse slides.
  291. Defaults to <code>FALSE</code>. Modifies the <code>.inverse</code> class.</p></td>
  292. </tr>
  293. <tr>
  294. <th>inverse_header_color</th>
  295. <td><p>Inverse Header Color. Defaults to #f3f3f3.
  296. Modifies the <code>.inverse h1, .inverse h2, .inverse h3</code> classes. The value of
  297. this variable is also stored as a CSS variable that can be referenced with
  298. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--inverse-header-color)</a></code> in any argument of a style function or in
  299. custom CSS.</p></td>
  300. </tr>
  301. <tr>
  302. <th>title_slide_text_color</th>
  303. <td><p>Title Slide Text Color. Defaults to
  304. <code>inverse_text_color</code>. Modifies the <code>.title-slide</code> class. The value of this
  305. variable is also stored as a CSS variable that can be referenced with
  306. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--title-slide-text-color)</a></code> in any argument of a style function or in
  307. custom CSS.</p></td>
  308. </tr>
  309. <tr>
  310. <th>title_slide_background_color</th>
  311. <td><p>Title Slide Background Color. Defaults
  312. to <code>inverse_background_color</code>. Modifies the <code>.title-slide</code> class. The
  313. value of this variable is also stored as a CSS variable that can be
  314. referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--title-slide-background-color)</a></code> in any argument of a
  315. style function or in custom CSS.</p></td>
  316. </tr>
  317. <tr>
  318. <th>title_slide_background_image</th>
  319. <td><p>Title Slide Background Image URL.
  320. Defaults to <code>NULL</code>. Modifies the <code>.title-slide</code> class.</p></td>
  321. </tr>
  322. <tr>
  323. <th>title_slide_background_size</th>
  324. <td><p>Title Slide Background Image Size,
  325. defaults to "cover" if background image is set. Defaults to <code>NULL</code>.
  326. Modifies the <code>.title-slide</code> class.</p></td>
  327. </tr>
  328. <tr>
  329. <th>title_slide_background_position</th>
  330. <td><p>Title Slide Background Image
  331. Position. Defaults to <code>NULL</code>. Modifies the <code>.title-slide</code> class.</p></td>
  332. </tr>
  333. <tr>
  334. <th>footnote_color</th>
  335. <td><p>Footnote text color (if <code>NA</code>, then it will be the same
  336. color as <code>text_color</code>). Defaults to <code>NULL</code>. Modifies the <code>.footnote</code>
  337. class.</p></td>
  338. </tr>
  339. <tr>
  340. <th>footnote_font_size</th>
  341. <td><p>Footnote font size. Defaults to 0.9em. Modifies
  342. the <code>.footnote</code> class.</p></td>
  343. </tr>
  344. <tr>
  345. <th>footnote_position_bottom</th>
  346. <td><p>Footnote location from bottom of screen.
  347. Defaults to 60px. Modifies the <code>.footnote</code> class.</p></td>
  348. </tr>
  349. <tr>
  350. <th>left_column_subtle_color</th>
  351. <td><p>Left Column Text (not last). Defaults to
  352. #777. Modifies the <code>.left-column h2, .left-column h3</code> classes.</p></td>
  353. </tr>
  354. <tr>
  355. <th>left_column_selected_color</th>
  356. <td><p>Left Column Current Selection. Defaults to
  357. #000. Modifies the
  358. <code>.left-column h2:last-of-type, .left-column h3:last-child</code> classes.</p></td>
  359. </tr>
  360. <tr>
  361. <th>blockquote_left_border_color</th>
  362. <td><p>Blockquote Left Border Color. Defaults
  363. to lightgray. Modifies the <code>blockquote</code> element.</p></td>
  364. </tr>
  365. <tr>
  366. <th>table_border_color</th>
  367. <td><p>Table top/bottom border. Defaults to #666.
  368. Modifies the <code>table: border-top, border-bottom</code> elements.</p></td>
  369. </tr>
  370. <tr>
  371. <th>table_row_border_color</th>
  372. <td><p>Table row inner bottom border. Defaults to
  373. #ddd. Modifies the <code>table thead th: border-bottom</code> elements.</p></td>
  374. </tr>
  375. <tr>
  376. <th>table_row_even_background_color</th>
  377. <td><p>Table Even Row Background Color.
  378. Defaults to #eee. Modifies the <code>thead, tfoot, tr:nth-child(even)</code>
  379. elements.</p></td>
  380. </tr>
  381. <tr>
  382. <th>base_font_size</th>
  383. <td><p>Base Font Size for All Slide Elements (must be <code>px</code>).
  384. Defaults to 20px. Modifies the <code>html</code> element. The value of this variable
  385. is also stored as a CSS variable that can be referenced with
  386. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--base-font-size)</a></code> in any argument of a style function or in custom
  387. CSS.</p></td>
  388. </tr>
  389. <tr>
  390. <th>text_font_size</th>
  391. <td><p>Slide Body Text Font Size. Defaults to 1rem. Modifies
  392. the <code>.remark-slide-content</code> class. The value of this variable is also
  393. stored as a CSS variable that can be referenced with
  394. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-size)</a></code> in any argument of a style function or in custom
  395. CSS.</p></td>
  396. </tr>
  397. <tr>
  398. <th>header_h1_font_size</th>
  399. <td><p>h1 Header Text Font Size. Defaults to 2.75rem.
  400. Modifies the <code>.remark-slide-content h1</code> class. The value of this variable
  401. is also stored as a CSS variable that can be referenced with
  402. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-h1-font-size)</a></code> in any argument of a style function or in
  403. custom CSS.</p></td>
  404. </tr>
  405. <tr>
  406. <th>header_h2_font_size</th>
  407. <td><p>h2 Header Text Font Size. Defaults to 2.25rem.
  408. Modifies the <code>.remark-slide-content h2</code> class. The value of this variable
  409. is also stored as a CSS variable that can be referenced with
  410. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-h2-font-size)</a></code> in any argument of a style function or in
  411. custom CSS.</p></td>
  412. </tr>
  413. <tr>
  414. <th>header_h3_font_size</th>
  415. <td><p>h3 Header Text Font Size. Defaults to 1.75rem.
  416. Modifies the <code>.remark-slide-content h3</code> class. The value of this variable
  417. is also stored as a CSS variable that can be referenced with
  418. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-h3-font-size)</a></code> in any argument of a style function or in
  419. custom CSS.</p></td>
  420. </tr>
  421. <tr>
  422. <th>header_background_auto</th>
  423. <td><p>Add background under slide title automatically
  424. for h1 header elements. If not enabled, use <code>class: header_background</code> to
  425. enable. Defaults to <code>FALSE</code>.</p></td>
  426. </tr>
  427. <tr>
  428. <th>header_background_color</th>
  429. <td><p>Background Color for h1 Header with
  430. Background. Defaults to <code>header_color</code>. Modifies the
  431. <code>.remark-slide-content h1</code> class. The value of this variable is also
  432. stored as a CSS variable that can be referenced with
  433. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-background-color)</a></code> in any argument of a style function or in
  434. custom CSS.</p></td>
  435. </tr>
  436. <tr>
  437. <th>header_background_text_color</th>
  438. <td><p>Text Color for h1 Header with
  439. Background. Defaults to <code>background_color</code>. Modifies the
  440. <code>.remark-slide-content h1</code> class. The value of this variable is also
  441. stored as a CSS variable that can be referenced with
  442. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-background-text-color)</a></code> in any argument of a style function
  443. or in custom CSS.</p></td>
  444. </tr>
  445. <tr>
  446. <th>header_background_padding</th>
  447. <td><p>Padding for h1 Header with Background.
  448. Defaults to <code>NULL</code>. Modifies the <code>.remark-slide-content h1</code> class.</p></td>
  449. </tr>
  450. <tr>
  451. <th>header_background_content_padding_top</th>
  452. <td><p>Top Padding for Content in
  453. Slide with Header with Background. Defaults to 7rem. Modifies the
  454. <code>.remark-slide-content</code> class.</p></td>
  455. </tr>
  456. <tr>
  457. <th>header_background_ignore_classes</th>
  458. <td><p>Slide Classes Where Header with
  459. Background will not be Applied. Defaults to
  460. <code><a href='https://rdrr.io/r/base/c.html'>c('normal', 'inverse', 'title', 'middle', 'bottom')</a></code>. Modifies the
  461. <code>.remark-slide-content</code> class.</p></td>
  462. </tr>
  463. <tr>
  464. <th>text_slide_number_font_size</th>
  465. <td><p>Slide Number Text Font Size. Defaults to
  466. 0.9em. Modifies the <code>.remark-slide-number</code> class.</p></td>
  467. </tr>
  468. <tr>
  469. <th>text_font_google</th>
  470. <td><p>Use <code><a href='google_font.html'>google_font()</a></code> to specify body font. Defaults
  471. to <code>NULL</code>. Modifies the <code>body</code> element.</p></td>
  472. </tr>
  473. <tr>
  474. <th>text_font_family</th>
  475. <td><p>Body Text Font Family (xaringan default is
  476. <code>'Droid Serif'</code>). Defaults to Noto Sans. Modifies the <code>body</code> element. The
  477. value of this variable is also stored as a CSS variable that can be
  478. referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family)</a></code> in any argument of a style
  479. function or in custom CSS.</p></td>
  480. </tr>
  481. <tr>
  482. <th>text_font_weight</th>
  483. <td><p>Body Text Font Weight. Defaults to normal. Modifies
  484. the <code>body</code> element.</p></td>
  485. </tr>
  486. <tr>
  487. <th>text_font_url</th>
  488. <td><p>Body Text Font URL(s). Defaults to
  489. https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&amp;display=swap.
  490. Modifies the <code>@import url()</code> elements.</p></td>
  491. </tr>
  492. <tr>
  493. <th>text_font_family_fallback</th>
  494. <td><p>Body Text Font Fallbacks. Defaults to
  495. -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue,
  496. helvetica, Ubuntu, roboto, noto, segoe ui, arial. Modifies the <code>body</code>
  497. element. The value of this variable is also stored as a CSS variable that
  498. can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-family-fallback)</a></code> in any argument
  499. of a style function or in custom CSS.</p></td>
  500. </tr>
  501. <tr>
  502. <th>text_font_base</th>
  503. <td><p>Body Text Base Font (Total Failure Fallback). Defaults
  504. to sans-serif. Modifies the <code>body</code> element. The value of this variable is
  505. also stored as a CSS variable that can be referenced with
  506. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--text-font-base)</a></code> in any argument of a style function or in custom
  507. CSS.</p></td>
  508. </tr>
  509. <tr>
  510. <th>header_font_google</th>
  511. <td><p>Use <code><a href='google_font.html'>google_font()</a></code> to specify header font.
  512. Defaults to <code>NULL</code>. Modifies the <code>body</code> element.</p></td>
  513. </tr>
  514. <tr>
  515. <th>header_font_family</th>
  516. <td><p>Header Font Family (xaringan default is
  517. <code>'Yanone Kaffeesatz'</code>). Defaults to Cabin. Modifies the <code>h1, h2, h3</code>
  518. elements. The value of this variable is also stored as a CSS variable that
  519. can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--header-font-family)</a></code> in any argument of a
  520. style function or in custom CSS.</p></td>
  521. </tr>
  522. <tr>
  523. <th>header_font_weight</th>
  524. <td><p>Header Font Weight. Defaults to 600. Modifies the
  525. <code>h1, h2, h3</code> elements.</p></td>
  526. </tr>
  527. <tr>
  528. <th>header_font_url</th>
  529. <td><p>Header Font URL. Defaults to
  530. https://fonts.googleapis.com/css?family=Cabin:600,600i&amp;display=swap.
  531. Modifies the <code>@import url</code> elements.</p></td>
  532. </tr>
  533. <tr>
  534. <th>code_font_google</th>
  535. <td><p>Use <code><a href='google_font.html'>google_font()</a></code> to specify code font. Defaults
  536. to <code>NULL</code>. Modifies the <code>body</code> element.</p></td>
  537. </tr>
  538. <tr>
  539. <th>code_font_family</th>
  540. <td><p>Code Font Family. Defaults to Source Code Pro.
  541. Modifies the <code>.remark-code, .remark-inline-code</code> classes. The value of
  542. this variable is also stored as a CSS variable that can be referenced with
  543. <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-family)</a></code> in any argument of a style function or in custom
  544. CSS.</p></td>
  545. </tr>
  546. <tr>
  547. <th>code_font_size</th>
  548. <td><p>Code Text Font Size. Defaults to 0.9rem. Modifies the
  549. <code>.remark-inline</code> class. The value of this variable is also stored as a CSS
  550. variable that can be referenced with <code><a href='https://rdrr.io/r/stats/cor.html'>var(--code-font-size)</a></code> in any
  551. argument of a style function or in custom CSS.</p></td>
  552. </tr>
  553. <tr>
  554. <th>code_font_url</th>
  555. <td><p>Code Font URL. Defaults to
  556. https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&amp;display=swap.
  557. Modifies the <code>@import url</code> elements.</p></td>
  558. </tr>
  559. <tr>
  560. <th>code_font_family_fallback</th>
  561. <td><p>Code Font Fallback. Defaults to Menlo,
  562. Consolas, Monaco, Liberation Mono, Lucida Console. Modifies the
  563. <code>.remark-code, .remark-inline-code</code> classes.</p></td>
  564. </tr>
  565. <tr>
  566. <th>colors</th>
  567. <td><p>A named vector of custom colors. The names of the colors
  568. become CSS variables and classes that can be used within your slides.
  569. For example, <code>colors = c(blue = "#bad4ed")</code> adds a CSS variable
  570. <code>--blue</code>, a <code>.blue</code> CSS class that applies the color to the text or
  571. foreground color, and a <code>.bg-blue</code> CSS class that applies the color
  572. to the background.</p></td>
  573. </tr>
  574. <tr>
  575. <th>extra_css</th>
  576. <td><p>A named list of CSS definitions each containing a named list
  577. of CSS property-value pairs, i.e.
  578. <code><a href='https://rdrr.io/r/base/list.html'>list(".class-id" = list("css-property" = "value"))</a></code>.</p></td>
  579. </tr>
  580. <tr>
  581. <th>extra_fonts</th>
  582. <td><p>A list of additional fonts to import, each list element
  583. can be either a URL as a character string or a call to
  584. <code><a href='google_font.html'>google_font</a>()</code>. To use a font imported in <code>extra_fonts</code>, you
  585. will need to write custom CSS rules that apply the font to an element or
  586. class with the <code>font-family</code> property. See the <strong>Fonts</strong> section of
  587. <code><a href='../articles/xaringanthemer.html'>vignette("xaringanthemer")</a></code> for an example.</p></td>
  588. </tr>
  589. <tr>
  590. <th>outfile</th>
  591. <td><p>Customized xaringan CSS output file name, default is "xaringan-themer.css"</p></td>
  592. </tr>
  593. </table>
  594. <h2 class="hasAnchor" id="usage"><a class="anchor" href="#usage"></a>Usage</h2>
  595. <p>To use the styles created by this theme function, make sure
  596. that you use <code>xaringan-themer.css</code> as your CSS file in your slides' YAML
  597. header. If you change the name of the output file using the <code>outfile</code>
  598. argument, use that name instead of the default file name.<div class="yaml"></p><pre>output:
  599. xaringan::moon_reader:
  600. css: xaringan-themer.css`
  601. </pre><p></div></p>
  602. <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
  603. <div class='dont-index'><p>Other themes:
  604. <code><a href='style_duo_accent_inverse.html'>style_duo_accent_inverse</a>()</code>,
  605. <code><a href='style_duo_accent.html'>style_duo_accent</a>()</code>,
  606. <code><a href='style_duo.html'>style_duo</a>()</code>,
  607. <code><a href='style_mono_accent_inverse.html'>style_mono_accent_inverse</a>()</code>,
  608. <code><a href='style_mono_accent.html'>style_mono_accent</a>()</code>,
  609. <code><a href='style_mono_dark.html'>style_mono_dark</a>()</code>,
  610. <code><a href='style_mono_light.html'>style_mono_light</a>()</code>,
  611. <code><a href='style_solarized_dark.html'>style_solarized_dark</a>()</code>,
  612. <code><a href='style_solarized_light.html'>style_solarized_light</a>()</code></p></div>
  613. <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
  614. <pre class="examples"><div class='input'><span class='co'># Create a xaringan style in a temporary file</span>
  615. <span class='no'>xaringan_themer_css</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/tempfile.html'>tempfile</a></span>(<span class='st'>"xaringan-themer-"</span>, <span class='kw'>fileext</span> <span class='kw'>=</span> <span class='st'>".css"</span>)
  616. <span class='fu'>style_xaringan</span>(
  617. <span class='kw'>text_color</span> <span class='kw'>=</span> <span class='st'>"#002b3"</span>,
  618. <span class='kw'>inverse_background_color</span> <span class='kw'>=</span> <span class='st'>"#31b09e"</span>,
  619. <span class='kw'>inverse_text_color</span> <span class='kw'>=</span> <span class='st'>"#002b3"</span>,
  620. <span class='kw'>outfile</span> <span class='kw'>=</span> <span class='no'>xaringan_themer_css</span> <span class='co'># omit in your slides to write the</span>
  621. <span class='co'># styles to xaringan-themer.css</span>
  622. )
  623. <span class='co'># View the CSS:</span>
  624. <span class='co'># file.edit(xaringan_themer_css)</span></div></pre>
  625. </div>
  626. <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
  627. <nav id="toc" data-toggle="toc" class="sticky-top">
  628. <h2 data-toc-skip>Contents</h2>
  629. </nav>
  630. </div>
  631. </div>
  632. <footer>
  633. <div class="copyright">
  634. <p>Developed by <a href='https://www.garrickadenbuie.com'>Garrick Aden-Buie</a>.</p>
  635. </div>
  636. <div class="pkgdown">
  637. <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.0.</p>
  638. </div>
  639. </footer>
  640. </div>
  641. </body>
  642. </html>