Code annotation gutter keeps a grey background when code blocks have none (`code-block-bg: false`)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 76/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- scss
- 領域
- frontend
研究方向
從 src/resources/formats/html/bootstrap/_bootstrap-rules.scss 中的 .code-annotation-gutter 開始,並將其與同一檔案中的 div.sourceCode 規則進行比較。該規則在 $code-block-bg 為 false 時已經回退到 $body-bg。讓 gutter 遵循相同的條件,然後使用 code-block-bg: false 渲染重現範例,並檢查 gutter 的計算背景是否已不再是灰色。完成的標準是:在此設定下 gutter 沒有自己的背景,並且設定了 code-block-bg 時仍會顯示預設灰色。
由索引模型根據 Issue 內容生成。
描述
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
With code-block-bg: false, code blocks have no background, but the code annotation gutter still gets one.
A grey strip shows on the right of every annotated block.
The HTML code blocks documentation lists code-block-bg as a boolean or a colour, and the option sets the $code-block-bg Sass variable.
In src/resources/formats/html/bootstrap/_bootstrap-rules.scss, div.sourceCode checks $code-block-bg and falls back to $body-bg when it is false.
.code-annotation-gutter does not check it and always uses $code-block-bg-color:
.code-annotation-gutter {
background-color: $code-block-bg-color;
}
Steps to reproduce
---
title: "Annotation gutter"
format: html
code-block-bg: false
code-annotations: below
---
```python
import math # <1>
x = math.pi # <2>
```
1. Import.
2. Assign.
Two other set-ups give the same result:
$code-block-bg: falsein a theme file.code-block-border-left: "#31BAE9"withoutcode-block-bg, because Quarto then sets$code-block-bgto false itself (src/format/html/format-html-scss.ts).
Actual behavior
The computed background colours are:
div.sourceCode:rgb(255, 255, 255), the page colour..code-annotation-gutter:rgba(233, 236, 239, 0.65).
Expected behavior
The gutter follows code-block-bg, so it has no background of its own when code blocks have none.
Your environment
- IDE: none, rendered from the command line.
- OS: macOS 27.0.
Quarto check output
quarto check
Quarto 99.9.9
[✓] Checking environment information...
Quarto cache location: /Users/mcanouil/Library/Caches/quarto
Project: none found (single-file mode)
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.7.14: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: b86f98d382940bef6c65f37ea0bdfba844f19b6d
Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/bin
[✓] Checking tools....................OK
TinyTeX: v2026.07
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/mcanouil/Library/TinyTeX/bin/universal-darwin
Version: 2026
[✓] Checking Chrome Headless....................OK
Using: Chrome from QUARTO_CHROMIUM
Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
[✓] Checking basic markdown render....OK
ℹ R version 4.6.1 (2026-06-24)
! Config '~/.Rprofile' was loaded!
[✓] Checking R installation...........OK
Version: 4.6.1
Path: /Library/Frameworks/R.framework/Versions/4.6/Resources
LibPaths:
- /Users/mcanouil/Library/R/arm64/4.6/library
- /Library/Frameworks/R.framework/Versions/4.6/Resources/library
knitr: 1.51
rmarkdown: 2.31
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.13.11
Path: /Users/mcanouil/Projects/q2-tests/.venv/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking Julia installation...
- 主要語言
- JavaScript
- 星號
- 6.1k
- 分支
- 476
- 平均合併
- 17 小時 7 分鐘
- 30 天內合併 PR
- 112
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
quarto-dev/quarto-cli 的其他 Issue
-
enhancement websites
難度 2/5 1-3 小時 新手友好度 78/100
quarto-dev/quarto-cli#15255 · 1 則留言 ·
維護者通常 1 天內回覆
-
Website announcement dismiss control cannot be reached or used with a keyboard可能已有人在做 @Xander-AJ 今天認領。 未關閉accessibility bug websites
難度 1/5 1-3 小時 新手友好度 88/100
quarto-dev/quarto-cli#15235 ·
維護者通常 1 天內回覆
-
quarto.json.decode does not raise on invalid JSON, so pcall cannot catch it可能已有人在做 @sogav21 於 1 天前認領。 未關閉bug lua
難度 2/5 1-3 小時 新手友好度 84/100
quarto-dev/quarto-cli#15226 ·
維護者通常 1 天內回覆
-
arrow-dark gives region markers a light band that fails contrast可能已有人在做 @vav7 於 1 天前認領。 未關閉accessibility bug themes
難度 1/5 1 小時以內 新手友好度 88/100
quarto-dev/quarto-cli#15222 ·
維護者通常 1 天內回覆
-
bug code-annotation
難度 2/5 1-3 小時 新手友好度 76/100
quarto-dev/quarto-cli#15215 ·
維護者通常 1 天內回覆
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 72/100
mongoosejs/mquery#142 ·
-
難度 1/5 1 小時以內 新手友好度 65/100
維護者通常 1 天內回覆
-
Add toro4n to the data modeling tools可能已有人在做 @henriklantzhedstrom-prog 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 62/100
neo4j/docs-getting-started#546 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 25 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
libnativeapi/nativeapi#21 ·