瀏覽代碼

docs/sphinx: Override RTD style

This fixes an issue where clickable references did not make it clear
that they were clickable.
Matt Gajownik 3 年之前
父節點
當前提交
54a9ae2ea1
共有 2 個文件被更改,包括 17 次插入0 次删除
  1. 13 0
      docs/sphinx/_static/css/custom.css
  2. 4 0
      docs/sphinx/conf.py

+ 13 - 0
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;
+}

+ 4 - 0
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.
 #