Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Fix pre/code padding

AuthorDaveJarvis <email>
Date2020-06-29 19:24:10 GMT-0700
Commit8574929e55015d0dce4c258248fc887c58edf3a2
Parent65b9407
Delta11 lines added, 11 lines removed
src/main/resources/com/scrivenvar/preview/webview.css
/* Must be bundled in JAR file. */
font-family: "Vollkorn", serif;
- font-size: 12pt;
background-color: #fff;
margin: 0 auto;
/* CODE ***/
+
pre, code, tt {
/* Must be bundled in JAR file. */
font-family: "Fira Code", monospace;
font-size: 10pt;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: anywhere;
+ text-decoration: none;
+ background-color: #f8f8f8;
}
code, tt {
- background-color: #f8f8f8;
- min-width: 1em;
- padding: .2em .3em;
- text-align: center;
- text-decoration: none;
- border-radius: .3em;
- border: none;
+ padding: .25em;
+ border-radius: .125em;
}
-pre>code {
+pre > code {
+ /* Reset the padding. */
+ padding: 0;
border: none;
background: transparent;
}
pre {
- background-color: #f8f8f8;
border: .125em solid #ccc;
+ overflow: auto;
+ /* Assign the new padding, independently from previous. */
padding: .25em .5em;
- border-radius: .25em;
+ border-radius: .125em;
}