From 5991fb544bb881e4635d63aa24a0dc72d5b29cd1 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 13 Jan 2020 14:44:11 +0100 Subject: [PATCH] config: fix contentui css The contentui sets the page with to be infinite in order to add a second column. We do not use this feature, so we set the width back to normal. Also make sure our theme_overrides are last in conf.py to make sure they override the contentui css. --- doc/common/_static/css/theme_overrides.css | 11 +++++++++++ doc/common/conf.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/common/_static/css/theme_overrides.css b/doc/common/_static/css/theme_overrides.css index 4a2db22..3286474 100644 --- a/doc/common/_static/css/theme_overrides.css +++ b/doc/common/_static/css/theme_overrides.css @@ -25,3 +25,14 @@ span.caption-number:after { font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; margin-bottom: 24px !important; } + +/* + sphinx-contrib contentui sets max-width to none, + giving a very wide page which makes text hard to + read. This sets it to a finite value. +*/ +@media screen and (min-width: 1300px) { + .wy-nav-content { + max-width: 800px; + } +} diff --git a/doc/common/conf.py b/doc/common/conf.py index 437847b..286cd54 100644 --- a/doc/common/conf.py +++ b/doc/common/conf.py @@ -139,8 +139,8 @@ else: html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] html_context = { 'css_files': [ - '_static/css/theme_overrides.css', '_static/contentui.css', + '_static/css/theme_overrides.css', ], 'disclaimer': _DISCLAIMER, }