Skip to content

Commit

Permalink
WIP: Emit semantic HTML instead of blockquotes for notes
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Apr 26, 2024
1 parent d207d89 commit 378bbf7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
13 changes: 13 additions & 0 deletions theme/semantic-notes.css
Original file line number Diff line number Diff line change
@@ -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);
}
Empty file added tools/src/bin/semantic-notes.rs
Empty file.

0 comments on commit 378bbf7

Please sign in to comment.