[coreboot-gerrit] Change in coreboot[master]: Documentation: Add static CSS file to fix tables

Patrick Rudolph (Code Review) gerrit at coreboot.org
Sun May 13 16:07:52 CEST 2018


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/26263


Change subject: Documentation: Add static CSS file to fix tables
......................................................................

Documentation: Add static CSS file to fix tables

Add a static CSS file to remove annoying scrollbars on rst code tables.

Change-Id: I436b36fb7ee9856c7d6ad8534cd0610b7f071b17
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
A Documentation/_static/theme_overrides.css
M Documentation/conf.py
2 files changed, 26 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/26263/1

diff --git a/Documentation/_static/theme_overrides.css b/Documentation/_static/theme_overrides.css
new file mode 100644
index 0000000..e73518b
--- /dev/null
+++ b/Documentation/_static/theme_overrides.css
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2018 Patrick Rudolph <siro at das-labor.org>
+ *
+ * licensed under CC-by 4.0
+ */
+
+/* override table width restrictions */
+ at 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;
+   }
+}
+
diff --git a/Documentation/conf.py b/Documentation/conf.py
index 85e0438..f108d77 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -58,7 +58,13 @@
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-#html_static_path = ['_static']
+html_static_path = ['_static']
+
+html_context = {
+      'css_files': [
+        '_static/theme_overrides.css',  # override wide tables in RTD theme
+      ],
+}
 
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'corebootdoc'

-- 
To view, visit https://review.coreboot.org/26263
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I436b36fb7ee9856c7d6ad8534cd0610b7f071b17
Gerrit-Change-Number: 26263
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180513/ce23a7de/attachment.html>


More information about the coreboot-gerrit mailing list