Skip to content

Commit

Permalink
talk about --themes and --theme-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Mar 16, 2018
1 parent cc4f97e commit 6b29060
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/doc/rustdoc/src/unstable-features.md
Expand Up @@ -292,3 +292,27 @@ Ordinarily, when `rustdoc` prints items in module pages, it will sort them alpha
some consideration for their stability, and names that end in a number). Giving this flag to
`rustdoc` will disable this sorting and instead make it print the items in the order they appear in
the source.

### `--themes`: provide additional themes

Using this flag looks like this:

```bash
$ rustdoc src/lib.rs -Z unstable-options --themes theme.css
```

Giving this flag to `rustdoc` will make it copy your theme into the generated crate docs and enable
it in the theme selector. Note that `rustdoc` will reject your theme file if it doesn't style
everything the "main" theme does. See `--theme-checker` below for details.

### `--theme-checker`: verify theme CSS for validity

Using this flag looks like this:

```bash
$ rustdoc -Z unstable-options --theme-checker theme.css
```

Before including your theme in crate docs, `rustdoc` will compare all the CSS rules it contains
against the "main" theme included by default. Using this flag will allow you to see which rules are
missing if `rustdoc` rejects your theme.

0 comments on commit 6b29060

Please sign in to comment.