Skip to content

Commit 1c26c8d

Browse files
committed
Improve Antora styling
1 parent f3842b5 commit 1c26c8d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

antora-playbook.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,23 @@ ui:
6767
<!-- `@asciidoctor/tabs` extension styles -->
6868
<link rel="stylesheet" href="{{{uiRootPath}}}/css/vendor/tabs.css">
6969
<style>
70+
/* Default `h4` and `h5` are smaller than the normal text, fix header font sizing: */
71+
.doc h1 { font-size: 1.9rem; }
72+
.doc h2 { font-size: 1.7rem; }
73+
.doc h3 { font-size: 1.5rem; font-weight: 400; }
74+
.doc h4 { font-size: 1.3rem; font-weight: 500; }
75+
.doc h5 { font-size: 1.1rem; font-weight: 500; text-decoration: underline; }
76+
/* Default `code`, `pre`, and `.colist` (source code annotations) fonts are too big, adjust them: */
77+
.doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; }
78+
.doc pre { font-size: 0.7rem; }
79+
.doc .colist { font-size: 0.75rem; }
80+
/* Tab header fonts aren't rendered good, adjusting the font weight: */
81+
.tablist > ul li { font-weight: 500; }
7082
/* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
7183
.toc .toc-menu li[data-level="4"] a {
72-
padding-left: 2.75rem
84+
padding-left: 2.75rem;
7385
}
74-
/* Replace the default highlight.js color for strings from red to green: */
86+
/* Replace the default highlight.js color for strings from red (unnecessarily signaling something negative) to green: */
7587
.hljs-string {
7688
color: #0f8532;
7789
}

0 commit comments

Comments
 (0)