😎 Give your xaringan slides some style
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

457 lines
21KB

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