Add custom styling options for docs (custom.css) by C-Achard · Pull Request #3207 · DeepLabCut/DeepLabCut
Purpose
- Adds custom handles for the style of the Jupyter Book.
- Custom sidebar color and footer
- "Frosted glass" effect on header
- Color palette based on main logo/GUI
⚠️ NOTE The current colors & theme is not to be considered final. This is meant to provide customizations handles, not enforce a particular theme. Feedback is welcome.
- Even it the entire CCS file were merged commented, this could still be useful.
- Not compatible with Jupyter Book >= 2.0 (Sphinx theme)
- Custom banners/sidebar footer images can look really nice, if available we could add some
Preview
Again, color theme is not final. This is an example of what can be done.
| Mode | Screenshot |
|---|---|
| Dark mode | ![]() |
| Light mode | ![]() |
TODO
- Check :
- Ensure readability of all content
- Make sure the theme is well-accepted and accessible
- (Optional) Merge Update docs TOC and Sphinx excludes #3201 first to help local builds
Details
This pull request introduces custom styling to the Sphinx documentation by adding a new CSS file and updating the Sphinx configuration to include it. The main goal is to enhance the documentation's appearance with a custom sidebar, header, and footer design for both light and dark themes.
Sphinx documentation theming:
- Added a new
custom.cssfile indocs/_static/that defines custom colors and styles for sidebar, header, footer, and buttons, supporting both light and dark themes. - Updated
_config.ymlto includedocs/_staticas a static path and load the newcustom.cssfile for HTML output.

