Description
Context
I'm working on a freshly setup instance of Material for MkDocs and code highlighting seems to be off, compared to the results shown in the docs.

Bug description
Compared to the example from the docs, the result rendered on my end is
a) yellowish instead of blue
b) renders the whole line in --md-code-hl-color
instead of just the left border and the remainder in --md-code-hl-color
according to my dev tools:
.highlight .hll {
background-color: var(--md-code-hl-color);
display: block;
margin: 0 -1.1764705882em;
padding: 0 1.1764705882em;
}
My related configuration looks like this, I went by the book, i.e. the docs, if not mistaken:
markdown_extensions:
- abbr
- admonition
- attr_list
- md_in_html
- pymdownx.details
- pymdownx.highlight:
use_pygments: true
pygments_lang_class: true
line_spans: __span
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
Related links
I took a good look at the pygments
/Highlight
configuration:
as well as the docs regarding how to do highlighting and how to theme it:
- https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#highlighting-specific-lines
- https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#custom-syntax-theme
I managed to get the bluish highlight working this way, but it still covered the whole line in the darker variant and omitted the --light
variant altogether.
Reproduction
Steps to reproduce
- Enable code highlighting as per my example and the documentation linked above
- Run
mkdocs serve
ormkdocs build
- Open the result and see code highlighting be different from the examples in the docs linked above
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.