Code-copy button above the code block in sections using the column grid (`page-columns`)
維護者通常 1 天內回覆
@cderv 已經在處理了。
開始於 2026年10月21日。
評估
這個 Issue 還沒有評估資料。
描述
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.
- 主要語言
- JavaScript
- 星號
- 6.2k
- 分支
- 492
- 平均合併
- 15 小時 15 分鐘
- 30 天內合併 PR
- 94
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
quarto-dev/quarto-cli 的其他 Issue
-
bootstrap enhancement themes
難度 2/5 1-3 小時 新手友好度 70/100
quarto-dev/quarto-cli#15421 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
quarto-dev/quarto-cli#15408 ·
維護者通常 1 天內回覆
-
accessibility bug
難度 2/5 1-3 小時 新手友好度 79/100
quarto-dev/quarto-cli#15401 · 1 個 reaction ·
維護者通常 1 天內回覆
-
bug callouts docx regression
難度 2/5 1-3 小時 新手友好度 81/100
quarto-dev/quarto-cli#15394 · 2 則留言 ·
維護者通常 1 天內回覆
-
bug lightbox
難度 2/5 1-3 小時 新手友好度 76/100
quarto-dev/quarto-cli#15393 ·
維護者通常 1 天內回覆
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 75/100
testing-library/jest-dom#749 ·
-
bug
難度 2/5 1-3 小時 新手友好度 65/100
-
ernst:4-klein prio:3-wacht ui
難度 2/5 1-3 小時 新手友好度 70/100
NewspeedyNL/PidLane#767 ·
維護者通常 1 天內回覆
-
bug for-agent ready
難度 2/5 1-3 小時 新手友好度 62/100
WenyuChiou/agent-board#1812 · 2 則留言 ·
維護者通常 1 天內回覆
-
bug help wanted Should Have ui
難度 2/5 1-3 小時 新手友好度 82/100
hannahro15/Musical-Match-Saga#327 · 1 則留言 ·
維護者通常 1 天內回覆