Skip to content

Commit

Permalink
docs: Don't wire font sizes for HTML output
Browse files Browse the repository at this point in the history
The alabaster theme likes to provide explicit sizes for fonts, which
overrides the users's own browser settings and is guaranteed to displease
folks.  Set the font size to "inherit" so that the users browser settings
control the font size they get.  We can use the font_size configuration
option for the main body font (changing the size I'd already put there),
but the sidebar size can only be set via custom CSS.

Reported-by: Bagas Sanjaya <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
Jonathan Corbet committed Nov 1, 2022
1 parent 2ad34b8 commit bd5d1cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,10 @@ def get_cline_version():
if html_theme == 'alabaster':
html_theme_options = {
'description': get_cline_version(),
'font_size': '10pt',
'page_width': '65em',
'sidebar_width': '15em',
'font_size': 'inherit',
'font_family': 'serif',
}

sys.stderr.write("Using %s theme\n" % html_theme)
Expand Down
1 change: 1 addition & 0 deletions Documentation/sphinx-static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ div.body h3 { font-size: 130%; }
/* Tighten up the layout slightly */
div.body { padding: 0 15px 0 10px; }
div.sphinxsidebarwrapper { padding: 1em 0.4em; }
div.sphinxsidebar { font-size: inherit; }
/* Tweak document margins and don't force width */
div.document {
margin: 20px 10px 0 10px;
Expand Down

0 comments on commit bd5d1cc

Please sign in to comment.