classic theme: remove codetextcolor/codebgcolor theme options#7720
Closed
mgeier wants to merge 1 commit intosphinx-doc:3.xfrom
Closed
classic theme: remove codetextcolor/codebgcolor theme options#7720mgeier wants to merge 1 commit intosphinx-doc:3.xfrom
mgeier wants to merge 1 commit intosphinx-doc:3.xfrom
Conversation
mgeier
commented
May 24, 2020
| - **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. |
Contributor
Author
There was a problem hiding this comment.
I don't think this sentence is correct, it seems like the highlighting style is ignored.
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
Author
|
OK, I've found a much better way that obsoletes this PR: #7721. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since the config option
pygments_styleis 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.