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
- 派生
- 466
- 平均合并
- 20 小时 35 分钟
- 30 天内合并 PR
- 75
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quarto-dev/quarto-cli 的其他 Issue
-
accessibility bug listings
难度 2/5 1-3 小时 新手友好度 72/100
quarto-dev/quarto-cli#15066 ·
维护者通常 1 天内回复
-
accessibility bootstrap dark-mode enhancement
难度 2/5 1-3 小时 新手友好度 62/100
quarto-dev/quarto-cli#15060 ·
维护者通常 1 天内回复
-
bug callouts code-blocks themes
难度 1/5 1-3 小时 新手友好度 82/100
quarto-dev/quarto-cli#15058 ·
维护者通常 1 天内回复
-
diagrams-mermaid maintenance
难度 2/5 1-3 小时 新手友好度 60/100
quarto-dev/quarto-cli#15042 ·
维护者通常 1 天内回复
-
accessibility documentation revealjs
难度 2/5 1-3 小时 新手友好度 86/100
quarto-dev/quarto-cli#14971 ·
维护者通常 1 天内回复
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
good first issue
难度 1/5 1 小时以内 新手友好度 88/100
saayam-for-all/webapp#1919 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Uuriko/project-room#3728 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
devops-thiago/ThrillhouseBot#1132 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 74/100
andromarces/agent-loops#886 ·
维护者通常 1 天内回复
-
bug effort:low model:light plan planner:gpt-6-1-sol tests
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复