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

464 lines
21KB

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