code-block-bg: true has no apparent effect #12881
Replies: 2 comments 1 reply
-
Accessibility: To improve accessibility, please add alternative text to your screenshots. This helps all users, including those using screen readers, to understand the context of the images. A brief description can make a big difference! See Good Alt Text, Bad Alt Text — Making Your Content Perceivable. Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? The goal is to make it as easy as possible for us to recreate your problem so that we can fix it: please help us help you! Thanks. You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four If you have multiple files (and if it is absolutely required to have multiple files), please share as a Git repository.
Additionally and if not already given, please share the output of |
Beta Was this translation helpful? Give feedback.
-
Looking at your screenshot, I see not highlighting, so I am assuming you did not set a class on the code cell ---
format:
html:
code-block-bg: true
---
```
<button type="button">Press me!</button>
```
```default
<button type="button">Press me!</button>
```
```html
<button type="button">Press me!</button>
``` Highlighting (including background) will only be set for highlighted code cell. For the other, they will follow regular |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Here is my _quarto.yml:
Yet when I
quarto preview
, the code block backgrounds are not highlighted. For instance, here is a screenshot of the html output of an excerpt that includes a code block:What am I doing wrong? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions