mrdogebro / sphinx_rtd_dark_mode Goto Github PK
View Code? Open in Web Editor NEWAdds a toggleable dark mode to the Read the Docs theme for Sphinx.
Home Page: sphinx-rtd-dark-mode.vercel.app
License: MIT License
Adds a toggleable dark mode to the Read the Docs theme for Sphinx.
Home Page: sphinx-rtd-dark-mode.vercel.app
License: MIT License
Hey,
I was waiting for this forever and I hope that you will maintain this!
Anyways,
.wy-nav-content {
max-width: none;
}
is always required as custom css to use the full width of the screen. What do you think about making this a default?
Emphasized lines in line listings are not styled:
Example:
.. code-block:: batch
:linenos:
:emphasize-lines: 3
@echo off
set WORKSPACES=C:\path\to\workspace
for /d %%s in (%WORKSPACES%\*) do (
rem Do something
)
It's really hard to read the highlighted lines.
PR with a proposal is on its way.
Setup Travis CI to automatically run tests on new changes and on PRs. For now the only test will just be a test build but more might be added in the future. Also setup a way for PR's to be built (and hosted) while the PR is open so that everyone can see how the changes look without having to clone it and build it for yourself.
The text in the bottom left hand corner that says Read the Docs
gets the font changed when using the extension. There is two screenshots below showing the differences. This is potentially due to importing Font Awesome for use of icons. Will work on trying to figure this out.
Add a set of parameters in the config that would allow the user to customize different colors within the theme. This would make tweaking the themes to your liking much easier and faster.
l have followed the step to enable the darkm mode, but it just can't be shown.
Sphinx 7x no longer uses style
Theme error:
An error happened in rendering the page index.
Reason: UndefinedError("'style' is undefined")
See Remove deprecated style key for HTML templates #11381
Add a Slate theme based off of the one used by Material theme for MkDocs. This was suggested and discussed in discussion #8.
Paragraph directives such as important
, warning
, etc. are dark mode when the toggle is on.
The library is creating a top-level folder called tests
in site-packages
:
__pycache__/
_distutils_hack/
alabaster/
alabaster-0.7.12.dist-info/
babel/
Babel-2.9.1.dist-info/
certifi/
certifi-2021.5.30.dist-info/
charset_normalizer/
charset_normalizer-2.0.4.dist-info/
distutils-precedence.pth
docutils/
docutils-0.16.dist-info/
idna/
idna-3.2.dist-info/
imagesize-1.2.0.dist-info/
imagesize.py
jinja2/
Jinja2-3.0.1.dist-info/
markupsafe/
MarkupSafe-2.0.1.dist-info/
packaging/
packaging-21.0.dist-info/
pip/
pip-21.1.3.dist-info/
pkg_resources/
pygments/
Pygments-2.9.0.dist-info/
pyparsing-2.4.7.dist-info/
pyparsing.py
pytz/
pytz-2021.1.dist-info/
requests/
requests-2.26.0.dist-info/
setuptools/
setuptools-57.0.0.dist-info/
snowballstemmer/
snowballstemmer-2.1.0.dist-info/
sphinx/
Sphinx-4.1.2.dist-info/
sphinx_rtd_dark_mode/
sphinx_rtd_dark_mode-1.2.3.dist-info/
sphinx_rtd_theme/
sphinx_rtd_theme-0.5.2.dist-info/
sphinxcontrib/
sphinxcontrib_applehelp-1.0.2-py3.8-nspkg.pth
sphinxcontrib_applehelp-1.0.2.dist-info/
sphinxcontrib_devhelp-1.0.2-py3.8-nspkg.pth
sphinxcontrib_devhelp-1.0.2.dist-info/
sphinxcontrib_htmlhelp-2.0.0-py3.9-nspkg.pth
sphinxcontrib_htmlhelp-2.0.0.dist-info/
sphinxcontrib_jsmath-1.0.1-py3.7-nspkg.pth
sphinxcontrib_jsmath-1.0.1.dist-info/
sphinxcontrib_qthelp-1.0.3-py3.8-nspkg.pth
sphinxcontrib_qthelp-1.0.3.dist-info/
sphinxcontrib_serializinghtml-1.1.5-py3.9-nspkg.pth
sphinxcontrib_serializinghtml-1.1.5.dist-info/
tests/
urllib3/
urllib3-1.26.6.dist-info/
The reason this is a problem is that this tests
package being installed in my venv clobbers the local tests
dir within my app, preventing the app from importing from within that directory structure (i.e. import tests.test_utils
now give me a ModuleNotFoundError
because the import system is looking within $VIRTUAL_ENV/lib/python3.9/site-packages/tests/
rather than (repo root)/tests
and not finding my test_utils
module).
This would add a lighter dark theme as some people think that the current theme is to dark (understandably). This would most likely move the current theme to being a high-contrast theme and add a normal dark theme which is a bit lighter.
Hi,
I'll try to be more precise now :)
The dark theme colors the function names & the parameters with the same color.
I would prefer to have the function name maybe white and the parameters in blue or they other way around.
Example:
Much more readable in my opinion.
Again, if you prefer options here instead of implementing this for everyone I would be more than fine with this.
Just thought that I would provide some more feedback.
If a css_files
key is included in the html_context
dict in the conf.py file, the dark mode doesn't appear. The toggle also disappears.
Hi, nice job with the package!
Is it possible to disable the animation/transition when changing theme? It is not very smooth on my PC. I would prefer an immediate transition.
/ Erik
Overall this is a great theme and I love the animation when switching light/dark themes.
Just a small issue with the api autodoc which causes class names to be black.
The specific CSS selector in the upstream sphinx-rtd-theme
which causes this is:
html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}
@MrDogeBro
Came across this repo yesterday and this exactly what I was looking for.
Great work and thanks for making it ๐
Could you please look into the below issue and fix it. I want to push my docs to production soon but blocked with this issue and the dark theme at few places isn't looking great.
Ex:
In the below snap the contrast of Danger isn't good, also the dark theme seems to be too dark.
It would be great if you could have a dark theme similar to mkdocs
This would add the ability to add custom themes. These themes would be themes that user can create. They would be based off of one of the existing themes. This would make sure that if a theme were to be missing any part of it, it would just revert that part back to the default for the base theme.
As a part of custom themes, there would also be support for community themes. There would be a system put into place that would allow people to create custom themes and publish them. These themes could then be used by other people via the extension, which would make it easy to do for both sides. This would allow users of the extension to include themes that were built by others in their docs.
You can find out the user's color scheme preference by running window.matchMedia('(prefers-color-scheme:dark)').matches
. This is broadly supported by browsers.
Hi,
sorry, more reports by me :)
I have a list in a docstring whose header gets not nicely rendered. There's a light bar that I think should not be there (just before "Available").
Link to example: https://sc-toolbox.readthedocs.io/en/latest/usage.html#sc_toolbox.api.plot.Colormaps
Docstring:
class Colormaps(Enum):
"""
Available colormaps:
| grey_red
| grey_blue
| grey_green
| gray_yellow
| grey_violet
"""
Thank you very much.
Hi,
I have a rst table that I created with:
+------------+------------+------------------------------+
| Organism | Tissue | Marker File |
+============+============+==============================+
| Mouse | Lung | lung_particle_markers.txt |
+------------+------------+------------------------------+
| Human | NA | |
+------------+------------+------------------------------+
which is unreadable. There also shouldn't be any white.
Link to docs: https://sc-toolbox.readthedocs.io/en/latest/usage.html#sc_toolbox.api.calc.automated_marker_annotation if it helps.
Thank you very much!
Pass custom_dark.css
file to sphinx, instead of dark.css
Add dark mode to some of the UI components which only appear on the mobile version of the website.
In some contexts the theme uses a dark-on-dark color combination that's difficult to read. For example, the environment variable name in this shell code snippet:
Add proper docs on RTD that document everything from setting it up to creating your own themes for the community. This would be an all in one place for people to get all the info they need to use the project. It could also have a way of showcasing what things can be done with it as well as possibly showcasing some community themes.
The dark theme is really great - many thanks!
However, I have found a problem with general admonitions:
.. admonition:: Title
This is not a note or warning, just a general admonition with
some ``monospaced text``. `Link color <#>`_ is fine.
This is rendered as:
I intend to make a PR as a proposal to fix this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.