Code-copy button above the code block in sections using the column grid (`page-columns`)
Mantenedores costumam responder em até 1 dia
@cderv já está trabalhando nisso.
Desde 21/10/2026.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Split from #13446, reported by mcanouil in https://github.com/quarto-dev/quarto-cli/issues/13446#issuecomment-6315320408.
When a section holds an element placed on the column grid, like a .column-margin div or a footnote with reference-location: margin, the copy button of a code block in that section sits above the code frame, half outside it.
---
title: "Copy button in a page-columns section"
format: html
reference-location: margin
---
## Section
```r
x <- 1
```
Text.[^1]
[^1]: Footnote.
The post-processor adds page-columns to the parent of any column element, so the section becomes a grid:
div.code-copy-outer-scaffold is then a grid item. A grid item does not let the margins of its children collapse through it, so the 1em top margin of div.sourceCode stays inside the scaffold, while the button is positioned at top: 0 of the scaffold.
Measured from the section top, same in Chromium, Firefox and WebKit:
| Section | Scaffold top | div.sourceCode top |
Button top |
|---|---|---|---|
| Plain section | 60.2 | 60.2 | 65.2 |
With a margin footnote or .column-margin div |
94.2 | 111.2 | 99.2 |
A .cell in the same section is not affected, as the cell is the grid item and the margin collapses through the scaffold inside it.
Moving the 1em margin from div.sourceCode to the scaffold for every code block fixes the grid case, but adds 17px in tabsets and between a filename header and its code, as .tab-pane div.sourceCode and .code-with-filename div.sourceCode reset this margin on div.sourceCode. We could limit the change to scaffolds placed directly in a page-columns element.
- Linguagem predominante
- JavaScript
- Estrelas
- 6.2k
- Forks
- 492
- Merge médio
- 15h 15min
- PRs com merge (30d)
- 94
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de quarto-dev/quarto-cli
-
bootstrap enhancement themes
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
quarto-dev/quarto-cli#15421 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
quarto-dev/quarto-cli#15408 ·
Mantenedores costumam responder em até 1 dia
-
accessibility bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
quarto-dev/quarto-cli#15401 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
bug callouts docx regression
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 81/100
quarto-dev/quarto-cli#15394 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug lightbox
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
quarto-dev/quarto-cli#15393 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de quarto-dev/quarto-cli
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100
testing-library/jest-dom#749 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
ernst:4-klein prio:3-wacht ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
NewspeedyNL/PidLane#767 ·
Mantenedores costumam responder em até 1 dia
-
bug for-agent ready
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
WenyuChiou/agent-board#1812 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug help wanted Should Have ui
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
hannahro15/Musical-Match-Saga#327 · 1 comentário ·
Mantenedores costumam responder em até 1 dia