docs: Don't wire font sizes for HTML output
authorJonathan Corbet <corbet@lwn.net>
Mon, 31 Oct 2022 16:48:19 +0000 (10:48 -0600)
committerJonathan Corbet <corbet@lwn.net>
Tue, 1 Nov 2022 21:59:40 +0000 (15:59 -0600)
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 <bagasdotme@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/conf.py
Documentation/sphinx-static/custom.css

index 6ab47833ab6ce843ab961779bb4c0db36af74d4c..c715610d629788329248e74495e092e93d265683 100644 (file)
@@ -316,9 +316,10 @@ if major <= 1 and minor < 8:
 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)
index 9b36f7abd24f3f46a86e016a90c3a75ecf835315..45a624fdcf2cc8f6130df87ca094676f32049ac8 100644 (file)
@@ -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;