Skip to content

classic theme: remove codetextcolor/codebgcolor theme options #7720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented May 24, 2020

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.

@@ -219,9 +219,6 @@ These themes are:
- **headbgcolor** (CSS color): Background color for headings.
- **headtextcolor** (CSS color): Text color for headings.
- **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
Contributor Author

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
Contributor Author

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
Contributor Author

mgeier commented May 24, 2020

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

@tk0miya tk0miya added type:enhancement enhance or introduce a new feature html theme labels Jun 4, 2020
@tk0miya tk0miya added this to the 3.1.0 milestone Jun 4, 2020
@tk0miya tk0miya closed this in b345acc Jun 5, 2020
@mgeier mgeier deleted the classic-code-color branch June 5, 2020 16:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
html theme type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants