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

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