Skip to content

Commit 6b29060

Browse files
talk about --themes and --theme-checker
1 parent cc4f97e commit 6b29060

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/doc/rustdoc/src/unstable-features.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,27 @@ Ordinarily, when `rustdoc` prints items in module pages, it will sort them alpha
292292
some consideration for their stability, and names that end in a number). Giving this flag to
293293
`rustdoc` will disable this sorting and instead make it print the items in the order they appear in
294294
the source.
295+
296+
### `--themes`: provide additional themes
297+
298+
Using this flag looks like this:
299+
300+
```bash
301+
$ rustdoc src/lib.rs -Z unstable-options --themes theme.css
302+
```
303+
304+
Giving this flag to `rustdoc` will make it copy your theme into the generated crate docs and enable
305+
it in the theme selector. Note that `rustdoc` will reject your theme file if it doesn't style
306+
everything the "main" theme does. See `--theme-checker` below for details.
307+
308+
### `--theme-checker`: verify theme CSS for validity
309+
310+
Using this flag looks like this:
311+
312+
```bash
313+
$ rustdoc -Z unstable-options --theme-checker theme.css
314+
```
315+
316+
Before including your theme in crate docs, `rustdoc` will compare all the CSS rules it contains
317+
against the "main" theme included by default. Using this flag will allow you to see which rules are
318+
missing if `rustdoc` rejects your theme.

0 commit comments

Comments
 (0)