Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Code annotation gutter keeps a grey background when code blocks have none (`code-block-bg: false`)

Abierto Apto para principiantes
#15,059 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
scss
Área
frontend

Línea de trabajo

Empieza con .code-annotation-gutter en src/resources/formats/html/bootstrap/_bootstrap-rules.scss y compáralo con la regla div.sourceCode de ese mismo archivo, que ya recurre a $body-bg cuando $code-block-bg es false. Haz que el gutter siga la misma condición y luego renderiza la reproducción con code-block-bg: false y comprueba que el fondo calculado del gutter ya no es el gris. Está terminado cuando el gutter no tiene fondo propio en esa configuración y el gris por defecto sigue apareciendo cuando code-block-bg está establecido.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug code-annotation code-blocks themes
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;
}

An annotated Python code block on a white page with no code background. A light grey strip holding the two annotation markers runs down its right edge.

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: false in a theme file.
  • code-block-border-left: "#31BAE9" without code-block-bg, because Quarto then sets $code-block-bg to 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...
Lenguaje dominante
JavaScript
Estrellas
6.1k
Forks
466
Merge medio
20 h 35 min
PR fusionados (30 d)
75

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de quarto-dev/quarto-cli

Todos los issues de quarto-dev/quarto-cli

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.