Skip to content

Commit

Permalink
Improve Antora styling
Browse files Browse the repository at this point in the history
  • Loading branch information
vy committed May 1, 2024
1 parent f3842b5 commit 1c26c8d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions antora-playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,23 @@ ui:
<!-- `@asciidoctor/tabs` extension styles -->
<link rel="stylesheet" href="{{{uiRootPath}}}/css/vendor/tabs.css">
<style>
/* Default `h4` and `h5` are smaller than the normal text, fix header font sizing: */
.doc h1 { font-size: 1.9rem; }
.doc h2 { font-size: 1.7rem; }
.doc h3 { font-size: 1.5rem; font-weight: 400; }
.doc h4 { font-size: 1.3rem; font-weight: 500; }
.doc h5 { font-size: 1.1rem; font-weight: 500; text-decoration: underline; }
/* Default `code`, `pre`, and `.colist` (source code annotations) fonts are too big, adjust them: */
.doc .colist>table code, .doc p code, .doc thead code { font-size: 0.8em; }
.doc pre { font-size: 0.7rem; }
.doc .colist { font-size: 0.75rem; }
/* Tab header fonts aren't rendered good, adjusting the font weight: */
.tablist > ul li { font-weight: 500; }
/* `page-toclevels` greater than 4 are not supported by Antora UI, patching it: */
.toc .toc-menu li[data-level="4"] a {
padding-left: 2.75rem
padding-left: 2.75rem;
}
/* Replace the default highlight.js color for strings from red to green: */
/* Replace the default highlight.js color for strings from red (unnecessarily signaling something negative) to green: */
.hljs-string {
color: #0f8532;
}
Expand Down

0 comments on commit 1c26c8d

Please sign in to comment.