Skip to content

Commit b849938

Browse files
committed
Specify theme directly in RevealJS.
1 parent 668f554 commit b849938

6 files changed

+26
-6
lines changed

_extensions/webr/qwebr-styling.css

+7-1
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,17 @@ body.reveal.quarto-dark pre div code.qwebr-output-code-stdout {
154154

155155

156156
/* Create a border around console and output (does not effect graphs) */
157-
.reveal div.qwebr-console-area {
157+
body.reveal.quarto-light div.qwebr-console-area {
158158
border: 1px solid #EEEEEE;
159159
box-shadow: 2px 2px 10px #EEEEEE;
160160
}
161161

162+
body.reveal.quarto-dark div.qwebr-console-area {
163+
border: 1px solid #111;
164+
box-shadow: 2px 2px 10px #111;
165+
}
166+
167+
162168
/* Cap output height and allow text to scroll */
163169
/* TODO: Is there a better way to fit contents/max it parallel to the monaco editor size? */
164170
.reveal div.qwebr-output-code-area pre {

docs/_quarto.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ format:
7878

7979
# Allow quarto to switch between light and dark themes.
8080
theme:
81-
light: flatly
81+
light: cosmo
8282
dark: darkly

docs/qwebr-theming.qmd

+11-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The Monaco editor used by `{quarto-webr}` to power interactive code cells respec
141141

142142
```yaml
143143
theme:
144-
light: flatly
144+
light: cosmo
145145
dark: darkly
146146
```
147147
@@ -150,3 +150,13 @@ Once set, a clickable toggle will appear on the page that can switch between the
150150
:::{.callout-note}
151151
The Monaco editor's theme automatically adjusts based on the document's theme. It uses a light theme (`vs`) in light mode and a dark theme (`vs-dark`) in dark mode.
152152
:::
153+
154+
### RevealJS
155+
156+
For RevealJS, please note you may only specify [a single RevealJS theme](https://quarto.org/docs/presentations/revealjs/themes.html#using-themes) at a time. We recommend specifying either `default` (for light mode) or `dark` (for dark mode).
157+
158+
```yaml
159+
format:
160+
revealjs:
161+
theme: default
162+
```

tests/_quarto.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ website:
2525

2626
# Allow quarto to switch between light and dark themes.
2727
theme:
28-
light: flatly
28+
light: cosmo
2929
dark: darkly
3030

3131
# Set the language that should be used for Quarto websites

tests/qwebr-test-revealjs.qmd

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: "Test: webR in RevealJS"
33
subtitle: "Examining State"
44
authors: "Presentation Lead"
5-
format: revealjs
5+
format:
6+
revealjs:
7+
theme: dark
68
engine: knitr
79
filters:
810
- webr

tests/qwebr-test-status-header-suppressed-revealjs.qmd

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
title: "Test: No Startup Status Present in RevealJS Presentations"
33
subtitle: "Examining State"
44
authors: "Presentation Lead"
5-
format: revealjs
5+
format:
6+
revealjs:
7+
theme: default
68
engine: knitr
79
webr:
810
show-startup-message: false

0 commit comments

Comments
 (0)