Skip to content

Commit 83ced1d

Browse files
authored
Add two style tweaks to improve tables in code blocks (#738)
1 parent 3ebab65 commit 83ced1d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.vuepress/styles/index.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
white-space: pre-wrap;
88
}
99

10+
/* Reduce line height in code blocks
11+
* to avoid gaps in tables rendered with box-drawing characters
12+
*/
13+
.theme-default-content pre,
14+
.theme-default-content pre[class*=language-] {
15+
line-height: 1;
16+
}
17+
18+
/* Add DejaVu Sans Mono to the list of monospaced fonts.
19+
* This allows tables to be rendered seamlessly with box-drawing characters.
20+
*/
21+
:root {
22+
--font-family-code: Consolas, Monaco, 'Andale Mono', 'DejaVu Sans Mono', 'Ubuntu Mono', monospace;
23+
}
24+
1025
@media screen and (min-width: 720px) and (max-width: 815px) {
1126
#docsearch-container {
1227
width: 150px;

0 commit comments

Comments
 (0)