Skip to content

Commit

Permalink
docs: use bold font for markdown h2/h3 headings (foxglove#665)
Browse files Browse the repository at this point in the history
- Use bold font for markdown h2/h3 headings
- Load 600 weight instead of 700 from google fonts. 700 feels quite heavy for the IBM Plex fonts we use.
  • Loading branch information
jtbandes committed Oct 14, 2022
1 parent 9552457 commit 1d87d1c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
4 changes: 4 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,7 @@ overrides:
- subrange
- unkeyed
- lowercased

- filename: "docs/**"
words:
- plex
21 changes: 13 additions & 8 deletions docs/styles/extra.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
.md-source__fact--version {
display: none;
}
.md-source__fact--stars::before {
margin-left: 0 !important;
}
.md-source__fact::before {
vertical-align: bottom;
}
display: none;
}
.md-source__fact--stars::before {
margin-left: 0 !important;
}
.md-source__fact::before {
vertical-align: bottom;
}

.md-typeset h2,
.md-typeset h3 {
font-weight: 600;
}
8 changes: 8 additions & 0 deletions docs/theme/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "base.html" %}

{# Override font weights from the theme default (300,300i,400,400i,700,700i) #}
{%- block fonts %}
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:300,300i,400,400i,600,600i%7CIBM+Plex+Mono:400,400i,600,600i&display=fallback">
<style>:root{--md-text-font:"IBM Plex Sans";--md-code-font:"IBM Plex Mono"}</style>
{%- endblock %}
4 changes: 1 addition & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ theme:
icon: material/brightness-4
name: Switch to light mode
primary: "black"
font:
text: IBM Plex Sans
code: IBM Plex Mono
font: false # Fonts are configured in theme/main.html

plugins:
- social
Expand Down

0 comments on commit 1d87d1c

Please sign in to comment.