From 14460c6b6db12bbc9055b0b03315dd6f159846f2 Mon Sep 17 00:00:00 2001 From: gd Date: Tue, 8 Nov 2022 17:30:06 +0200 Subject: [PATCH] Docs: added custom.css to override default hyphenation and text align styles --- doc/_static/css/custom.css | 7 +++++++ doc/conf.py | 4 ++++ doc/meson.build | 1 + 3 files changed, 12 insertions(+) create mode 100644 doc/_static/css/custom.css diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css new file mode 100644 index 000000000..e592ae91a --- /dev/null +++ b/doc/_static/css/custom.css @@ -0,0 +1,7 @@ +div.body p, div.body dd, div.body li, div.body blockquote { + text-align: left !important; + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} diff --git a/doc/conf.py b/doc/conf.py index bc9730504..d5514aadd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -140,6 +140,10 @@ html_theme_options = {"sidebarwidth": "300px"} # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +html_css_files = [ + 'css/custom.css', +] + # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. diff --git a/doc/meson.build b/doc/meson.build index 0ab323cc5..0517180d2 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -17,6 +17,7 @@ if get_option('html_manual') 'client.rst', 'protocol.rst', 'conf.py', + '_static/css/custom.css' ], command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'], build_by_default: true,