quarto-dev / quarto-dev/quarto-cli
RevealJS code block animations not working on several themes
@cderv is already working on this.
Since Feb 6, 2023.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Some RevealJS themes (beige, league, sky) don't support animation of code line number highlighting per https://quarto.org/docs/presentations/revealjs/#line-highlighting (see the example where one can advance with space-bar to show highlighted lines). In the faulty themes, it seems the "background" code is not properly grayed out (so the highlighted code appears to stand out).
Here's a MWE for the problem:
---
format:
revealjs:
theme: beige # doesn't work
# theme: blood # works
# theme: dark # works
# theme: default # works
# theme: league # doesn't work
# theme: moon # works
# theme: night # works
# theme: serif # works
# theme: simple # works
# theme: sky # doesn't work
# theme: solarized # works
---
# Animated slide
```{.python code-line-numbers="|6|9"}
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```
This could very well be a bug in the highlight.js or even the CSS of the themes. I didn't have time to dig deeper, but wanted to document it.
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.