Skip to content

Commit 7fca43b

Browse files
authored
Merge pull request #1367 from quarto-dev/revealjs/gradient-background
2 parents 6c4ffd4 + e0a1813 commit 7fca43b

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
format: revealjs
3+
---
4+
5+
## Slide with linear-gradient {background-gradient="linear-gradient(to bottom, #283b95, #17b2c3)"}
6+
7+
## Slide with radial-gradient {background-gradient="radial-gradient(#283b95, #17b2c3)"}

docs/presentations/revealjs/index.qmd

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,20 +337,32 @@ Note that one significant disadvantage to tabsets is that only the first tab wil
337337

338338
## Slide Backgrounds
339339

340-
Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a `background` attribute to your slide headers. Four different types of backgrounds are supported: color, image, video and iframe.
340+
Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a `background` attribute to your slide headers. Five different types of backgrounds are supported: color, gradient, image, video and iframe.
341+
342+
### Color Background
341343

342344
All CSS color formats are supported, including hex values, keywords, `rgba()` or `hsl()`. For example:
343345

344346
``` {.markdown code-preview="examples/background-color.qmd"}
345347
## Slide Title {background-color="aquamarine"}
346348
```
347349

348-
You can also use various types of media (image, video, or iframe) as your slide background. These options are described below.
349-
350350
::: {.callout-tip appearance="simple"}
351351
Note that if the background color of your media differs from your presentation's theme (e.g. a dark image when using a light theme) then you should also explicitly set the `background-color` so that text on top of the background appears in the correct color (e.g. light text on a dark background).
352352
:::
353353

354+
### Gradient Background
355+
356+
{{< include /docs/prerelease/1.6/_pre-release-feature.qmd >}}
357+
358+
All CSS gradient formats are supported, including `linear-gradient`, `radial-gradient` and `conic-gradient`.
359+
360+
```{.markdown code-preview="examples/background-gradient.qmd"}
361+
## Slide Title {background-gradient="linear-gradient(to bottom, #283b95, #17b2c3)"}
362+
363+
## Slide Title {background-gradient="radial-gradient(#283b95, #17b2c3)"}
364+
```
365+
354366
### Image Backgrounds
355367

356368
By default, background images are resized to cover the full page. Available options:

0 commit comments

Comments
 (0)