😎 Give your xaringan slides some style
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

450 lines
20KB

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