quarto-dev / quarto-dev/quarto-cli
[Feature request] Add option to define code button alignment
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Many thanks for creating and maintaining this package!
Would it be possible to add an option that defines where on the page the "Show code" button will be located if using the option "code-fold: true" when rendering HTML? I find that having the code button on the left breaks my reading flow, and I would prefer if the button was located in the center or on the right of the page.
I would propose to add an option "code-align" with can take the values "left", "center", or "right" (as illustrated below).
Apologies if this feature already exists, I couldn't find it in the documentation.
---
title: "Title"
format:
html:
code-fold: true
code-summary: "Show code"
code-align: "right" # Proposed options: "left", "center", "right"
---
```{r}
library("ggplot2")
dat <- data.frame(cond = rep(c("A", "B"), each=10),
xvar = 1:20 + rnorm(20,sd=3),
yvar = 1:20 + rnorm(20,sd=3))
ggplot(dat, aes(x=xvar, y=yvar)) +
geom_point(shape=1) +
geom_smooth()
```
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.
Research direction
The issue does not name implementation files or tests. Start by locating the HTML code-fold "Show code" button and the handling of the code-fold and code-summary options, then trace how its alignment is styled. Done means a documented code-align option supports left, center, and right without changing the existing defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100