0.0.5 • Published 4 years ago

typedoc-theme-dark v0.0.5

Weekly downloads
225
License
Apache-2.0
Repository
gitlab
Last release
4 years ago

Dark/light theme for TypeDoc

This theme will use the color scheme the user prefers. Setting CSS variables to set the color variables. Defaults to the dark theme if no preference.

@media (prefers-color-scheme: dark) 

Install

npm add --dev typedoc-theme-dark

screen2

screen3-light

Usage

typedoc ./file.ts --theme ./node_modules/typedoc-theme-dark/dist/dark/

Build

To make a build:

npm run build

This puts the theme you want to use in dist/dark/.

typedoc ./file.ts --theme path/to/dist/dark/

Custom CSS Variables

I put a good effort into updating all the colors to use CSS Variables. This allows us to use the built in @media(prefers-color-scheme: x) to change the color. If you want to make a theme with color schemes, this might be good to fork and start with.

See: src/default/assets/css/_constants.sass

As a side note, this seems to work for me. I forked the https://github.com/TypeStrong/typedoc-default-themes repo and kept a lot of things. If there is something wrong or could be done better, make an issue or merge request.

Visit https://typedoc.org/ to learn more about TypeDoc. Theme Docs: https://typedoc.org/guides/themes/

License

Copyright (c) 2020 Dave Lage Copyright (c) 2015 Sebastian Lenz. Copyright (c) 2016-2020 TypeDoc Contributors. Licensed under the Apache License 2.0.

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago