Skip to content

Rustdoc should support multiple logo images #160316

Description

@pezcore

Rustdoc currently supports controlling the logo in the upper left hand side of the docs via the html_logo_url attribute. However most logos only look good in light mode, or in dark mode, but not in both. Here is a real world example:

Image

It would be nice if rustdoc allowed for 2 distinct logo images to be specified via html_logo_url: one for light theme mode and one for dark theme/ayu mode. That way designers can tailor their logo's palette to complement the light or dark background.

A possible implementation could allow one or two url values for html_logo_url: if one is given it is used for the logo in all theme modes, but if two are given one is used in light mode and the other in dark/ayu mode. This design would be backward compatible with existing crates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions