diff options
author | Michael Howell <michael@notriddle.com> | 2023-09-08 13:14:54 -0700 |
---|---|---|
committer | Michael Howell <michael@notriddle.com> | 2023-09-08 13:17:21 -0700 |
commit | 65dae11e470450bddbe8451e7c3b5d27ca01f30a (patch) | |
tree | 02a249dbcdccab1a4395ce48249bc276d788ff23 /guide/src/format/mdbook.md | |
parent | d5b1676216229e176a4a7efcca048e340a0c96ad (diff) |
Add `.warning` class for doc author use
This is designed to be compatible with rustdoc's version, in
https://github.com/rust-lang/rust/pull/106561
Diffstat (limited to 'guide/src/format/mdbook.md')
-rw-r--r-- | guide/src/format/mdbook.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/guide/src/format/mdbook.md b/guide/src/format/mdbook.md index 2872b250..15b8d1a7 100644 --- a/guide/src/format/mdbook.md +++ b/guide/src/format/mdbook.md @@ -314,3 +314,29 @@ contents (sidebar) by including a `\{{#title ...}}` near the top of the page. ```hbs \{{#title My Title}} ``` + +## HTML classes provided by mdBook + +The `class="warning"` can be applied to make a warning, or similar note, stand out. + +```html +<div class="warning"> + +This is a bad thing that you should pay attention to. + +Warning blocks should be used sparingly in documentation, to avoid "warning +fatique," where people are trained to ignore them because they usually don't +matter for what they're doing. + +</div> +``` + +<div class="warning"> + +This is a bad thing that you should pay attention to. + +Warning blocks should be used sparingly in documentation, to avoid "warning +fatique," where people are trained to ignore them because they usually don't +matter for what they're doing. + +</div> |