Skip to content

Conversation

@mgeier
Copy link
Contributor

Since the config option pygments_style is supposed to take care of the code text and background colors, it doesn't make much sense to have those options a theme options.

However, removing them would be a breaking change for everyone who customizes those settings in their own html_theme_options.

Therefore, you probably don't want to merge this PR.

- **headlinkcolor** (CSS color): Link color for headings.
- **codebgcolor** (CSS color): Background color for code blocks.
- **codetextcolor** (CSS color): Default text color for code blocks, if not
set differently by the highlighting style.
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this sentence is correct, it seems like the highlighting style is ignored.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that this sentence is indeed correct, but there is one case where it is misleading:

When using the 'none' language, Pygments doesn't set a text color (but it does set a background color).

Therefore, when using a dark background (e.g. pygments_style = 'monokai') and using a dark color for codetextcolor, the text on 'none'-language code blocks will be not readable.

Anyway, if the default value for codetextcolor is changed to 'unset' (as suggested in #7721), this will not be a problem anymore.

@mgeier
Copy link
ContributorAuthor

OK, I've found a much better way that obsoletes this PR: #7721.

@tk0miyatk0miya added type:enhancement enhance or introduce a new feature html theme labels Jun 4, 2020
@tk0miyatk0miya added this to the 3.1.0 milestone Jun 4, 2020
@mgeiermgeier deleted the classic-code-color branch June 5, 2020 16:32
@github-actionsgithub-actionsbot locked as resolved and limited conversation to collaborators Jul 27, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

html themetype:enhancementenhance or introduce a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mgeier@tk0miya