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

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