Skip to content
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

readthedocs theme: .rst-content code color defined twice, all code is black #2027

Closed
wodny opened this issue Mar 19, 2020 · 3 comments
Closed
Labels
Needs confirmation Theme-readthedocs Issues specifically involving the readthedocs theme.

Comments

@wodny
Copy link
Contributor

wodny commented Mar 19, 2020

After upgrading from mkdocs 1.0.4 to 1.1 all code blocks (including those inline) became black instead of still having the well known orange color. Browser inspector shows there are duplicated rules for .rst-content code color - #000 and #E74C3C. Is this is a bug? In my opinion previous colors looked much better and online readthedocs documents seem to still use orange.

@waylan
Copy link
Member

waylan commented Mar 20, 2020

In the most recent version of MkDocs we updated to a more recent version of the upstream's CSS. With a quick look in the inspector...

Screen Shot 2020-03-20 at 3 49 44 PM

... we can see that both color definitions are found in theme.css which is the upstream file. We have made no edits to that file. However, we can also see that the MkDocs specific overrides in theme_extra.css do not override the color. We need to provide our own overrides for some things as the HTML output by MkDocs/Markdown is slightly different than the HTML output by Sphinx. If we need to add something to the overrides in theme_extra.css to better match upstream, a PR is always welcome (such a PR would ideally provide screenshots of both before and after in MkDocs as well as of the upstream Sphinx theme as justification for the change).

If you would like to know why the color is defined twice, that is a question to ask upstream.

@waylan waylan added Needs confirmation Theme-readthedocs Issues specifically involving the readthedocs theme. labels Mar 20, 2020
@waylan
Copy link
Member

waylan commented Mar 20, 2020

I added the needs confirmation tag as I have not confirmed the behavior of the upstream Sphinx theme here.

wodny added a commit to wodny/mkdocs that referenced this issue Mar 21, 2020
@wodny
Copy link
Contributor Author

wodny commented Mar 21, 2020

Hi, is the PR #2029 something like you need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs confirmation Theme-readthedocs Issues specifically involving the readthedocs theme.
Projects
None yet
Development

No branches or pull requests

2 participants