-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add an option to remove dark/light mode button #750
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Hey @Josh-Hiz -- how did you remove the Dark theme option? Was it just the following? # conf.py
html_theme_options = {
"navbar_end": ["navbar-icon-links"],
} |
I had tried that but it didn't actually work for some reason, even though the book theme is based on Pydata not everything from Pydata can be applied to the book theme. |
This is an important issue for my group as well, as darkmode makes our website nearly incomprehensible. We will need to explore other themes if dark mode cannot be removed :( |
I also would like to be able to remove or disable dark mode entirely |
This issue would be a long-term fix for this: In the meantime, you could make this button disappear with the following custom CSS: button.theme-switch-button {
display: none !important;
} This is because the theme switch button has the following HTML and the rule above would select the top-most element and remove it: <button class="theme-switch-button btn btn-sm btn-outline-primary navbar-btn rounded-circle" aria-label="light/dark" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-original-title="light/dark">
<span class="theme-switch" data-mode="light"><i class="fa-solid fa-sun"></i></span>
<span class="theme-switch" data-mode="dark"><i class="fa-solid fa-moon"></i></span>
<span class="theme-switch" data-mode="auto"><i class="fa-solid fa-circle-half-stroke"></i></span>
</button> |
Context
I designed my Sphinx site to revolve around the Light Theme and do not want users to have access to Dark mode as it simply does not work for the custom directives I have made.
Proposal
Can there be an html theme option, similar to something like use_download_button, perhaps "use_theme_button" with the default being light?
Tasks and updates
No response
The text was updated successfully, but these errors were encountered: