Code-copy button above the code block in sections using the column grid (`page-columns`)
Maintainer antworten meist innerhalb von 1 Tag
@cderv arbeitet bereits daran.
Seit 21.10.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 6.2k
- Forks
- 492
- Ø Merge
- 15 Std. 15 Min.
- Gemergte PRs (30 T.)
- 94
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus quarto-dev/quarto-cli
-
bootstrap enhancement themes
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
quarto-dev/quarto-cli#15421 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
quarto-dev/quarto-cli#15408 ·
Maintainer antworten meist innerhalb von 1 Tag
-
accessibility bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
quarto-dev/quarto-cli#15401 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug callouts docx regression
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 81/100
quarto-dev/quarto-cli#15394 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug lightbox
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
quarto-dev/quarto-cli#15393 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in quarto-dev/quarto-cli
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
testing-library/jest-dom#749 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
ernst:4-klein prio:3-wacht ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
NewspeedyNL/PidLane#767 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug for-agent ready
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
WenyuChiou/agent-board#1812 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug help wanted Should Have ui
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
hannahro15/Musical-Match-Saga#327 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag