Explorar o código

add wrapping for tables

bradford.condon %!s(int64=6) %!d(string=hai) anos
pai
achega
8d38028f87
Modificáronse 2 ficheiros con 21 adicións e 0 borrados
  1. 15 0
      docs/_static/theme_overrides.css
  2. 6 0
      docs/conf.py

+ 15 - 0
docs/_static/theme_overrides.css

@@ -0,0 +1,15 @@
+/* override table width restrictions
+See: https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
+ */
+@media screen and (min-width: 767px) {
+
+   .wy-table-responsive table td {
+      /* !important prevents the common CSS stylesheets from overriding
+         this as on RTD they are loaded after this stylesheet */
+      white-space: normal !important;
+   }
+
+   .wy-table-responsive {
+      overflow: visible !important;
+   }
+}

+ 6 - 0
docs/conf.py

@@ -87,6 +87,12 @@ html_theme = "sphinx_rtd_theme"
 # so a file named "default.css" will overwrite the builtin "default.css".
 html_static_path = ['_static']
 
+html_context = {
+    'css_files': [
+        '_static/theme_overrides.css',  # override wide tables in RTD theme
+        ],
+     }
+
 # Custom sidebar templates, must be a dictionary that maps document names
 # to template names.
 #