From 54a9ae2ea1b1f444c55731f8c67348be3dd10f4d Mon Sep 17 00:00:00 2001 From: Matt Gajownik Date: Sun, 5 Jun 2022 15:42:10 +1000 Subject: [PATCH] docs/sphinx: Override RTD style This fixes an issue where clickable references did not make it clear that they were clickable. --- docs/sphinx/_static/css/custom.css | 13 +++++++++++++ docs/sphinx/conf.py | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 docs/sphinx/_static/css/custom.css diff --git a/docs/sphinx/_static/css/custom.css b/docs/sphinx/_static/css/custom.css new file mode 100644 index 000000000..3f2cc9293 --- /dev/null +++ b/docs/sphinx/_static/css/custom.css @@ -0,0 +1,13 @@ +/* Override "references as links" style to match standard links. + Example code: :c:func:`OBS_DECLARE_MODULE()` */ +a.reference > code.xref > span.pre { + color: #2980b9; +} + +a.reference:hover > code.xref > span.pre { + color: #3091d1; +} + +a.reference:visited > code.xref > span.pre { + color: #9b59b6; +} diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py index 7e1f41522..8a6dab35a 100644 --- a/docs/sphinx/conf.py +++ b/docs/sphinx/conf.py @@ -127,6 +127,10 @@ html_context = { # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] +html_css_files = [ + 'css/custom.css', +] + # Custom sidebar templates, must be a dictionary that maps document names # to template names. #