Replies: 2 comments 1 reply
This comment has been hidden.
This comment has been hidden.
-
|
Having background colors does currently requires the code block to have highlighting processing. If you don't have a language to set, then you need to use Using obvious dummy color to see the effect here ---
format:
html:
code-block-bg: "#c50d0dff"
---
# No highlight
```
$ grep -A 10 format varehus.github.io/docs/blog/posts/2025-07-26-flutter/index.qmd
format:
html:
code-block-bg: "#f9fafb"
code-copy: false
other-links:
- text: multilib
href: http://www.slackware.com/~alien/multilib
code-links:
- text: alien-multilib-rsync.sh
icon: file-code
href: https://slackware.uk/~dive/scripts/alien-multilib-rsync.sh
```
# Highlight with no specific language
```{.default}
$ grep -A 10 format varehus.github.io/docs/blog/posts/2025-07-26-flutter/index.qmd
format:
html:
code-block-bg: "#f9fafb"
code-copy: false
other-links:
- text: multilib
href: http://www.slackware.com/~alien/multilib
code-links:
- text: alien-multilib-rsync.sh
icon: file-code
href: https://slackware.uk/~dive/scripts/alien-multilib-rsync.sh
```
If you want this a default, using a lua filter, you can automated the addition of @gordonwoodhull we quickly spoke about this. There may be some redesign / fixes in how our styles applies on highlighted code block vs not highlighted; especially with brand impact. Maybe |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Can one use ``` on code blocks absent a designation as to the coding language and still have the code block background colour render?
Syntax highlighting set for bash in the below shell output.
$ grep -A 10 format varehus.github.io/docs/blog/posts/2025-07-26-flutter/index.qmd format: html: code-block-bg: "#f9fafb" code-copy: false other-links: - text: multilib href: http://www.slackware.com/~alien/multilib code-links: - text: alien-multilib-rsync.sh icon: file-code href: https://slackware.uk/~dive/scripts/alien-multilib-rsync.sh $Beta Was this translation helpful? Give feedback.
All reactions