diff --git a/src/epub/templates/style.css b/src/epub/templates/style.css index f468341..d78682e 100644 --- a/src/epub/templates/style.css +++ b/src/epub/templates/style.css @@ -221,29 +221,65 @@ hr.rule { font-size: 0.85em; } +/* CREngine readers (KOReader, PocketBook) default `code` to a block. */ +.article-body code { + display: inline; +} + +/* Left even inside a `
`, which centres for image captions. */ .article-body pre { + margin: 0.8em 0; + text-align: left; white-space: pre-wrap; word-wrap: break-word; border-left: 2px solid #cccccc; padding-left: 0.5em; } -/* Syntax tokens (src/highlight.rs), monochrome for e-ink: weight and slant - carry the structure, one grey for comments. Flat selectors on purpose. */ -.hl-keyword, -.hl-tag, +/* Syntax tokens (src/highlight.rs), monochrome for e-ink, after zenbones and + lackluster: what the code names stays in ink (functions bold, types italic), + the language's own furniture steps back to grey (keywords bold grey, + literals and punctuation grey), comments lightest. Flat selectors. */ +.hl-function, +.hl-macro, .hl-title, .hl-strong { font-weight: bold; } -.hl-comment { +.hl-type, +.hl-namespace, +.hl-constructor, +.hl-attribute, +.hl-emphasis { + font-style: italic; +} + +.hl-keyword, +.hl-tag { + font-weight: bold; + color: #555555; +} + +.hl-string { + color: #555555; +} + +.hl-number, +.hl-constant, +.hl-label { font-style: italic; color: #555555; } -.hl-emphasis { +.hl-punctuation, +.hl-operator { + color: #666666; +} + +.hl-comment { font-style: italic; + color: #888888; } .article-body table {