Skip to content

Commit 02ee90e

Browse files
authored
Merge pull request #455 from RayTracing/fix-code-style
Fix CSS code style
2 parents 3228df0 + 819ef06 commit 02ee90e

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Change Log -- Ray Tracing in One Weekend
55
# v3.0.2 (in progress)
66

77
### Common
8-
- Change: Every book source now includes from a single common acknowledgments document.
8+
- Fix: code styling for source code both inline and in fenced blocks (#430)
9+
- Change: Every book source now includes from a single common acknowledgments document
910

1011
### _In One Weekend_
1112
- Fix: Correct typo: "consine" to "cosine"

style/book.css

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,27 +78,25 @@ div.indented {
7878
** Code
7979
** -----------------------------------------------------------------------------------------------*/
8080

81-
.md code {
82-
font-family: Consolas, Menlo, monospace;
83-
color: #000;
84-
}
85-
86-
.md p code {
87-
padding: 0 .4ex;
88-
background: #e4e4e0;
89-
}
90-
9181
.md pre.listing.tilde {
9282
border: solid 3px #d4d4d4;
93-
background: #e4e4e0;
9483
padding: 1.5ex;
9584
width: 96%;
9685
overflow: visible;
86+
background: #e4e4e0;
9787
}
9888

99-
.md pre.listing.tilde code {
89+
.md code {
90+
/* All code, both in fenced blocks and inline. */
91+
font-family: Consolas, Menlo, monospace;
10092
font-size: 86%;
93+
background: #e0e0dc;
94+
}
95+
96+
.md pre.listing.tilde code {
97+
/* Only code in fenced blocks. */
10198
letter-spacing: -0.20;
99+
background: #e4e4e0;
102100
}
103101

104102
/* Hilight.js Syntax Coloring */

0 commit comments

Comments
 (0)