Skip to content

Conversation

@ebrayton
Copy link

@ebrayton ebrayton commented Dec 6, 2022

Dug into pygments a bit while trying to figure out why the background color wasn't showing on my code blocks. I discovered the need to specify the CSS class in the get_style_defs call so it'll be added to the CSS selectors.

Without the arg to get_style_defs('.highlight'), this line wasn't present in the generated CSS (I assume because there would've been no selector for it):

.highlight { background: #242933; color: #d8dee9 }

Also, since I want to be able to specify a custom CSS class, I added an optional config entry for pygments.cssclass. This could also support those who may have existing styles selecting for the previously-used .hll selector.

Resolves #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Background color missing

1 participant