Skip to main content

zensical-gradient-theme

A Zensical theme with animated rainbow-gradient accents and purple light/dark color schemes. It started as the docs theme for rich-gradient and works for any Zensical (or Material-style) docs site.

What it gives you:

  • gradient-dark and gradient-light color schemes, with a system / light / dark toggle
  • Animated rainbow text on links, the active nav item and the site title, plus a rainbow rule under each h1. The animation stops when the reader asks for reduced motion.
  • Calm, card-style API reference pages for mkdocstrings output
  • Inter and Roboto Mono fonts, the classic variant, and a sensible feature list (instant navigation, code copy, search suggestions and more)
  • Copy-to-clipboard links with a toast

Install

The theme isn't on PyPI yet. Add it from GitHub to the dependency group that holds Zensical:

uv add --group docs "zensical-gradient-theme @ git+https://github.com/maxludden/zensical-gradient-theme"

Use

In zensical.toml:

[project.theme]
name = "gradient"
logo = "img/logo.svg"      # optional
favicon = "img/logo.svg"   # optional

That's all: the theme's stylesheet and script load automatically, so you don't need extra_css or extra_javascript entries for it. The same works in mkdocs.yml with theme: {name: gradient}.

Overriding defaults

The theme sets variant, font, palette and features. Any of these you set in your own [project.theme] replaces the theme's value as a whole. For example, setting features replaces the full list rather than adding to it. Copy the list from src/zensical_gradient_theme/templates/mkdocs_theme.yml and edit it.

To restyle further, add your own extra_css. It loads after the theme's stylesheet, so your rules win.

<a class="copy-install" data-copy="uv add my-package" href="#">uv add my-package</a>

Clicking copies the data-copy text (or the link text, if there's no data-copy) and shows a "Copied" toast.

Extra classes

Class Effect
table.params Wide parameter table with a solid header
.badges Centers a row of badge images
.version Accent-colored version label
.banner Full-width image
img[src$="#only-dark"], #only-light Show an image in one scheme only

Development

uv sync
uv run pytest      # builds a fixture site with the theme and checks the output
uv run ruff check
uv run mypy
uv run zensical serve   # preview the demo site in docs/

How the theme is found

Zensical loads installable themes from the mkdocs.themes entry-point group and copies everything in the theme directory into the built site. The entry point targets a small locator object whose __file__ sits in templates/, so only the templates and assets end up in sites, not the package's Python files. templates/mkdocs_theme.yml is the one config file that does get copied.

Metadata

Release files for zensical-gradient-theme 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zensical-gradient-theme 0.1.0
File Size Uploaded Provenance Actions
zensical_gradient_theme-0.1.0.tar.gz 10.9 kB Without provenance Details for zensical_gradient_theme-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zensical-gradient-theme 0.1.0
File Interpreter ABI Platform Actions
zensical_gradient_theme-0.1.0-py3-none-any.whl Python 3 none any Details for zensical_gradient_theme-0.1.0-py3-none-any.whl

Total release size: 24.1 kB

Release files / zensical_gradient_theme-0.1.0.tar.gz

Download URL zensical_gradient_theme-0.1.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fb47bc408e3bf594efef9899c1d36e06f130498a9f3415e4af7b170af94d73a6
BLAKE2b-256 checksum
How to use checksums
00e16c77fc2c8847e3693b17046e28f4852fd364ed0a6f346d43cf0265538ea2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / zensical_gradient_theme-0.1.0-py3-none-any.whl

Download URL zensical_gradient_theme-0.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e54cb2d53848dc6b8d43cfd09043d89e0886735f2663fc3ec84d73ede54b0b50
BLAKE2b-256 checksum
How to use checksums
374ffc89cc43bb85e531e23f5a7b0d6e10044aaf5646e354c9c45f06ab2378af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for zensical-gradient-theme 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page