Skip to content

Dark mode #1731

@cromefire

Description

@cromefire

Is your feature request related to a problem? Please describe
Some people may like a dark theme (the intelliJ IDEs have one for example, the the new kotlin docs too at far as I'm aware), to reduce the strain on their eyes, so I propose to add a dark theme to the generated docs.

Describe the solution you'd like
A dark theme can easily implemented using js and css.
I'd propose the use of a simple button and a bit of js glue that adds or removes a css class from body. persistence can be handled via local storage.
In addition the initial value could be set via media query (observable via js) with maybe an option for auto that reacts to media queries (for stuff like dark mode after sunset).

Describe alternatives you've considered
Dark reader works okay-ish. Some contrasts are not good, but most things are readable.

Additional context
I'd be willing to help here, especially with the js/button part, but some graphics need an update:
image
(all icons are SVGs so this might be relatively easy and even doable with my limited skills)

Icons are available from material for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn issue for a feature or an overall improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions