diff --git a/book.toml b/book.toml index 31419fde8d..1a24b3cdcb 100644 --- a/book.toml +++ b/book.toml @@ -3,6 +3,8 @@ title = "The Rust Programming Language" authors = ["Steve Klabnik", "Carol Nichols", "Contributions from the Rust Community"] [output.html] -additional-css = ["ferris.css", "theme/2018-edition.css"] +additional-css = ["ferris.css", "theme/2018-edition.css", "theme/semantic-notes.css"] additional-js = ["ferris.js"] git-repository-url = "https://github.com/rust-lang/book" + +[preprocessor.trpl-note] diff --git a/theme/semantic-notes.css b/theme/semantic-notes.css new file mode 100644 index 0000000000..7e68eb371d --- /dev/null +++ b/theme/semantic-notes.css @@ -0,0 +1,13 @@ +/* + This is copied directly from the styles for blockquotes, because notes were + historically rendered *as* blockquotes. This keeps the presentation of them + identical while updating the presentation. +*/ +.note { + margin: 20px 0; + padding: 0 20px; + color: var(--fg); + background-color: var(--quote-bg); + border-block-start: 0.1em solid var(--quote-border); + border-block-end: 0.1em solid var(--quote-border); +} diff --git a/tools/src/bin/semantic-notes.rs b/tools/src/bin/semantic-notes.rs new file mode 100644 index 0000000000..e69de29bb2